android.view.SubMenu.setHeaderTitle()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中android.view.SubMenu.setHeaderTitle()方法的一些代码示例,展示了SubMenu.setHeaderTitle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SubMenu.setHeaderTitle()方法的具体详情如下:
包路径:android.view.SubMenu
类名称:SubMenu
方法名:setHeaderTitle

暂无

代码示例

代码示例来源:origin: com.actionbarsherlock/actionbarsherlock

@Override
public SubMenu setHeaderTitle(int titleRes) {
  mNativeSubMenu.setHeaderTitle(titleRes);
  return this;
}

代码示例来源:origin: com.actionbarsherlock/actionbarsherlock

@Override
public SubMenu setHeaderTitle(CharSequence title) {
  mNativeSubMenu.setHeaderTitle(title);
  return this;
}

代码示例来源:origin: com.willowtreeapps/oak-demos

@Override
public SubMenu setHeaderTitle(int titleRes) {
  mNativeSubMenu.setHeaderTitle(titleRes);
  return this;
}

代码示例来源:origin: com.willowtreeapps/oak-demos

@Override
public SubMenu setHeaderTitle(CharSequence title) {
  mNativeSubMenu.setHeaderTitle(title);
  return this;
}

代码示例来源:origin: stackoverflow.com

private void addCitiestoMenu() {

  cityArrayList = RealmHelper.getStoredCities();
  SubMenu submenu = mDrawerMenu.getItem(0).getSubMenu();
  submenu.setIcon(R.drawable.ic_place_black_24dp);
  submenu.setHeaderTitle("test");

  for (City city : cityArrayList) {
    int cityId = city.getId(); // Get the id (You'll probably need to replace getId() )
    MenuItem item = submenu.add(Menu.NONE, cityId, Menu.NONE, city.getCityName());
    item.setIcon(R.drawable.ic_place_black_24dp);
  }
}

相关文章