本文整理了Java中android.app.Activity.onCreatePanelMenu()
方法的一些代码示例,展示了Activity.onCreatePanelMenu()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.onCreatePanelMenu()
方法的具体详情如下:
包路径:android.app.Activity
类名称:Activity
方法名:onCreatePanelMenu
暂无
代码示例来源:origin: iqiyi/Neptune
@Override
public boolean onCreatePanelMenu(int int0, android.view.Menu menu1) {
return mOriginActivity.onCreatePanelMenu(int0, menu1);
}
代码示例来源:origin: com.uphyca/android-junit4-robolectric
/**
* @param featureId
* @param menu
* @return
* @see android.app.Activity#onCreatePanelMenu(int, android.view.Menu)
*/
public boolean onCreatePanelMenu(int featureId,
Menu menu) {
return mActivity.onCreatePanelMenu(featureId, menu);
}
代码示例来源:origin: shazam/android-aspects
@Override
public boolean onCreatePanelMenu(int featureId, Menu menu) {
return super.onCreatePanelMenu(featureId, menu) || dispatcher.dispatchOnCreatePanelMenu(this, featureId, menu);
}
代码示例来源:origin: com.google.android/support-v4
/**
* Dispatch to Fragment.onCreateOptionsMenu().
*/
@Override
public boolean onCreatePanelMenu(int featureId, Menu menu) {
if (featureId == Window.FEATURE_OPTIONS_PANEL) {
boolean show = super.onCreatePanelMenu(featureId, menu);
show |= mFragments.dispatchCreateOptionsMenu(menu, getMenuInflater());
if (android.os.Build.VERSION.SDK_INT >= HONEYCOMB) {
return show;
}
// Prior to Honeycomb, the framework can't invalidate the options
// menu, so we must always say we have one in case the app later
// invalidates it and needs to have it shown.
return true;
}
return super.onCreatePanelMenu(featureId, menu);
}
代码示例来源:origin: kingargyle/adt-leanback-support
/**
* Dispatch to Fragment.onCreateOptionsMenu().
*/
@Override
public boolean onCreatePanelMenu(int featureId, Menu menu) {
if (featureId == Window.FEATURE_OPTIONS_PANEL) {
boolean show = super.onCreatePanelMenu(featureId, menu);
show |= mFragments.dispatchCreateOptionsMenu(menu, getMenuInflater());
if (android.os.Build.VERSION.SDK_INT >= HONEYCOMB) {
return show;
}
// Prior to Honeycomb, the framework can't invalidate the options
// menu, so we must always say we have one in case the app later
// invalidates it and needs to have it shown.
return true;
}
return super.onCreatePanelMenu(featureId, menu);
}
代码示例来源:origin: ELynx/pokemon-go-xposed-mitm
public boolean onCreatePanelMenu(int featureId, android.view.Menu menu) {
if (ScriptLoader.isCalledFromJRuby()) return super.onCreatePanelMenu(featureId, menu);
if (!JRubyAdapter.isInitialized()) {
Log.i("Method called before JRuby runtime was initialized: RubotoActivity#onCreatePanelMenu");
return super.onCreatePanelMenu(featureId, menu);
}
String rubyClassName = scriptInfo.getRubyClassName();
if (rubyClassName == null) return super.onCreatePanelMenu(featureId, menu);
if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(false).any?{|m| m.to_sym == :onCreatePanelMenu}")) {
return (Boolean) JRubyAdapter.runRubyMethod(Boolean.class, scriptInfo.getRubyInstance(), "onCreatePanelMenu", new Object[]{featureId, menu});
} else {
if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(false).any?{|m| m.to_sym == :on_create_panel_menu}")) {
return (Boolean) JRubyAdapter.runRubyMethod(Boolean.class, scriptInfo.getRubyInstance(), "on_create_panel_menu", new Object[]{featureId, menu});
} else {
if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(true).any?{|m| m.to_sym == :on_create_panel_menu}")) {
return (Boolean) JRubyAdapter.runRubyMethod(Boolean.class, scriptInfo.getRubyInstance(), "on_create_panel_menu", new Object[]{featureId, menu});
} else {
return (Boolean) JRubyAdapter.runRubyMethod(Boolean.class, scriptInfo.getRubyInstance(), "onCreatePanelMenu", new Object[]{featureId, menu});
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!