Esempio n. 1
0
  @Override
  protected void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);

    // Action bar can change size on configuration changes.
    // Reread the desired height from the theme-specified style.
    TypedArray a =
        getContext()
            .obtainStyledAttributes(
                null, R.styleable.ActionBar, com.android.internal.R.attr.actionBarStyle, 0);
    setContentHeight(a.getLayoutDimension(R.styleable.ActionBar_height, 0));
    a.recycle();
    if (mSplitWhenNarrow) {
      setSplitActionBar(
          getContext()
              .getResources()
              .getBoolean(com.android.internal.R.bool.split_action_bar_is_narrow));
    }
    if (mActionMenuPresenter != null) {
      mActionMenuPresenter.onConfigurationChanged(newConfig);
    }
  }
Esempio n. 2
0
 public void dismissPopupMenus() {
   if (mActionMenuPresenter != null) {
     mActionMenuPresenter.dismissPopupMenus();
   }
 }
Esempio n. 3
0
 public boolean isOverflowMenuShowing() {
   if (mActionMenuPresenter != null) {
     return mActionMenuPresenter.isOverflowMenuShowing();
   }
   return false;
 }
Esempio n. 4
0
 public boolean isOverflowReserved() {
   return mActionMenuPresenter != null && mActionMenuPresenter.isOverflowReserved();
 }
Esempio n. 5
0
 public boolean hideOverflowMenu() {
   if (mActionMenuPresenter != null) {
     return mActionMenuPresenter.hideOverflowMenu();
   }
   return false;
 }