Create a Material Design-style Android app-application topic

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.