Wednesday, May 25, 2016

Trending Topics of Android Material Design and RecyclerView

First lets discuss on Material Design and its use in developing Android Application.

Material design is an approach to visual, interaction and motion design for the multi-screen devices. Android 5.0 Lollipop and the updated support libraries help you to create material UIs.  the major elements of material design and the APIs and widgets that you can use to implement them in your app.

Tangible surfaces

In material design, UIs are made of digital paper & ink. The surfaces and the shadows they cast provide visual view to the structure of the application, what you can touch and how it will move. This digital material can move, expand and reform to create flexible UIs.

Shadows

The surface’s position and depth result in subtle changes in lighting and shadows. The new elevation property lets you specify a view’s position on the Z-axis and the framework then casts a real-time dynamic shadow on items behind it. You can set the elevation declaratively in your layouts, defined in dips:
You can also set by using getElevation()/setElevation().For example if you set a circular shape drawable as the background for a floating action button, then it would cast an appropriate shadow. If you need finer control of a view’s shadow, you can set a ViewOutlineProvider which can customise the Outline in getOutline().

Cards

Cards are a common pattern for creating surfaces holding a distinct piece of information. The new CardView support library allows you to create them easily, providing outlines and shadows for you.
CardView extends FrameLayout and provides default elevation and corner radius for you so that cards have a consistent appearance across the platform. You can customise these via the cardElevation and cardCornerRadius attributes, if required. Note that Cards are not the only way of achieving dimensionality.

Print-as per Design

Material utilises classic principles from print design to create clean, simple layouts that put your content front and center. Bold deliberate color choices, intentional whitespace, tasteful typography and a strong baseline grid create hierarchy, meaning and focus.

Typography

Android 5.0 updates the system font Roboto to beautifully and clearly display text no matter the display size. A new medium weight has been added (android:fontFamily=”sans-serif-medium”) and new TextAppearance styles implement the recommended typographic scale for balancing content density and reading comfort. For instance you can easily use the ‘Title’ style by setting android:textAppearance=”@android:style/TextAppearance.Material.Title”. These styles are available on older platforms through the AppCompat support library, e.g. “@style/TextAppearance.AppCompat.Title”.


 In short, Material Design is Material Theme, new widgets, custom shadows, vector drawables and custom animations.

RecyclerView

 The display of elements in a list or grids is a very common pattern in mobile applications. This description uses the term list but this description is also valid for grids or other structured representations of data.

 Typically the user interacts with the list, swipe gestures or clicks. Individual list items can be selected. This selection can update the toolbar or can trigger a detailed screen for the selection.

 The RecyclerView class, delivered as part of the v7 support library suite, is an improved version of the ListView and the GridView classes provided by the Android framework.
 it comes with default animations for removing and adding elements and it recycles views directly.
RecyclerView provides layout managers for positioning items and default animations for common item operations like removal and additions of items. 

No comments: