Tweak UI of CardPreference and ContextualCard

- CardPreference uses settingslib_preference
  layout to fix title/summary alignment issue.

- Remove stroke for CardPreference and ContextualCard.

- Set colorSurface as default card background color.

Bug: 188599776
Test: manual visual
Change-Id: Id0ee40be60de1f7605849490ee43eae4b9420abb
This commit is contained in:
Arc Wang
2021-06-09 09:23:00 +08:00
parent 7b85f2af24
commit bdb70b1078
8 changed files with 8 additions and 107 deletions

View File

@@ -1117,22 +1117,6 @@
column="5"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;contextual_card_stroke_color&quot;>#1f000000&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="106"
column="5"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
@@ -4285,22 +4269,6 @@
column="44"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item name=&quot;strokeColor&quot;>@color/contextual_card_stroke_color&lt;/item>"
errorLine2=" ^">
<location
file="res/values/styles.xml"
line="475"
column="34"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"