background preloader

5 Android Material Design Tutorial 01~05 /39

Facebook Twitter

#1 Android Material Design Tutorial 1 with Android Studio [HD 1080p]
#2 Android Material Design Colors: Android Tutorial For Beginners [HD 1080p]
#3 Android ToolBar Example: Android Tutorial For Beginners [HD 1080p]
#4 Android Customize Toolbar: Android Material Design Tutorial [HD 1080p]
#5 Adding Actions to ToolBar/ActionBar/AppBar : Android Tutorials [HD 1080p]

Color - Style - Google design guidelines. ActionBar. Public void setHomeButtonEnabled (boolean enabled) ActionBar. Public abstract void setDisplayHomeAsUpEnabled (boolean showHomeAsUp) NavUtils. Public static void navigateUpFromSameTask (Activity sourceActivity) Toolbar. Class Overview A standard toolbar for use within application content. Toolbar supports a more focused feature set than ActionBar. From start to end, a toolbar may contain a combination of the following optional elements: A navigation button.

In modern Android UIs developers should lean more on a visually distinct color scheme for toolbars than on their application icon. Summary Public Constructors Public Methods public void collapseActionView () Collapse a currently expanded action view. An action view may be expanded either directly from the MenuItem it belongs to or by user action. public void dismissPopupMenus () Dismiss all currently showing popup menus, including overflow or submenus. public Toolbar.LayoutParams generateLayoutParams (AttributeSet attrs) Returns a new set of layout parameters based on the supplied attributes set.

Parameters public int getContentInsetEnd () Get the ending content inset for this toolbar. Returns The ending content inset for this toolbar public Drawable getLogo () Metrics & keylines - Layout - Google design guidelines. The minimum touch target size is 48dp. Keep this in mind when spacing icons (24dp) or avatars (40dp) in a layout. The touch targets shouldn’t overlap. On average, 48dp translates to a physical size of about 9mm (with some variability). This is comfortably in the range of recommended target sizes (7-10mm) for touchscreen objects and ensures that users will be able to reliably and accurately target them with their fingers. If you design your elements to be at least 48dp high and wide, you can ensure that: Your targets will never be smaller than the minimum recommended target size of 7mm regardless of the screen on which they are displayed.You strike a good compromise between overall information density and targetability of UI elements on the other.

Using the Material Theme. The new material theme provides: System widgets that let you set their color palette Touch feedback animations for the system widgets Activity transition animations You can customize the look of the material theme according to your brand identity with a color palette you control. You can tint the action bar and the status bar using theme attributes, as shown in Figure 3. The system widgets have a new design and touch feedback animations. You can customize the color palette, the touch feedback animations, and the activity transitions for your app. The material theme is defined as: @android:style/Theme.Material (dark version) @android:style/Theme.Material.Light (light version) @android:style/Theme.Material.Light.DarkActionBar For a list of material styles that you can use, see the API reference for R.style.

Figure 1. Figure 2. Note: The material theme is only available in Android 5.0 (API level 21) and above. Customize the Color Palette <resources> <! Figure 3. Customize the Status Bar. Structure - Layout - Google design guidelines. The top level communicates your app’s capabilities by introducing the user to the major functional areas. Some apps will be very focused and have modest navigation needs. In other apps, the top level will consist of multiple views, and you'll want to make sure that the user can navigate between them efficiently. Select the approach that best matches your app's navigation needs. Focus on a single view with embedded navigation. By putting all the necessary navigation directly inline with other app content, you make it extremely visible to the user. Use in-context navigation if: Your app has a strong primary view, and no or few alternate ones.Your users can complete the most common tasks easily within the main view.You expect users will use your app very infrequently and will appreciate well-exposed paths.

Use tabs to switch between a small number of equally important views. Use tabs if: Manage more complex structure through a left navigation drawer. Use a navigation drawer if: