diff options
author | Daniel Sandler <dsandler@google.com> | 2011-05-31 15:46:13 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@google.com> | 2011-05-31 15:46:14 -0400 |
commit | f86f898f8afe73d81b34543dcb2c30d8bf7da563 (patch) | |
tree | 1dabab706fbbc8216b02eec1e641cc94a16b9e13 /packages | |
parent | 9b4157935af9e44571187a9533c2cc9b413383bf (diff) | |
download | frameworks_base-f86f898f8afe73d81b34543dcb2c30d8bf7da563.zip frameworks_base-f86f898f8afe73d81b34543dcb2c30d8bf7da563.tar.gz frameworks_base-f86f898f8afe73d81b34543dcb2c30d8bf7da563.tar.bz2 |
Move navigation bar to right-hand-side of seascape.
This means the navbar will either be at the bottom (portrait
and reverse portrait) or the right (landscape and seascape)
irrespective of the physical bottom of the device.
Change-Id: Ib51cab22f246785c9cebcc688bcdb848eb776361
Diffstat (limited to 'packages')
3 files changed, 9 insertions, 3 deletions
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 954a871..c0c39d0 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -40,7 +40,7 @@ <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be autodetected from the Configuration. --> - <bool name="config_showNavigationBar">false</bool> + <bool name="config_showNavigationBar">true</bool> </resources> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index 7d6c57b..7dafb89 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -36,6 +36,8 @@ import com.android.internal.statusbar.IStatusBarService; import com.android.systemui.R; public class NavigationBarView extends LinearLayout { + final static boolean NAVBAR_ALWAYS_AT_RIGHT = true; + protected IStatusBarService mBarService; final Display mDisplay; View[] mRotatedViews = new View[4]; @@ -88,7 +90,9 @@ public class NavigationBarView extends LinearLayout { mRotatedViews[Surface.ROTATION_90] = findViewById(R.id.rot90); - mRotatedViews[Surface.ROTATION_270] = findViewById(R.id.rot270); + mRotatedViews[Surface.ROTATION_270] = NAVBAR_ALWAYS_AT_RIGHT + ? findViewById(R.id.rot90) + : findViewById(R.id.rot270); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index e66a1a2..00de920 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -360,7 +360,9 @@ public class PhoneStatusBar extends StatusBar { break; case Surface.ROTATION_270: // device has been turned 90deg clockwise - lp.gravity = Gravity.LEFT | Gravity.FILL_VERTICAL; + lp.gravity = (NavigationBarView.NAVBAR_ALWAYS_AT_RIGHT ? Gravity.RIGHT + : Gravity.LEFT) + | Gravity.FILL_VERTICAL; break; default: lp.gravity = Gravity.BOTTOM | Gravity.FILL_HORIZONTAL; |