Theme styles are generally inherited in two styles in the styles.xml file:
-
Inherit android theme
<style name="AppBaseTheme" parent="android:Theme.Holo">
If you rewrite the style, you need to add android: to the name . You can see that the parent parent class reference uses parent=" android: Theme.Holo"
<item name="android:actionBarStyle">@style/MyActionBar</item>
-
Inherit the AppCompat theme (theme under the v7 package)
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
If you rewrite the style, you don't need to add android: to the name. You can see that there is no "android:" in the parent class reference.
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
Summary: It should be that the theme of custom inheritance from androidSDK needs to add "android:", and the theme of custom inheritance v7 package does not need to be added .