本文整理了Java中android.view.SubMenu.setHeaderIcon()
方法的一些代码示例,展示了SubMenu.setHeaderIcon()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SubMenu.setHeaderIcon()
方法的具体详情如下:
包路径:android.view.SubMenu
类名称:SubMenu
方法名:setHeaderIcon
暂无
代码示例来源:origin: com.actionbarsherlock/actionbarsherlock
@Override
public SubMenu setHeaderIcon(int iconRes) {
mNativeSubMenu.setHeaderIcon(iconRes);
return this;
}
代码示例来源:origin: com.actionbarsherlock/actionbarsherlock
@Override
public SubMenu setHeaderIcon(Drawable icon) {
mNativeSubMenu.setHeaderIcon(icon);
return this;
}
代码示例来源:origin: com.willowtreeapps/oak-demos
@Override
public SubMenu setHeaderIcon(int iconRes) {
mNativeSubMenu.setHeaderIcon(iconRes);
return this;
}
代码示例来源:origin: com.willowtreeapps/oak-demos
@Override
public SubMenu setHeaderIcon(Drawable icon) {
mNativeSubMenu.setHeaderIcon(icon);
return this;
}
代码示例来源:origin: IanDarwin/Android-Cookbook-Examples
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuItem mi = menu.add("Main Menu, Option 1");
mi.setShowAsAction(SHOW_AS_ACTION_IF_ROOM);
SubMenu sub1 = menu.addSubMenu(GROUP_ID, ITEM_ID , Menu.NONE, R.string.submenu);
sub1.setHeaderIcon(R.drawable.icon);
sub1.setIcon(R.drawable.icon);
sub1.add(GROUP_ID , OPTION_1, 0, "Submenu Option 1");
sub1.add(GROUP_ID, OPTION_2, 1, "Submenu Option 2");
return super.onCreateOptionsMenu(menu);
}
内容来源于网络,如有侵权,请联系作者删除!