public void reorient() {
    int rot = mContext.getResources().getConfiguration().orientation;
    for (int i = 1; i < 3; i++) {
      mRotatedViews[i].setVisibility(View.GONE);
    }
    mCurrentView = mRotatedViews[rot];
    mCurrentView.setVisibility(View.VISIBLE);
    if (NavbarEditor.isDevicePhone(mContext)) {
      rot = mDisplay.getRotation();
      mVertical = (rot == Surface.ROTATION_90 || rot == Surface.ROTATION_270);
    } else {
      mVertical = getWidth() > 0 && getHeight() > getWidth();
    }
    mEditBar = new NavbarEditor((ViewGroup) mCurrentView.findViewById(R.id.container), mVertical);
    mEditBar.updateKeys();
    mEditBar.updateLowLights(mCurrentView);
    toggleButtonListener(true);

    mDeadZone = (DeadZone) mCurrentView.findViewById(R.id.deadzone);

    // force the low profile & disabled states into compliance
    setLowProfile(mLowProfile, false, true /* force */);
    setDisabledFlags(mDisabledFlags, true /* force */);
    setMenuVisibility(mShowMenu, true /* force */);

    if (DEBUG) {
      Slog.d(TAG, "reorient(): rot=" + mDisplay.getRotation());
    }

    setNavigationIconHints(mNavigationIconHints, true);
  }
Esempio n. 2
0
  public void reorient() {
    final int rot = mDisplay.getRotation();
    for (int i = 0; i < 4; i++) {
      mRotatedViews[i].setVisibility(View.GONE);
    }
    mCurrentView = mRotatedViews[rot];
    mCurrentView.setVisibility(View.VISIBLE);

    mDeadZone = (DeadZone) mCurrentView.findViewById(R.id.deadzone);

    // force the low profile & disabled states into compliance
    setLowProfile(mLowProfile, false, true /* force */);
    setDisabledFlags(mDisabledFlags, true /* force */);
    setMenuVisibility(mShowMenu, true /* force */);

    if (DEBUG) {
      Slog.d(TAG, "reorient(): rot=" + mDisplay.getRotation());
    }

    setNavigationIconHints(mNavigationIconHints, true);
  }
Esempio n. 3
0
 public void setMenuVisibility(final boolean show) {
   setMenuVisibility(show, false);
 }