Android (Lollipop/5.0) Material Design (3) uses the Material topic and androidlollipop
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: Material themes can only be 5.0 (api21) and above to use the support-v7 to provide compatibility support, on target-api <21, you can create a res/values-21 directory and place the Style related to Material.
Customize the Color Palette custom Palette
Custom color-based theme suitable for your brand. When inheriting the Material theme, you can use the attributes in the Material theme to customize the color.
Customize the Status Bar custom Status Bar
The Material topic allows you to easily customize the status bar, so you can specify a color that suits 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 personal Theme View
In the xml definition of layout, you can use android: theme to specify the topic applicable to the View. After this parameter is specified, the theme of the current View and its subview is changed.