Android (Lollipop/5.0) Material Design (3) use Material themes
Address: https://developer.android.com/intl/zh-tw/training/material/theme.html
The new Material topic provides:
The system Widgets can set their color palette.
System Widgets touch feedback Animation
Activity transition Animation
You can customize a Material topic and use a palette to control it based on your brand logo.
You can use topic attributes to color the operation bar and status bar ,:
Definition of a Material topic:
@ Android: style/Theme. Material (dark version)
@ Android: style/Theme. Material. Light (light version)
@ Android: style/Theme. Material. Light. DarkActionBar
Note: Only 5.0 (api21) and above can be used for a Material topic? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> Custom +/custom + C52LXEU3R5bGU8L3A + custom =" ColorPalette "> Customize the Color Palette custom based on the color is suitable for the theme of your brand, when a Material topic is inherited, you can use the attributes in the Material topic to customize the color.
Customize the Status Bar custom Status Bar Material topic allows you to easily Customize the Status Bar, so you can specify a color suitable for your brand and provide sufficient contrast to display white Status icons,
When inherited from the Material topic and set the status bar, the custom color is android: statusBarColor. By default, android: statusBarColor inherits android: colorPrimaryDark.
You can draw the status bar by yourself. For example, if you want to clearly display the status bar in the photo, use a slight black gradient to make sure that the white status bar icon is visible. Therefore, set the attribute android: statusBarColor to @ android: color/transparent, and adjust the flags of the Window as needed. You can also use the Window. setStatusBarColor () method for animation or fading (fading ).
When you customize navigation and status bar, either make them transparent or modify the status bar only. The navigation bar must be black in all other cases.
Theme Individual Views: in layout's xml definition, you can use android: theme to specify the topic that the View applies, it will change the theme of the current View and its sub-View.