DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > Developers Guide: How to Work on Material Design for Android Apps

Developers Guide: How to Work on Material Design for Android Apps

Material Design has a systematic development approach for visuals, interaction and motion design for multi-screen apps. Support libraries have been updated for the system so that developers can create UIs enhanced with all the new features.

Cray Styris user avatar by
Cray Styris
·
May. 13, 16 · Mobile Zone · Tutorial
Like (4)
Save
Tweet
5.74K Views

Join the DZone community and get the full member experience.

Join For Free

Material Design is living up to all its promise with the wide vista of development opportunities in applications, templates, and websites. Developers around the world are excited by this latest technology by Android and have sunk their hands into Android app development on this new platform with great gusto. Our Android development team already has a few projects underway, which is giving us the chance to exploit the fresh features for a robust application.

Elements of Material Design for Building an Android App

Material Design can be used for mobile app development for Android Lollipop version 5.0 onwards. It has a systematic development approach for visuals, interaction and motion design for multi-screen apps. Support libraries have been updated for the system so that developers can create UIs enhanced with all the new features. Some of the cool new elements of Material Design for a futuristic app are—

  • On this platform there are tangible surfaces composed with digital paper and ink and there are visual cues to the application structure that will give an idea of what can be touched and how it will respond. You can use it to create flexible UIs.

  • With surface elevation, you can define the depth and add subtle effects of lighting and shadow.

<ImageView …
    android:elevation="8dp" />
  • Use the CardView support library to create a surface that holds distinct pieces of information. It can be used to extend frame layout and provides default elevation and corner radius for consistent appearance. Cards can be customized using cardElevation and cardCornerRadius attributes.

<android.support.v7.widget.CardView
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <!-- Your card content -->

</android.support.v7.widget.CardView>

With Android 5.0 you can enjoy a beautified system font Roboto with w new medium weight that can be added as (android:fontFamily=”sans-serif-medium”). New TextAppearance styles can also be applied. The title style can be applied by setting android:textAppearance=”@android:style/TextAppearance.Material.Title”

Adding colors to the UI has become simple with three distinct commands:

  1. colorrPrimary
  2. colorAccent
  3. colorPrimaryDark
  • Other controls include colorControlNormal, colorControlHighlight, colorButtonNormal, colorControlAvtivated, statusbarColor, colorEdgeEffect, navigationBarColor.

  • Dynamic color usage can be done with the new Palette support library which allows you to extract a small set of color from an image to create the UI controls. There are vibrant and muted tones with foreground text colors.

  • Declare “shared elements” to create smooth transition between two states:

album_grid.xml
…
    <ImageView
        …
        android:transitionName="@string/transition_album_cover" />
album_details.xml
…
    <ImageView
        …
        android:transitionName="@string/transition_album_cover" />

AlbumActivity.java
Intent intent = new Intent();
String transitionName = getString(R.string.transition_album_cover);
…
ActivityOptionsCompat options =
ActivityOptionsCompat.makeSceneTransitionAnimation(activity,
    albumCoverImageView,   // The view which starts the transition
    transitionName    // The transitionName of the view we’re transitioning to
    );
ActivityCompat.startActivity(activity, intent, options.toBundle());
  • Add ink ripple surface reaction and interactive controls using Theme.Material and wrapping the ripple element:

<ripple
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="@color/accent_dark">
    <item>
        <shape
            android:shape="oval">
            <solid android:color="?android:colorAccent" />
        </shape>
    </item>
</ripple>

There are many more special effects that you can add to your application with Android material design that give an immersive app experience.

To find out more about it and to discuss ideas for beautiful mobile apps, don’t forget to comment and get in touch with us.

Material Design mobile app Android Lollipop Design dev

Published at DZone with permission of Cray Styris. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Comparing Distributed Databases
  • Instancio: Test Data Generator for Java (Part 2)
  • An Overview of Key Components of a Data Pipeline
  • Ultra-Fast Microservices: When Microstream Meets Payara

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo