android.app.Activity.onPreparePanel()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(171)

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

Activity.onPreparePanel介绍

暂无

代码示例

代码示例来源:origin: kingargyle/adt-leanback-support

/**
 * @hide
 */
protected boolean onPrepareOptionsPanel(View view, Menu menu) {
  return super.onPreparePanel(Window.FEATURE_OPTIONS_PANEL, view, menu);
}

代码示例来源:origin: iqiyi/Neptune

@Override
public boolean onPreparePanel(int int0, android.view.View view1, android.view.Menu menu2) {
  return mOriginActivity.onPreparePanel(int0, view1, menu2);
}

代码示例来源:origin: com.uphyca/android-junit4-robolectric

/**
 * @param featureId
 * @param view
 * @param menu
 * @return
 * @see android.app.Activity#onPreparePanel(int, android.view.View,
 *      android.view.Menu)
 */
public boolean onPreparePanel(int featureId,
               View view,
               Menu menu) {
  return mActivity.onPreparePanel(featureId, view, menu);
}

代码示例来源:origin: shazam/android-aspects

@Override
public boolean onPreparePanel(int featureId, View view, Menu menu) {
  return super.onPreparePanel(featureId, view, menu) || dispatcher.dispatchOnPreparePanel(this, featureId, view, menu);
}

代码示例来源:origin: com.google.android/support-v4

/**
 * Dispatch onPrepareOptionsMenu() to fragments.
 */
@Override
public boolean onPreparePanel(int featureId, View view, Menu menu) {
  if (featureId == Window.FEATURE_OPTIONS_PANEL && menu != null) {
    if (mOptionsMenuInvalidated) {
      mOptionsMenuInvalidated = false;
      menu.clear();
      onCreatePanelMenu(featureId, menu);
    }
    boolean goforit = super.onPreparePanel(featureId, view, menu);
    goforit |= mFragments.dispatchPrepareOptionsMenu(menu);
    return goforit && menu.hasVisibleItems();
  }
  return super.onPreparePanel(featureId, view, menu);
}

代码示例来源:origin: kingargyle/adt-leanback-support

/**
 * Dispatch onPrepareOptionsMenu() to fragments.
 */
@Override
public boolean onPreparePanel(int featureId, View view, Menu menu) {
  if (featureId == Window.FEATURE_OPTIONS_PANEL && menu != null) {
    if (mOptionsMenuInvalidated) {
      mOptionsMenuInvalidated = false;
      menu.clear();
      onCreatePanelMenu(featureId, menu);
    }
    boolean goforit = onPrepareOptionsPanel(view, menu);
    goforit |= mFragments.dispatchPrepareOptionsMenu(menu);
    return goforit;
  }
  return super.onPreparePanel(featureId, view, menu);
}

代码示例来源:origin: ELynx/pokemon-go-xposed-mitm

public boolean onPreparePanel(int featureId, android.view.View view, android.view.Menu menu) {
 if (ScriptLoader.isCalledFromJRuby()) return super.onPreparePanel(featureId, view, menu);
 if (!JRubyAdapter.isInitialized()) {
  Log.i("Method called before JRuby runtime was initialized: RubotoActivity#onPreparePanel");
  return super.onPreparePanel(featureId, view, menu);
 }
 String rubyClassName = scriptInfo.getRubyClassName();
 if (rubyClassName == null) return super.onPreparePanel(featureId, view, menu);
 if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(false).any?{|m| m.to_sym == :onPreparePanel}")) {
  return (Boolean) JRubyAdapter.runRubyMethod(Boolean.class, scriptInfo.getRubyInstance(), "onPreparePanel", new Object[]{featureId, view, menu});
 } else {
  if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(false).any?{|m| m.to_sym == :on_prepare_panel}")) {
   return (Boolean) JRubyAdapter.runRubyMethod(Boolean.class, scriptInfo.getRubyInstance(), "on_prepare_panel", new Object[]{featureId, view, menu});
  } else {
   if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(true).any?{|m| m.to_sym == :on_prepare_panel}")) {
    return (Boolean) JRubyAdapter.runRubyMethod(Boolean.class, scriptInfo.getRubyInstance(), "on_prepare_panel", new Object[]{featureId, view, menu});
   } else {
    return (Boolean) JRubyAdapter.runRubyMethod(Boolean.class, scriptInfo.getRubyInstance(), "onPreparePanel", new Object[]{featureId, view, menu});
   }
  }
 }
}

相关文章

Activity类方法