Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the complete list of attributes that you can customize for AppCompat Themes and what are their default values?

Using AppCompatActivity you must extends AppCompat Theme.

What is the complete list of attributes that you can customize, and what is their default value?

I have collected a list of all the ones I've found but do not know if it is complete

help me to complete it

<style name="Theme.Custom.AppCompat" parent="Theme.AppCompat">
    <item name="colorAccent">@color/accent_material_dark</item>
    <item name="colorButtonNormal">@color/button_material_dark</item>
    <item name="colorControlActivated">?attr/colorAccent</item>
    <item name="colorControlHighlight">@color/ripple_material_dark</item>
    <item name="colorControlNormal">?android:attr/textColorSecondary</item>
    <item name="colorPrimary">@color/primary_material_dark</item>
    <item name="colorPrimaryDark">@color/primary_dark_material_dark</item>
    <item name="colorSwitchThumbNormal">@color/switch_thumb_material_dark</item>
    <item name="controlBackground">?attr/selectableItemBackgroundBorderless</item>
    <item name="android:colorBackground">@color/background_material_dark</item>
    <item name="android:colorForeground">@color/foreground_material_dark</item>
    <item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item>
    <item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_light</item>
    <item name="android:textColorSecondary">@color/abc_secondary_text_material_dark</item>
    <item name="android:textColorSecondaryInverse">@color/abc_secondary_text_material_light</item>
    <item name="android:windowBackground">@color/background_material_dark</item>
</style>
<style name="Theme.Custom.AppCompat.Light" parent="Theme.AppCompat.Light">
    <item name="colorAccent">@color/accent_material_light</item>
    <item name="colorButtonNormal">@color/button_material_light</item>
    <item name="colorControlActivated">?attr/colorAccent</item>
    <item name="colorControlHighlight">@color/ripple_material_light</item>
    <item name="colorControlNormal">?android:attr/textColorSecondary</item>
    <item name="colorPrimary">@color/primary_material_light</item>
    <item name="colorPrimaryDark">@color/primary_dark_material_light</item>
    <item name="colorSwitchThumbNormal">@color/button_material_light</item>
    <item name="controlBackground">?attr/selectableItemBackgroundBorderless</item>
    <item name="android:colorBackground">@color/background_material_light</item>
    <item name="android:colorForeground">@color/foreground_material_light</item>
    <item name="android:textColorPrimary">@color/abc_primary_text_material_light</item>
    <item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_light</item>
    <item name="android:textColorSecondary">@color/abc_secondary_text_material_light</item>
    <item name="android:textColorSecondaryInverse">@color/abc_secondary_text_material_light</item>
    <item name="android:windowBackground">@color/background_material_light</item>
</style>

Also, what's the best way to create a custom AppCompat theme in Android?

like image 585
Xan Avatar asked Dec 22 '16 18:12

Xan


1 Answers

What is the complete list of attributes that you can customize

That's in these massive highlighted blocks

Android Source - Theme.AppCompat attributes - res/values/attrs.xml
Android Source - base Theme attributes - res/values/attrs.xml

what is their default value?

I'm sure those values are in there somewhere within the style.xml files, but there's a lot of those files that you can use Github's search feature to go find.

Note: You don't have to override every value.

The "best way" to make a custom theme? Maybe using the Theme Editor.

like image 185
OneCricketeer Avatar answered Oct 11 '22 03:10

OneCricketeer