This question has already been answered:
In the Android SDK <21, for example, there is no way to color the status bar. Or, for example, it is necessary to use a certain attribute, retaining all those working on older SDKs. Well, let's take, for example, the same colorPrimaryDark to indicate the color of the statusbar.
res / values / styles.xml
<resources> <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar"> <item name="colorAccent">@color/colorAccent</item> <item name="colorPrimary">@color/colorPrimary</item> </style> </resources> res / values-v21 / styles.xml
<resources> <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar"> <item name="colorAccent">@color/colorAccent</item> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> </style> </resources> How can I not write colorAccent and colorPrimary in values-v21 / styles.xml?
In general, how to make style inheritance between styles.xml for different API Level?