Remove controlBackground attribute, replace with direct reference
Trending on the side of fewer theme attributes. It's possible (though somewhat painful) to set the control background without adding another theme attribute, so leave it out. Replace with direct reference to the themed drawable. Bug: 21118581 Change-Id: Ica72b452495090d682842f81ca117731c3b2d874
This commit is contained in:
@@ -1035,9 +1035,6 @@
|
||||
<!-- The color applied to framework switch thumbs in their normal state. -->
|
||||
<attr name="colorSwitchThumbNormal" format="color" />
|
||||
|
||||
<!-- @hide The background used by framework controls. -->
|
||||
<attr name="controlBackground" format="reference" />
|
||||
|
||||
<!-- The color applied to the edge effect on scrolling containers. -->
|
||||
<attr name="colorEdgeEffect" format="color" />
|
||||
|
||||
|
||||
@@ -572,16 +572,16 @@ please see styles_device_defaults.xml.
|
||||
<style name="Widget.Material.CompoundButton" parent="Widget.CompoundButton"/>
|
||||
|
||||
<style name="Widget.Material.CompoundButton.CheckBox" parent="Widget.CompoundButton.CheckBox">
|
||||
<item name="background">?attr/controlBackground</item>
|
||||
<item name="background">@drawable/control_background_material</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Material.CompoundButton.RadioButton" parent="Widget.CompoundButton.RadioButton">
|
||||
<item name="background">?attr/controlBackground</item>
|
||||
<item name="background">@drawable/control_background_material</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Material.CompoundButton.Star" parent="Widget.CompoundButton.Star">
|
||||
<item name="button">@drawable/btn_star_material</item>
|
||||
<item name="background">?attr/controlBackground</item>
|
||||
<item name="background">@drawable/control_background_material</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Material.CompoundButton.Switch">
|
||||
@@ -590,7 +590,7 @@ please see styles_device_defaults.xml.
|
||||
<item name="switchTextAppearance">@style/TextAppearance.Material.Widget.Switch</item>
|
||||
<item name="textOn">@string/capital_on</item>
|
||||
<item name="textOff">@string/capital_off</item>
|
||||
<item name="background">?attr/controlBackground</item>
|
||||
<item name="background">@drawable/control_background_material</item>
|
||||
<item name="showText">false</item>
|
||||
</style>
|
||||
|
||||
@@ -727,7 +727,7 @@ please see styles_device_defaults.xml.
|
||||
<item name="paddingStart">16dip</item>
|
||||
<item name="paddingEnd">16dip</item>
|
||||
<item name="mirrorForRtl">true</item>
|
||||
<item name="background">?attr/controlBackground</item>
|
||||
<item name="background">@drawable/control_background_material</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Material.RatingBar" parent="Widget.RatingBar">
|
||||
@@ -809,7 +809,7 @@ please see styles_device_defaults.xml.
|
||||
</style>
|
||||
|
||||
<style name="Widget.Material.Toolbar.Button.Navigation" parent="Widget.Material">
|
||||
<item name="background">?attr/controlBackground</item>
|
||||
<item name="background">@drawable/control_background_material</item>
|
||||
<item name="minWidth">56dp</item>
|
||||
<item name="scaleType">center</item>
|
||||
<item name="paddingStart">@dimen/action_bar_navigation_padding_start_material</item>
|
||||
@@ -866,7 +866,7 @@ please see styles_device_defaults.xml.
|
||||
</style>
|
||||
|
||||
<style name="Widget.Material.ActionButton.CloseMode">
|
||||
<item name="background">?attr/controlBackground</item>
|
||||
<item name="background">@drawable/control_background_material</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Material.ActionButton.Overflow">
|
||||
@@ -962,7 +962,7 @@ please see styles_device_defaults.xml.
|
||||
</style>
|
||||
|
||||
<style name="Widget.Material.MediaRouteButton">
|
||||
<item name="background">?attr/controlBackground</item>
|
||||
<item name="background">@drawable/control_background_material</item>
|
||||
<item name="externalRouteEnabledDrawable">@drawable/ic_media_route_material</item>
|
||||
<item name="minWidth">56dp</item>
|
||||
<item name="minHeight">48dp</item>
|
||||
|
||||
@@ -390,8 +390,6 @@ please see themes_device_defaults.xml.
|
||||
<item name="colorControlHighlight">@color/ripple_material_dark</item>
|
||||
<item name="colorButtonNormal">@color/btn_default_material_dark</item>
|
||||
<item name="colorSwitchThumbNormal">@color/switch_thumb_material_dark</item>
|
||||
|
||||
<item name="controlBackground">@drawable/control_background_material</item>
|
||||
</style>
|
||||
|
||||
<!-- Material theme (light version). -->
|
||||
@@ -740,8 +738,6 @@ please see themes_device_defaults.xml.
|
||||
<item name="colorControlHighlight">@color/ripple_material_light</item>
|
||||
<item name="colorButtonNormal">@color/btn_default_material_light</item>
|
||||
<item name="colorSwitchThumbNormal">@color/switch_thumb_material_light</item>
|
||||
|
||||
<item name="controlBackground">@drawable/control_background_material</item>
|
||||
</style>
|
||||
|
||||
<!-- Variant of the material (light) theme that has a solid (opaque) action bar
|
||||
|
||||
Reference in New Issue
Block a user