Material Design theme in android -
i learn how apply theme in app.
<style name="theme.baseapp" parent="theme.appcompat.light"> <item name="colorprimary">@color/colorprimary</item> <item name="android:colorprimary">@color/colorprimary</item> </style>
when use android:colorprimary
line.
please me.
i dont know asking for. set @color/colorprimary
in separeate colors.xml file. after assign color <item name="android:colorprimarydark">@color/colorprimary</item>
automatically used things in theme notification bar etc
example:
styles.xml
<style name="apptheme" parent="android:theme.material.light"> <item name="android:colorprimary">@color/primary</item> <item name="android:colorprimarydark">@color/primary_dark</item> <item name="android:coloraccent">@color/accent</item> </style>
colors.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="primary">#2196f3</color> <color name="primary_dark">#0d47a1</color> <color name="accent">#ff9800</color> </resources>
you can use colors keep consistent color palette on app.
Comments
Post a Comment