diff options
author | Dave Kover <kover@cyngn.com> | 2016-04-13 15:37:33 -0700 |
---|---|---|
committer | Dave Kover <kover@cyngn.com> | 2016-04-19 10:55:35 -0700 |
commit | c4d9a4bb54c10dd0e8b19524ce47cdece438ee01 (patch) | |
tree | c70725c5af7f49d32bf792753024a04825b1a9d7 /res | |
parent | 2e1c0d6cc3bb7e781d95326d0dddb7ecc4ef276b (diff) | |
download | android_packages_providers_ThemesProvider-c4d9a4bb54c10dd0e8b19524ce47cdece438ee01.tar.gz android_packages_providers_ThemesProvider-c4d9a4bb54c10dd0e8b19524ce47cdece438ee01.tar.bz2 android_packages_providers_ThemesProvider-c4d9a4bb54c10dd0e8b19524ce47cdece438ee01.zip |
Update controls preview to properly render themed assets.
The style preview card does not use assets which are overridden
by most themes. This results in an inaccurate preview of the
included controls, ie checkbox and radio buttons. Additionally,
the font size is cut off on the button in the preview. Increase
button height and decrease font size to compensate.
Ticket: CYNGNOS-874
Change-Id: I286f801afa7b6366ecf50395075240f33bc3d0ac
(cherry picked from commit b5f89235f519d7c20e05e66156ffe4ceb4fa9491)
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/controls_preview.xml | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/res/layout/controls_preview.xml b/res/layout/controls_preview.xml index e85b53c..7b35b17 100644 --- a/res/layout/controls_preview.xml +++ b/res/layout/controls_preview.xml @@ -44,15 +44,16 @@ <Button android:layout_width="96dp" - android:layout_height="30dp" + android:layout_height="42dp" android:layout_marginEnd="72dp" - android:textSize="10dp" + android:textSize="8dp" android:text="@string/controls_preview_button_text" /> <Switch android:layout_width="96dp" android:layout_height="24dp" - android:checked="true"/> + android:checked="true" + android:tint="?*android:attr/colorControlActivated" /> </LinearLayout> @@ -70,35 +71,39 @@ android:layout_width="wrap_content" android:layout_height="wrap_content"> - <ImageView + <CheckBox android:layout_width="32dp" android:layout_height="32dp" + android:checked="false" android:layout_gravity="bottom" - android:src="@*android:drawable/ic_checkbox_checked" /> + android:tint="?*android:attr/colorControlNormal" /> - <ImageView + <CheckBox android:layout_width="32dp" android:layout_height="32dp" + android:checked="true" android:layout_gravity="bottom" android:layout_marginEnd="44dp" - android:src="@*android:drawable/ic_checkbox_checked" /> + android:tint="?*android:attr/colorControlActivated" /> <ProgressBar android:layout_width="48dp" android:layout_height="48dp" android:layout_marginEnd="44dp" /> - <ImageView + <RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" + android:checked="false" android:layout_gravity="bottom" - android:src="@*android:drawable/btn_radio_to_on_mtrl_000" /> + android:tint="?*android:attr/colorControlNormal" /> - <ImageView + <RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:src="@*android:drawable/btn_radio_to_on_mtrl_015" /> + android:checked="true" + android:tint="?*android:attr/colorControlActivated" /> </LinearLayout> |