Fix RTL alignmnet of "eSIMs" in "Erase all data" page.

"eSIMs" is not a RTL string, so it will align to left even we change to
RTL language like Urdu. We must set the textDirection of TextView to
"locale" to force it follow locale's direction. We don't use
textAlignment to set string direction because it contains list bullets,
and list bullets will still align to left.

Change-Id: I0eea2bed9f324bb071e413673227839b830921cf
Fixes: 77946796
Test: visual
This commit is contained in:
George Huang
2018-04-19 18:04:58 +08:00
parent f89e9e4174
commit 2ee0e2960d
2 changed files with 9 additions and 4 deletions

View File

@@ -35,28 +35,28 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/master_clear_item_label"
android:includeFontPadding="false"
android:textSize="18sp"
android:text="@string/master_clear_desc" />
<TextView android:id="@+id/also_erases_external"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/master_clear_item_label"
android:includeFontPadding="false"
android:visibility="gone"
android:textSize="18sp"
android:text="@string/master_clear_desc_also_erases_external" />
<TextView android:id="@+id/also_erases_esim"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/master_clear_item_label"
android:includeFontPadding="false"
android:visibility="gone"
android:textSize="18sp"
android:text="@string/master_clear_desc_also_erases_esim" />
<TextView android:id="@+id/accounts_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/master_clear_item_label"
android:visibility="gone"
android:textSize="18sp"
android:text="@string/master_clear_accounts" />
<LinearLayout android:id="@+id/accounts"
android:layout_width="wrap_content"

View File

@@ -495,4 +495,9 @@
<item name="android:paddingBottom">24dp</item>
</style>
<style name="master_clear_item_label" parent="android:Widget.TextView">
<item name="android:textDirection">locale</item>
<item name="android:textSize">18sp</item>
</style>
</resources>