summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-06-03 11:27:26 -0700
committerWinson Chung <winsonc@google.com>2015-06-03 11:42:15 -0700
commitf8c6f885f032dad4e6b09e02ca97545783bccb70 (patch)
treeeeec5f2c1c12e24d0c02611a75352a608b61b0df
parentca51aaad671f1999dff135b1253fecf0869a3763 (diff)
downloadandroid_packages_apps_Trebuchet-f8c6f885f032dad4e6b09e02ca97545783bccb70.tar.gz
android_packages_apps_Trebuchet-f8c6f885f032dad4e6b09e02ca97545783bccb70.tar.bz2
android_packages_apps_Trebuchet-f8c6f885f032dad4e6b09e02ca97545783bccb70.zip
Fixing issue with hotseat being on the wrong side of the screen in RTL.
Bug: 21499466 Change-Id: I566cd89dfb855f89f4e68bf56e48bf99204b11ab
-rw-r--r--res/layout-land/launcher.xml2
-rw-r--r--src/com/android/launcher3/DeviceProfile.java8
2 files changed, 6 insertions, 4 deletions
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index bf9296f7d..1c917bf09 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -45,7 +45,7 @@
android:id="@+id/hotseat"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_gravity="end" />
+ android:layout_gravity="right" />
<include
android:id="@+id/search_drop_target_bar"
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index bee6cb093..82be409dd 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -405,7 +405,8 @@ public class DeviceProfile {
View searchBar = launcher.getSearchBar();
lp = (FrameLayout.LayoutParams) searchBar.getLayoutParams();
if (hasVerticalBarLayout) {
- // Vertical search bar space
+ // Vertical search bar space -- The search bar is fixed in the layout to be on the left
+ // of the screen regardless of RTL
lp.gravity = Gravity.LEFT;
lp.width = searchBarSpaceHeightPx;
@@ -438,8 +439,9 @@ public class DeviceProfile {
View hotseat = launcher.findViewById(R.id.hotseat);
lp = (FrameLayout.LayoutParams) hotseat.getLayoutParams();
if (hasVerticalBarLayout) {
- // Vertical hotseat
- lp.gravity = Gravity.END;
+ // Vertical hotseat -- The hotseat is fixed in the layout to be on the right of the
+ // screen regardless of RTL
+ lp.gravity = Gravity.RIGHT;
lp.width = hotseatBarHeightPx;
lp.height = LayoutParams.MATCH_PARENT;
hotseat.findViewById(R.id.layout).setPadding(0, 2 * edgeMarginPx, 0, 2 * edgeMarginPx);