Skip to content

Commit b023a58

Browse files
author
Fabrice Di Meglio
committed
Fix bug #7199562 UI mirroring for RTL locales (Arabic, Hebrew, Farsi): Play settings
- add CheckedTextViewStyle with "viewStart" as default text alignment - fix some typos Change-Id: Ia8161c48faf579c89ba5ed49a436e4269178b8c1
1 parent 62ea436 commit b023a58

File tree

8 files changed

+37
-9
lines changed

8 files changed

+37
-9
lines changed

api/current.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ package android {
331331
field public static final int checkboxStyle = 16842860; // 0x101006c
332332
field public static final int checked = 16843014; // 0x1010106
333333
field public static final int checkedButton = 16843080; // 0x1010148
334+
field public static final int checkedTextViewStyle = 16843720; // 0x10103c8
334335
field public static final int childDivider = 16843025; // 0x1010111
335336
field public static final int childIndicator = 16843020; // 0x101010c
336337
field public static final int childIndicatorLeft = 16843023; // 0x101010f
@@ -1789,6 +1790,7 @@ package android {
17891790
field public static final int Widget_DeviceDefault_Button_Small = 16974146; // 0x1030142
17901791
field public static final int Widget_DeviceDefault_Button_Toggle = 16974148; // 0x1030144
17911792
field public static final int Widget_DeviceDefault_CalendarView = 16974190; // 0x103016e
1793+
field public static final int Widget_DeviceDefault_CheckedTextView = 16974299; // 0x10301db
17921794
field public static final int Widget_DeviceDefault_CompoundButton_CheckBox = 16974152; // 0x1030148
17931795
field public static final int Widget_DeviceDefault_CompoundButton_RadioButton = 16974169; // 0x1030159
17941796
field public static final int Widget_DeviceDefault_CompoundButton_Star = 16974173; // 0x103015d
@@ -1822,6 +1824,7 @@ package android {
18221824
field public static final int Widget_DeviceDefault_Light_Button_Small = 16974198; // 0x1030176
18231825
field public static final int Widget_DeviceDefault_Light_Button_Toggle = 16974200; // 0x1030178
18241826
field public static final int Widget_DeviceDefault_Light_CalendarView = 16974238; // 0x103019e
1827+
field public static final int Widget_DeviceDefault_Light_CheckedTextView = 16974300; // 0x10301dc
18251828
field public static final int Widget_DeviceDefault_Light_CompoundButton_CheckBox = 16974204; // 0x103017c
18261829
field public static final int Widget_DeviceDefault_Light_CompoundButton_RadioButton = 16974224; // 0x1030190
18271830
field public static final int Widget_DeviceDefault_Light_CompoundButton_Star = 16974228; // 0x1030194
@@ -1907,6 +1910,7 @@ package android {
19071910
field public static final int Widget_Holo_Button_Small = 16973964; // 0x103008c
19081911
field public static final int Widget_Holo_Button_Toggle = 16973966; // 0x103008e
19091912
field public static final int Widget_Holo_CalendarView = 16974060; // 0x10300ec
1913+
field public static final int Widget_Holo_CheckedTextView = 16974297; // 0x10301d9
19101914
field public static final int Widget_Holo_CompoundButton_CheckBox = 16973969; // 0x1030091
19111915
field public static final int Widget_Holo_CompoundButton_RadioButton = 16973986; // 0x10300a2
19121916
field public static final int Widget_Holo_CompoundButton_Star = 16973990; // 0x10300a6
@@ -1940,6 +1944,7 @@ package android {
19401944
field public static final int Widget_Holo_Light_Button_Small = 16974007; // 0x10300b7
19411945
field public static final int Widget_Holo_Light_Button_Toggle = 16974009; // 0x10300b9
19421946
field public static final int Widget_Holo_Light_CalendarView = 16974061; // 0x10300ed
1947+
field public static final int Widget_Holo_Light_CheckedTextView = 16974298; // 0x10301da
19431948
field public static final int Widget_Holo_Light_CompoundButton_CheckBox = 16974012; // 0x10300bc
19441949
field public static final int Widget_Holo_Light_CompoundButton_RadioButton = 16974032; // 0x10300d0
19451950
field public static final int Widget_Holo_Light_CompoundButton_Star = 16974036; // 0x10300d4

core/java/android/widget/CheckedTextView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public CheckedTextView(Context context) {
5555
}
5656

5757
public CheckedTextView(Context context, AttributeSet attrs) {
58-
this(context, attrs, 0);
58+
this(context, attrs, R.attr.checkedTextViewStyle);
5959
}
6060

6161
public CheckedTextView(Context context, AttributeSet attrs, int defStyle) {

core/res/res/values/attrs.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,8 @@
483483
<attr name="autoCompleteTextViewStyle" format="reference" />
484484
<!-- Default Checkbox style. -->
485485
<attr name="checkboxStyle" format="reference" />
486+
<!-- Default CheckedTextView style. -->
487+
<attr name="checkedTextViewStyle" format="reference" />
486488
<!-- Default ListView style for drop downs. -->
487489
<attr name="dropDownListViewStyle" format="reference" />
488490
<!-- Default EditText style. -->

core/res/res/values/public.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,10 +2018,10 @@
20182018
<public type="attr" name="permissionGroupFlags" id="0x010103c5" />
20192019
<public type="attr" name="labelFor" id="0x010103c6" />
20202020
<public type="attr" name="permissionFlags" id="0x010103c7" />
2021-
2022-
2023-
<!-- ===============================================================
2024-
Resources added in next version of platform
2025-
=============================================================== -->
2021+
<public type="attr" name="checkedTextViewStyle" />
2022+
<public type="style" name="Widget.Holo.CheckedTextView" />
2023+
<public type="style" name="Widget.Holo.Light.CheckedTextView" />
2024+
<public type="style" name="Widget.DeviceDefault.CheckedTextView" />
2025+
<public type="style" name="Widget.DeviceDefault.Light.CheckedTextView" />
20262026

20272027
</resources>

core/res/res/values/styles.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,11 @@ please see styles_device_defaults.xml.
464464
<item name="android:textEditSuggestionItemLayout">?android:attr/textEditSuggestionItemLayout</item>
465465
<item name="android:textCursorDrawable">?android:attr/textCursorDrawable</item>
466466
</style>
467-
467+
468+
<style name="Widget.CheckedTextView">
469+
<item name="android:textAlignment">viewStart</item>
470+
</style>
471+
468472
<style name="Widget.TextView.ListSeparator">
469473
<item name="android:background">@android:drawable/dark_header_dither</item>
470474
<item name="android:layout_width">match_parent</item>
@@ -1589,6 +1593,9 @@ please see styles_device_defaults.xml.
15891593
<style name="Widget.Holo.TextView" parent="Widget.TextView">
15901594
</style>
15911595

1596+
<style name="Widget.Holo.CheckedTextView" parent="Widget.CheckedTextView">
1597+
</style>
1598+
15921599
<style name="Widget.Holo.TextView.ListSeparator" parent="Widget.TextView.ListSeparator">
15931600
<item name="android:background">@android:drawable/list_section_divider_holo_dark</item>
15941601
<item name="android:textAllCaps">true</item>
@@ -2017,6 +2024,9 @@ please see styles_device_defaults.xml.
20172024
<style name="Widget.Holo.Light.TextView" parent="Widget.TextView">
20182025
</style>
20192026

2027+
<style name="Widget.Holo.Light.CheckedTextView" parent="Widget.CheckedTextView">
2028+
</style>
2029+
20202030
<style name="Widget.Holo.Light.TextView.ListSeparator" parent="Widget.TextView.ListSeparator">
20212031
<item name="android:background">@android:drawable/list_section_divider_holo_light</item>
20222032
<item name="android:textAllCaps">true</item>

core/res/res/values/styles_device_defaults.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ easier.
4949
</style>
5050
<style name="Widget.DeviceDefault.TextView" parent="Widget.Holo.TextView" >
5151

52+
</style>
53+
<style name="Widget.DeviceDefault.CheckedTextView" parent="Widget.Holo.CheckedTextView" >
54+
5255
</style>
5356
<style name="Widget.DeviceDefault.AutoCompleteTextView" parent="Widget.Holo.AutoCompleteTextView" >
5457

@@ -287,6 +290,9 @@ easier.
287290
</style>
288291
<style name="Widget.DeviceDefault.Light.TextView" parent="Widget.Holo.Light.TextView" >
289292

293+
</style>
294+
<style name="Widget.DeviceDefault.Light.CheckedTextView" parent="Widget.Holo.Light.CheckedTextView" >
295+
290296
</style>
291297
<style name="Widget.DeviceDefault.Light.AutoCompleteTextView" parent="Widget.Holo.Light.AutoCompleteTextView" >
292298

core/res/res/values/themes.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ please see themes_device_defaults.xml.
241241
<item name="absListViewStyle">@android:style/Widget.AbsListView</item>
242242
<item name="autoCompleteTextViewStyle">@android:style/Widget.AutoCompleteTextView</item>
243243
<item name="checkboxStyle">@android:style/Widget.CompoundButton.CheckBox</item>
244+
<item name="checkedTextViewStyle">@android:style/Widget.CheckedTextView</item>
244245
<item name="dropDownListViewStyle">@android:style/Widget.ListView.DropDown</item>
245246
<item name="editTextStyle">@android:style/Widget.EditText</item>
246247
<item name="expandableListViewStyle">@android:style/Widget.ExpandableListView</item>
@@ -874,12 +875,12 @@ please see themes_device_defaults.xml.
874875
<p>This is the default system theme for apps that target API level 11 - 13. Starting
875876
with API level 14, the default system theme is supplied by {@link #Theme_DeviceDefault},
876877
which might apply a different style on different devices. If you want to ensure that your
877-
app consistenly uses the Holo theme at all times, you must explicitly declare it in your
878+
app consistently uses the Holo theme at all times, you must explicitly declare it in your
878879
manifest. For example, {@code &lt;application android:theme="@android:style/Theme.Holo"&gt;}.
879880
For more information, read <a
880881
href="http://android-developers.blogspot.com/2012/01/holo-everywhere.html">Holo
881882
Everywhere</a>.</p>
882-
<p>The widgets in the holographic theme are translucent on their brackground, so
883+
<p>The widgets in the holographic theme are translucent on their background, so
883884
applications must ensure that any background they use with this theme is itself
884885
dark; otherwise, it will be difficult to see the widgets. This UI style also includes a
885886
full action bar by default.</p>
@@ -1069,6 +1070,7 @@ please see themes_device_defaults.xml.
10691070
<item name="absListViewStyle">@android:style/Widget.Holo.AbsListView</item>
10701071
<item name="autoCompleteTextViewStyle">@android:style/Widget.Holo.AutoCompleteTextView</item>
10711072
<item name="checkboxStyle">@android:style/Widget.Holo.CompoundButton.CheckBox</item>
1073+
<item name="checkedTextViewStyle">@android:style/Widget.Holo.CheckedTextView</item>
10721074
<item name="dropDownListViewStyle">@android:style/Widget.Holo.ListView.DropDown</item>
10731075
<item name="editTextStyle">@android:style/Widget.Holo.EditText</item>
10741076
<item name="expandableListViewStyle">@android:style/Widget.Holo.ExpandableListView</item>
@@ -1382,6 +1384,7 @@ please see themes_device_defaults.xml.
13821384
<item name="absListViewStyle">@android:style/Widget.Holo.Light.AbsListView</item>
13831385
<item name="autoCompleteTextViewStyle">@android:style/Widget.Holo.Light.AutoCompleteTextView</item>
13841386
<item name="checkboxStyle">@android:style/Widget.Holo.Light.CompoundButton.CheckBox</item>
1387+
<item name="checkedTextViewStyle">@android:style/Widget.Holo.Light.CheckedTextView</item>
13851388
<item name="dropDownListViewStyle">@android:style/Widget.Holo.ListView.DropDown</item>
13861389
<item name="editTextStyle">@android:style/Widget.Holo.Light.EditText</item>
13871390
<item name="expandableListViewStyle">@android:style/Widget.Holo.Light.ExpandableListView</item>

core/res/res/values/themes_device_defaults.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ easier.
104104
<item name="absListViewStyle">@android:style/Widget.DeviceDefault.AbsListView</item>
105105
<item name="autoCompleteTextViewStyle">@android:style/Widget.DeviceDefault.AutoCompleteTextView</item>
106106
<item name="checkboxStyle">@android:style/Widget.DeviceDefault.CompoundButton.CheckBox</item>
107+
<item name="checkedTextViewStyle">@android:style/Widget.DeviceDefault.CheckedTextView</item>
107108
<item name="dropDownListViewStyle">@android:style/Widget.DeviceDefault.ListView.DropDown</item>
108109
<item name="editTextStyle">@android:style/Widget.DeviceDefault.EditText</item>
109110
<item name="expandableListViewStyle">@android:style/Widget.DeviceDefault.ExpandableListView</item>
@@ -261,6 +262,7 @@ easier.
261262
<item name="absListViewStyle">@android:style/Widget.DeviceDefault.Light.AbsListView</item>
262263
<item name="autoCompleteTextViewStyle">@android:style/Widget.DeviceDefault.Light.AutoCompleteTextView</item>
263264
<item name="checkboxStyle">@android:style/Widget.DeviceDefault.Light.CompoundButton.CheckBox</item>
265+
<item name="checkedTextViewStyle">@android:style/Widget.DeviceDefault.Light.CheckedTextView</item>
264266
<item name="dropDownListViewStyle">@android:style/Widget.DeviceDefault.ListView.DropDown</item>
265267
<item name="editTextStyle">@android:style/Widget.DeviceDefault.Light.EditText</item>
266268
<item name="expandableListViewStyle">@android:style/Widget.DeviceDefault.Light.ExpandableListView</item>

0 commit comments

Comments
 (0)