Material Design in Android
An Introduction on Material Design:
Google introduced material design in last year’s I/O, labeling it as an interface that integrates “tactile surfaces, bold graphic design and fluid motion to create beautiful, intuitive experiences.” Material design is the new “user experience philosophy” for Android apps!!
To create a visual language that synthesizes classic principles of good design with the innovation and possibility of technology and science.
In Material Design, lots of new things were introduced like Material Theme, new widgets, custom shadows, vector drawables and custom animations.
Material Design for Android:
Material design is a comprehensive guide for visual, motion, and interaction design across platforms and devices. Android now includes support for material design apps.
Android provides the following elements for you to build material design apps:
- A new Material Theme
- New widgets for complex views
- New APIs for custom shadows and animations
- Material Theme:
The material theme provides a new style for your app, system widgets that let you set their color palette, and default animations for touch feedback and activity changeovers. The new material theme provides:
- System widgets that let you set their color palette
- Touch feedback animations for the system widgets
- Activity transition animations
- Lists and Cards:
Android provides two new widgets for displaying cards and lists with material design styles and animations. To create complex lists and cards with material design styles in your apps, you can use the Recycler View and Card View widgets.
The RecyclerView class simplifies the display and handling of large data sets by providing:
- Layout managers for positioning items
- Default animations for common item operations, such as removal or addition of items
- View Shadows:
In addition to the X and Y properties, views in Android now have a Z property. This new property represents the elevation of a view, which determines:
- The size of the shadow: views with higher Z values cast bigger shadows.
- The drawing order: views with higher Z values appear on top of other views.
The elevation of a view, represented by the Z property, determines the visual appearance of its shadow: views with higher Z values cast larger, softer shadows. Views with higher Z values occlude views with lower Z values; however, the Z value of a view does not affect the view’s size.
Shadows are drawn by the parent of the raised view, and thus subject to standard view clipping, clipped by the parent by default.
Elevation is also useful to create animations where widgets temporarily rise above the view plane when performing some action.
The new animation APIs let you create custom animations for touch feedback in UI controls, changes in view state, and activity transitions.
These APIs let you:
- Respond to touch events in your views with touch feedback animations.
- Hide and show views with circular reveal animations.
- Switch between activities with custom activity transition animations.
- Create more natural animations with curved motion.
- Animate changes in one or more view properties with view state change animations.
- Show animations in state list drawables between view state changes.
Touch feedback animations are built into several standard views, such as buttons. The new APIs let you customize these animations and add them to your custom views.
These new abilities for drawables help you implement material design apps:
- Vector drawables are scalable without losing definition and are perfect for single-color in-app icons.
- Drawable tinting lets you define bitmaps as an alpha mask and tint them with a color at runtime.
- Color extraction lets you automatically extract prominent colors from a bitmap image.
The following capabilities for drawables help you implement material design in your apps:
- Drawable tinting
- Prominent color extraction
- Vector drawables