diff options
author | Maurice Lam <yukl@google.com> | 2017-04-06 13:11:50 -0700 |
---|---|---|
committer | Maurice Lam <yukl@google.com> | 2017-04-06 13:16:07 -0700 |
commit | 24885729e3571ebca96c3fb8041f882d79e0fc0c (patch) | |
tree | 5fa5d1c632cb2097f05301d527802e23020397f2 /library/main/res | |
parent | c416fc6377cf4241db6fc950c17981ddd37d2484 (diff) | |
download | setupwizard-24885729e3571ebca96c3fb8041f882d79e0fc0c.tar.gz |
Fix description item with material theme
SuwItemTitle.Description style can be used with material theme and
therefore should not reference GLIF specific attributes. Created new
attribute suwItemDescriptionTitleStyle so that GLIF item can use a
GLIF specific style to adjust description text alignment, while
material theme will use the normal SuwTitle style.
Test: ./gradlew connectedAndroidTest test
Bug: 37033526
Change-Id: I0d162bf6984f6a2fbbf04143a256fb70862527b0
Diffstat (limited to 'library/main/res')
-rw-r--r-- | library/main/res/layout/suw_items_description.xml | 2 | ||||
-rw-r--r-- | library/main/res/values/attrs.xml | 1 | ||||
-rw-r--r-- | library/main/res/values/styles.xml | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/library/main/res/layout/suw_items_description.xml b/library/main/res/layout/suw_items_description.xml index 26a604b..e27d7b8 100644 --- a/library/main/res/layout/suw_items_description.xml +++ b/library/main/res/layout/suw_items_description.xml @@ -48,7 +48,7 @@ <com.android.setupwizardlib.view.RichTextView android:id="@+id/suw_items_title" - style="@style/SuwItemTitle.Description" + style="?attr/suwItemDescriptionTitleStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra" diff --git a/library/main/res/values/attrs.xml b/library/main/res/values/attrs.xml index 14799df..3a054e7 100644 --- a/library/main/res/values/attrs.xml +++ b/library/main/res/values/attrs.xml @@ -74,6 +74,7 @@ <attr name="suwHeader" format="reference" /> <attr name="suwDividerInset" format="dimension|reference" /> <attr name="suwItemDescriptionStyle" format="reference" /> + <attr name="suwItemDescriptionTitleStyle" format="reference" /> <declare-styleable name="SuwIllustration"> <attr name="suwAspectRatio" format="float" /> diff --git a/library/main/res/values/styles.xml b/library/main/res/values/styles.xml index 6a9b9a8..b5a7e88 100644 --- a/library/main/res/values/styles.xml +++ b/library/main/res/values/styles.xml @@ -211,7 +211,7 @@ <item name="android:paddingTop">@dimen/suw_items_verbose_padding_vertical</item> </style> - <style name="SuwItemTitle.Description" parent="SuwItemTitle"> + <style name="SuwItemTitle.GlifDescription" parent="SuwItemTitle"> <item name="android:gravity">?attr/suwGlifHeaderGravity</item> <item name="android:textAlignment" tools:targetApi="jelly_bean_mr1">gravity</item> </style> |