本文整理了Java中android.support.v4.app.FragmentActivity.onMenuItemSelected()
方法的一些代码示例,展示了FragmentActivity.onMenuItemSelected()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FragmentActivity.onMenuItemSelected()
方法的具体详情如下:
包路径:android.support.v4.app.FragmentActivity
类名称:FragmentActivity
方法名:onMenuItemSelected
[英]Dispatch context and options menu to fragments.
[中]将上下文和选项菜单分派到片段。
代码示例来源:origin: shazam/android-aspects
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
return super.onMenuItemSelected(featureId, item) || dispatcher.dispatchOnMenuItemSelected(this, featureId, item);
}
代码示例来源:origin: nekocode/JarFilterPlugin
@Override
public final boolean onMenuItemSelected(int featureId, android.view.MenuItem item) {
if (super.onMenuItemSelected(featureId, item)) {
return true;
}
final ActionBar ab = getSupportActionBar();
if (item.getItemId() == android.R.id.home && ab != null &&
(ab.getDisplayOptions() & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
return onSupportNavigateUp();
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!