diff options
author | Justin Klaassen <justinklaassen@google.com> | 2015-06-01 15:20:27 -0700 |
---|---|---|
committer | Justin Klaassen <justinklaassen@google.com> | 2015-06-02 17:33:30 +0000 |
commit | 7531cd7dadfcb9c7df658fb2193c42b65ea0e21f (patch) | |
tree | f0c814d93f505ac49100ca92b616b1f7885260a9 | |
parent | 644241eafe7b175de92745f9369d71f5424f9684 (diff) | |
download | android_packages_apps_ExactCalculator-7531cd7dadfcb9c7df658fb2193c42b65ea0e21f.tar.gz android_packages_apps_ExactCalculator-7531cd7dadfcb9c7df658fb2193c42b65ea0e21f.tar.bz2 android_packages_apps_ExactCalculator-7531cd7dadfcb9c7df658fb2193c42b65ea0e21f.zip |
Force textAlignment == viewEnd
Bug: 21553173
Since the Calculator is UI is predominately LTR, the error strings
should be forced to right align regardless if they contain RTL
characters. However in order to use the textAlignment attribute, the
supportsRtl attribute must also be set to "true" in the manifest and
the Calulator's layoutDirection must be hardcoded to "ltr".
Change-Id: I40396622c334e276bda9e0020dcdcfe94192a42c
-rw-r--r-- | AndroidManifest.xml | 3 | ||||
-rw-r--r-- | res/values/styles.xml | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4f90e22..b01e2c8 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -22,7 +22,8 @@ <application android:allowBackup="false" android:icon="@mipmap/ic_launcher_calculator" - android:label="@string/app_name"> + android:label="@string/app_name" + android:supportsRtl="true"> <activity android:name=".Calculator" diff --git a/res/values/styles.xml b/res/values/styles.xml index ed77ea9..2a074e8 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -28,6 +28,7 @@ <item name="android:windowActionModeOverlay">true</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowNoTitle">true</item> + <item name="android:layoutDirection">ltr</item> </style> <style name="Theme.Licenses"> @@ -40,6 +41,7 @@ <item name="android:fontFamily">sans-serif-light</item> <item name="android:includeFontPadding">false</item> <item name="android:gravity">bottom|end</item> + <item name="android:textAlignment">viewEnd</item> </style> <style name="PadButtonStyle" parent="@android:style/Widget.Material.Light.Button.Borderless"> |