Material Designmaterial Design Introduction
Material Design is Google's new language, Google wants to send this to unify the user experience on various platforms, Material design is characterized by clean typography and simple layout to highlight the content.
Material Design has made recommendations for typography, materials, color matching, light efficiency, spacing, text size, interaction, and animation trajectories to help designers create applications that conform to Material style.
The Material design language encourages the use of vibrant vivid colors, and recommends the use of three tones in the same interface, and guarantees a strong hue that is generally at the bottom of the view, such as the status bar or Actionbar. It is easier to highlight the importance of content by making sharp contrasts with strong tones. For text color values, Material design suggests black on a light background and white on a dark background. Important information and headings are 87% transparent, secondary text is 54% transparent, and more minor explanatory text can be 26% transparent. For text that you want to highlight or click, use strong tones. Different levels of views can be highlighted by shading. For areas with operations and content highlighting, you can use CardView for isolation, and for areas where content is less important or operates in a single area, you can use split lines for isolation.
For more information, see the Material Design documentation:
Chinese version of website http://design.1sters.com/
English version http://www.google.com/design/spec/material-design/introduction.html
Material Design Uses
As our developer, the most concern is how to use the material design style in your project:
- Set the
targetSdkVersion
and targetSdkVersion
for 21 for the app
- Create a style in the style resource file under the values directory to inherit from the
android:Theme.Material
- Specify the theme of the app in Androidmanifest or the theme of the activity for the style we set
Google official we offer three color style material design styles:
- Black Theme
Theme.Material
- Bright Theme
Theme.Material.Light
- Bright Theme Black Actionbar
Theme.Material.Light.DarkActionBar
We can also inherit the material design style provided by the system for color modification:
android:colorPrimaryDark
The main dark hue of the app, statusbarcolor the color by default
android:statusBarColor
status bar color, default using Colorprimarydark
android:colorPrimary
The main hue of the app, actionbar the color by default
android:windowBackground
Window background Color
android:navigationBarColor
Bottom bar Color
android:colorForeground
Apply foreground color, listview split line, switch slide area default to use this color
android:colorBackground
Applied background color, the popmenu background uses that color by default
android:colorAccent
The selection effect of a general control is the default color
android:colorControlNormal
Default tint for controls
android:colorControlHighlight
Tint when the control is pressed
android:colorControlActivated
The color of the control when it is selected, using Coloraccent by default
android:colorButtonNormal
The background color of the default button
android:textColor
Button,textview's text color
android:textColorPrimaryDisableOnly
RadioButton the text of a control such as a checkbox
android:textColorPrimary
The primary text color of the app, which is used by default for Actionbar title text
A theme can be used not only for Application
and Activity
use, but also for a single control, or to set the Android:theme property on a root node control in an XML layout to modify the theme of it and all its child controls. If we are going to make a custom modification to a particular control instance, we recommend that you set it up through the control's own API.
Material Design Compatibility
Material design themes are available only at the API level of 21 and are available in the V7 Support library with a Material design theme style for some controls, and if you want to make your app uniform in all versions of Android, We can customize the effects of controls or use some third-party compatibility packs. The most effective approach now is to create the VALUE-21 resource directory for version 21, use the material design style theme, and use the V7 Theme.AppCompat.Light style theme in other editions.
Material Design Introduction