Book Image

Learning Material Design

By : Mew, Nadir Belhaj
Book Image

Learning Material Design

By: Mew, Nadir Belhaj

Overview of this book

Google's Material Design language has taken the web development and design worlds by storm. Now available on many more platforms than Android, Material Design uses color, light, and movements to not only generate beautiful interfaces, but to provide intuitive navigation for the user. Learning Material Design will teach you the fundamental theories of Material Design using code samples to put these theories into practice. Focusing primarily on Android Studio, you’ll create mobile interfaces using the most widely used and powerful material components, such as sliding drawers and floating action buttons. Each section will introduce the relevant Java classes and APIs required to implement these components. With the rules regarding structure, layout, iconography, and typography covered, we then move into animation and transition, possibly Material Design's most powerful concept, allowing complex hierarchies to be displayed simply and stylishly. With all the basic technologies and concepts mastered, the book concludes by showing you how these skills can be applied to other platforms, in particular web apps, using the powerful Polymer library.
Table of Contents (12 chapters)

Generating lists


There is quite a lot of code involved in putting these components together, and the best way to see how this is done is to get straight down to it:

  1. Create a new project in Android Studio and apply a material theme by creating a colors.xml file and editing the style files to apply it. You will need to ensure that you have the following dependencies applied in your build.gradle file:

    dependencies {
    compilefileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:design:23.0.0'
    compile 'com.android.support:recyclerview-v7:23.0.0'
    compile 'com.android.support:cardview-v7:23.0.0'
    }
  2. As before, create a separate toolbar layout called toolbar.xml, along the lines of the code here:

    <?xml version="1.0" encoding="utf-8"?>
    <android.support.v7.widget.Toolbarxmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="56dp"
    android:background="@color/primary" /...