Website address:https://developer.android.com/intl/zh-tw/training/material/theme.html
The new material theme provides:
System widgets can set their palette
Touch Feedback animation for system widgets
Transition animations for activity
You can customize the material theme and use a palette to control it based on your brand identity.
You can use the theme properties to color the action bar and status bar:
Definition of Material theme:
@android: style/theme.material (Dark Version)
@android: Style/theme.material.light (Light version)
@android: Style/theme.material.light.darkactionbar
Note: Material theme can only be 5.0 (API21) and above to use SUPPORT-V7 to provide compatible support, on target-api<21 can build a res/values-21 directory to place the material related style
Customize The color Palette a custom palette
Customize color -based themes for your brand, and when you inherit the material theme, you can use the properties in the material theme to customize colors
Customize the status bar custom state bars
The material theme allows you to easily customize the status bar, so you can specify a color that fits your brand and provide enough contrast to display the white status icon,
When you inherit from a material theme, you customize the color when you set the status bar: Android:statusbarcolor. By default, Android:statusbarcolor inherits the Android:colorprimarydark.
You can draw the status bar yourself. For example, if you want to display the status bar clearly in a photo, use a subtle black gradient to make sure the White status bar icon is visible. To do this, set the Android:statusbarcolor property to @android:color/transparent and adjust the window's flags as needed. For animations or fades (fading), you can also use the Window.setstatusbarcolor () method
When you customize the navigation and status bar, either make them transparent or just modify the status bar. The navigation bar must remain black in all other cases.
Theme individual views Personal theme View
In the XML definition of layout, you can use Android:theme to specify the theme that the view applies to, specifying that it will change the theme of the current view and its child view.
Android (lollipop/5.0) Material Design (iii) using Material themes