Objective
After creating the simulator, I think we are already eager to develop the Android 5.0 project,
After reading this article we will be able to customize the material theme!
What does the new material theme offer?
A system control that lets you set the color palette.
The touch feedback animation for the control (designed).
Activity Transitions Animation
Let's have a look at how many material themes Android gives me!
it seems to give me a lot of commonly used themes, but these themes far enough to meet the needs of my big brothers! As for why, I think we all know. Let's customize the material theme.according to the official to provide the definition of the picture hintcolor Tone (Customize other things to the same principle)
let's start by defining several different colors.
then add a custom theme to inherit the material theme set the corresponding parts color
<?xml version= "1.0" encoding= "Utf-8"?><resources> <!--inherit from the material theme - <style name= "Apptheme" parent= "android:Theme.Material" > <item name= "android:colorprimary" > @color/ Color1 </item> <item name= "Android:colorprimarydark" > @color/color2 </item> <item name= "Android:textcolorprimary" > @color/color3 </item> <item name= "Android: Windowbackground "> @color/color4 </item> <item name=" Android:navigationbarcolor "> @color/ Color5</item> </style></resources>
Finally, configure the theme in Androidmanifast
run See effect
ok~! OK, very simple, everyone try it ~!
Ym--android 5.0 Learning using material themes