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
This commit is contained in:
Dan Sandler
2014-12-04 16:07:30 -05:00
parent d23f8b44d5
commit f5ba6bdafa
2 changed files with 7 additions and 4 deletions

View File

@@ -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"

View File

@@ -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