Use Material Design to Design applications:
Update Your App for the Android L Developer Preview
Upgrade existing applications for the Android L Developer Preview version. You can refer to the material design guidelines to design new la S and enhance the user experience through touch feedback and UI animation.
Create New Apps for the Android L Developer Preview
For new Android L developer previewed applications, the Material design guidelines provide a cohesive design framework for your apps to comply with these guidelines and new functions in your app design and development.
Apply the Material Theme
To use material theme in the app, you must declare android: Theme. Material in style:
<!-- res/values/styles.xml --><resources> <!-- your app's theme inherits from the Material theme --> <style name="AppTheme" parent="android:Theme.Material"> <!-- theme customizations --> </style></resources>
Material theme provides the new system widgets, which allows you to use the color palette and default animation during touch feedback and Activity switching. For more details, refer to Material Theme.
Design Your Layouts
Except for the use or custom Material theme, your layout must be consistent with the Material theme guidelines. When designing an application, pay attention to the following points:
- Baseline grids
- Keylines
- Spacing
- Touch target size
- Layout structure
Specify Elevation in Your Views
A view can cast a shadow. The elevation value of a view determines the size of its shadow and the order in which it is drawn. In your layout, you can set the android: elevation attribute to define the projection elevation.
<TextView android:id="@+id/my_textview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/next" android:background="@color/white" android:elevation="5dp" />
The new translationZ attribute allows you to create an animation for the view that reflects the temporary changes in the elevation angle, which is very useful for touch gestures. For more details, see Views and Shadows.
Use the New UI Widgets
RecyclerView improves the performance of displaying dynamic views for ListView, and is easier to use. CardView is a card
View to display information in the card. You can use the following method to create a CardView.
<android.support.v7.widget.CardView android:id="@+id/card_view" android:layout_width="200dp" android:layout_height="200dp" card_view:cardCornerRadius="3dp"> ...</android.support.v7.widget.CardView>
For more details, see UI Widgets.
Customize Your Animations
Android L Developer Preview provides a new apis to support creating custom animations. You can create an activity startup transition and exit transition.
// inside your activitygetWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);// set an exit transitiongetWindow().setExitTransition(new Explode());
When you start another Activity, exit transition is activated.
For more new features, see Animations.
/*** @ Author Zhang xingye * http://blog.csdn.net/xyz_lmn* my Sina Weibo:
@ Zhang xingye TBOW*/
Refer:
Http://developer.android.com/preview/material/get-started.htm