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

Using AppCompatActivity, you should extend the theme of AppCompat.

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

I have compiled a list of all found, but I do not know if this is completed

help me fill it out

<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?

+4
source share
1 answer

What is the complete list of attributes you can customize

What's in these massive allocated blocks

Android Source - Theme.AppCompatAttributes - res/values/attrs.xml
Android Source - Basic Attributes Theme-res/values/attrs.xml

?

, - style.xml, , Github, .

. .

" " ? , .

+4

Source: https://habr.com/ru/post/1664595/


All Articles