From f5ba6bdafa33720fa6ee692954ac9ab364fdedf5 Mon Sep 17 00:00:00 2001 From: Dan Sandler Date: Thu, 4 Dec 2014 16:07:30 -0500 Subject: RTL support for Lollipop Land. Since the game randomly flips horizontally anyway, forcing the game view to LTR fixes the coordinate math without affecting gameplay. (The score view did need to move to start instead of left, however.) Bug: 18628150 Change-Id: I7cf8bd1e2b9a2316d30e17a9251173598c687c2b --- packages/SystemUI/res/layout/lland.xml | 8 ++++---- packages/SystemUI/src/com/android/systemui/egg/LLand.java | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/SystemUI/res/layout/lland.xml b/packages/SystemUI/res/layout/lland.xml index 053225d..71a16c9 100644 --- a/packages/SystemUI/res/layout/lland.xml +++ b/packages/SystemUI/res/layout/lland.xml @@ -31,10 +31,10 @@ android:textSize="32sp" android:textColor="#FFAAAAAA" android:layout_marginTop="32dp" - android:layout_marginLeft="16dp" - android:layout_gravity="top|left" - android:paddingLeft="16dp" - android:paddingRight="16dp" + android:layout_marginStart="16dp" + android:layout_gravity="top|start" + android:paddingStart="16dp" + android:paddingEnd="16dp" android:paddingTop="8dp" android:paddingBottom="8dp" android:background="@drawable/scorecard" diff --git a/packages/SystemUI/src/com/android/systemui/egg/LLand.java b/packages/SystemUI/src/com/android/systemui/egg/LLand.java index 5de09a3..fa257b1 100644 --- a/packages/SystemUI/src/com/android/systemui/egg/LLand.java +++ b/packages/SystemUI/src/com/android/systemui/egg/LLand.java @@ -178,6 +178,9 @@ public class LLand extends FrameLayout { setFocusable(true); PARAMS = new Params(getResources()); mTimeOfDay = irand(0, SKIES.length); + + // we assume everything will be laid out left|top + setLayoutDirection(LAYOUT_DIRECTION_LTR); } @Override -- cgit v1.1