Create a Material Design-style Android app-application topic
All my articles first published on my blog, welcome to attention, address: http://blog.isming.me
Android 5 was officially released yesterday, And the android developer website was also updated. The Android Application Guide for creating Material Design was added, and the Support Library was also updated, added some Material Design-style controls and animations in the support library. Here we will give you a brief introduction to how to develop a material design-style Android Application.
Android 5 adopts the Material Design style
Android provides three Material Design Theme styles.
They are:
@android:style/Theme.Material (dark version) @android:style/Theme.Material.Light (light version) @android:style/Theme.Material.Light.DarkActionBar
Light material theme
Light material theme
Dark material theme
Dark material theme
We can use these three Theme to define our Theme, for example:
We can modify the color of the word or background at each position. The name of each position is shown in:
Customizing the material theme
I will give a brief introduction to it. Let's explore it more specifically.
Earlier versions use the Material Design style
To use the Material Design style in earlier versions, you need to use the latest support library (version 21). You can directly introduce the project, or use gradle to build and increase the compile dependency:
dependencies { compile 'com.android.support:appcompat-v7:+' compile 'com.android.support:cardview-v7:+' compile 'com.android.support:recyclerview-v7:+'}
Put the above AppTheme style in res/values-v21/style. xml, and add an AppTheme IN res/values/style. xml, as follows:
In this way, Material Design can also be implemented in many ways. However, because low versions do not support immersive status bars, some results still cannot be implemented.
PS: write so much. Use CardView and RecyclerView for the next write. Create a List and Card layout for Material Design. (I am not good at English, and may not understand it in some places .)
Refer:Http://developer.android.com/training/material/theme.html
Original article address: Workshop.