summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Daniel Sandler <dsandler@android.com> 2012-04-27 10:24:14 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2012-04-27 10:24:14 -0700
commitf8d0494bf660fa07e858d09c67dc0aac302a042a (patch)
tree6c05197f561c0553701c2319873220a2c59aaf0d
parentf5d70fd2add31cdb2e4ca1e931b47db95fa4b3e0 (diff)
parent9f65c4c34abb07bdda54649ed510af26f16e9c1b (diff)
Merge "Allow nav bar height to vary between portrait and landscape." into jb-dev
-rw-r--r--core/res/res/values/dimens.xml4
-rw-r--r--core/res/res/values/public.xml1
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java21
3 files changed, 16 insertions, 10 deletions
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 392116f32727..bda626690052 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -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 -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 1a631efb0ff2..f851e626140d 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -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" />
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 96eaa2812a8f..d2053ff26d8f 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -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);