本文整理汇总了Java中it.gmariotti.cardslib.library.internal.base.BaseCard类的典型用法代码示例。如果您正苦于以下问题:Java BaseCard类的具体用法?Java BaseCard怎么用?Java BaseCard使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseCard类属于it.gmariotti.cardslib.library.internal.base包,在下文中一共展示了BaseCard类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import it.gmariotti.cardslib.library.internal.base.BaseCard; //导入依赖的package包/类
private void init() {
CardHeader header = new CardHeader(getContext());
header.setButtonOverflowVisible(true);
header.setTitle("Google Maps");
header.setPopupMenu(R.menu.popupmain, new CardHeader.OnClickCardHeaderPopupMenuListener() {
@Override
public void onMenuItemClick(BaseCard card, MenuItem item) {
Toast.makeText(getContext(), item.getTitle(), Toast.LENGTH_SHORT).show();
}
});
addCardHeader(header);
GoogleNowBirthThumb thumbnail = new GoogleNowBirthThumb(getContext());
thumbnail.setDrawableResource(R.drawable.carddemo_ic_gmaps_large);
addCardThumbnail(thumbnail);
}
示例2: onPreparePopupMenu
import it.gmariotti.cardslib.library.internal.base.BaseCard; //导入依赖的package包/类
/**
* This is called right before the menu is shown.
* You can use this method to efficiently enable/disable items or otherwise
* dynamically modify the contents.
*
* @param card
* @param popupMenu
*
* @return You must return true for the menu to be displayed;
* if you return false it will not be shown.
*/
public boolean onPreparePopupMenu(BaseCard card, PopupMenu popupMenu);
示例3: onMenuItemClick
import it.gmariotti.cardslib.library.internal.base.BaseCard; //导入依赖的package包/类
public void onMenuItemClick(BaseCard card, MenuItem item);
示例4: onButtonExpandClick
import it.gmariotti.cardslib.library.internal.base.BaseCard; //导入依赖的package包/类
public void onButtonExpandClick(BaseCard card, MenuItem item);