Android Basics – An Introduction to Material Design

Material Design was launched with Android 5.0 (API level 21). The purpose being to provide consistent look and feel to all the Apps. So your App looks consistent with a Google App like Gmail.

It uses Animation and 3D effects.

Android provides the following elements for you to build material design apps:

  1. A new theme – Provides a new style for your App.
  2. New widgets for complex views
  3. New APIs for custom shadows and animations

Two of the most important Material Design widgets are Recycler and Card Views.

RecyclerView widget is a more pluggable version of ListView that supports different layout types and provides performance improvements.

CardView widget lets you display important pieces of information inside cards that have a consistent look and feel.

In addition to the X and Y properties, views in Android now have a Z property. Views with higher Z values cast bigger shadows and appear on top of other views.
To learn more about the principles of Material Design visit the following URL

Source : Android Documentation

Learn how to use the new Android Themes in your App

Newer versions of Android have additional themes available to applications, and you might want to use these while running on those platforms while still being compatible with older versions.  – Android Documentation

Since your app targets devices which run on API level 17 and above you don’t need to provide backward compatibility. You can make use of the new Themes.

Let’s see how.

You are going to change the app so that it uses Theme.Holo.Light by default and switches to Theme.Material.Light if app is running on API level 21.

  1. Open MainActivity class. Change ActionBarActivity to Activity.
  2. You will notice there are two style.xml files. One which supports v21 and other for lower versions (default).

Change default style.xml to use the following parent theme – android.Theme.Holo.Light

Change v21 style.xml to use the following parent theme – android.Theme.Material.Light

Follow the video to understand better. Source Code is available here