Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f65c4c3 authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Allow nav bar height to vary between portrait and landscape.

Change-Id: I1d69e0f4a1772bff6534c5c591e1def26d163708
parent c2ee231b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -34,8 +34,8 @@
    <dimen name="status_bar_height">25dip</dimen>
    <!-- Height of the bottom navigation / system bar. -->
    <dimen name="navigation_bar_height">48dp</dimen>
    <!-- Height of the bottom navigation bar in portrait -->
    <dimen name="navigation_bar_height_portrait">@dimen/navigation_bar_height</dimen>
    <!-- Height of the bottom navigation bar in portrait; often the same as @dimen/navigation_bar_height -->
    <dimen name="navigation_bar_height_landscape">48dp</dimen>
    <!-- Width of the navigation bar when it is placed vertically on the screen -->
    <dimen name="navigation_bar_width">42dp</dimen>
    <!-- Height of notification icons in the status bar -->
+1 −0
Original line number Diff line number Diff line
@@ -1184,6 +1184,7 @@
  <java-symbol type="bool" name="config_showNavigationBar" />
  <java-symbol type="bool" name="target_honeycomb_needs_options_menu" />
  <java-symbol type="dimen" name="navigation_bar_height" />
  <java-symbol type="dimen" name="navigation_bar_height_landscape" />
  <java-symbol type="dimen" name="navigation_bar_width" />
  <java-symbol type="dimen" name="status_bar_height" />
  <java-symbol type="drawable" name="ic_jog_dial_sound_off" />
+13 −8
Original line number Diff line number Diff line
@@ -977,16 +977,21 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        mStatusBarHeight = mContext.getResources().getDimensionPixelSize(
                com.android.internal.R.dimen.status_bar_height);

        mNavigationBarHeightForRotation[Surface.ROTATION_0] =
        mNavigationBarHeightForRotation[Surface.ROTATION_90] =
        mNavigationBarHeightForRotation[Surface.ROTATION_180] =
        mNavigationBarHeightForRotation[Surface.ROTATION_270] =
        // Height of the navigation bar when presented horizontally at bottom
        mNavigationBarHeightForRotation[mPortraitRotation] =
        mNavigationBarHeightForRotation[mUpsideDownRotation] =
                mContext.getResources().getDimensionPixelSize(
                        com.android.internal.R.dimen.navigation_bar_height);
        mNavigationBarWidthForRotation[Surface.ROTATION_0] =
        mNavigationBarWidthForRotation[Surface.ROTATION_90] =
        mNavigationBarWidthForRotation[Surface.ROTATION_180] =
        mNavigationBarWidthForRotation[Surface.ROTATION_270] =
        mNavigationBarHeightForRotation[mLandscapeRotation] =
        mNavigationBarHeightForRotation[mSeascapeRotation] =
                mContext.getResources().getDimensionPixelSize(
                        com.android.internal.R.dimen.navigation_bar_height_landscape);

        // Width of the navigation bar when presented vertically along one side
        mNavigationBarWidthForRotation[mPortraitRotation] =
        mNavigationBarWidthForRotation[mUpsideDownRotation] =
        mNavigationBarWidthForRotation[mLandscapeRotation] =
        mNavigationBarWidthForRotation[mSeascapeRotation] =
                mContext.getResources().getDimensionPixelSize(
                        com.android.internal.R.dimen.navigation_bar_width);