HISTORY ● Google I/O 2014 – Material design concept was introduced ● AppCompat-v7 library (with AppCompat theme and Toolbar widget) was released (also recycler-view, card-view, pallete support libraries were released) ● Google I/O 2015 – Android Design Support library was released
ANDROID DESIGN SUPPORT LIBRARY ● Components to easier build Material applications ● Compatible to API 7 (but actually 15 and even 16 is recommended) ● To be used with appcompat library
NAVIGATION VIEW The menu contents can be populated by a menu resource file. R.menu.drawer_menu drawer_menu.xml To create Divider one should have two groups with different ids.
TEXT INPUT LAYOUT Layout which wraps an EditText to show floating label when the hint is hidden due to user inputting text. TextInputLayout extends LinearLayout. Design Specs: http://goo.gl/Ltv8JQ
FLOATING ACTION BUTTON ● Floating action buttons are used for a promoted action. ● FAB extends ImageView. ● Default background color is colorAccent. ● Two sizes: (Default 56dp, Small 40dp) ● Button-like interface Design Specs: http://goo.gl/NFCJ35
SNACKBAR ● Use instead of Toast (has toast- like interface) ● View is used instead of Context ● Can have action (retry, undo etc.) ● Can be dismissed by swipe ● Show time: LENGTH_SHORT, LENGTH_LONG, LENGTH_INDEFINITE ● Might be difficult to use in nested fragments Design Specs: http://goo.gl/oQjwgO
TAB LAYOUT Listeners Now: viewPager#addOnPageChangeListener Use tabLayout#setOnTabSelectedListener carefully. It has its own implementation when using with ViewPager
COORDINATOR LAYOUT Scrolling behavior is available when using: ● Recycler View ● NestedScrollView (extends FrameLayout) ● ViewPager with RecyclerView or NestedScrollView ● View (API 21+) view#setNestedScrollingEnabled(Boolean) Otherwise you have to implement required callbacks by yourself!
COLLAPSING TOOLBAR LAYOUT Collapsing Toolbar Layout is a wrapper for Toolbar. Features ● Collapsing title ● Content/Status bar scrim ● Parallax scrolling
COLLAPSING TOOLBAR LAYOUT Issues Scrolling to top from collapsed, doesn’t expand toolbar, overflow is shown Not responsive scrolling on fling (http:// stackoverflow.com/a/32454407/1533933, https://goo.gl/oEYnKj)
CONCLUSION What to do ● Use “AS IS”. Wait for update and fixes. ● Do not use. Wait for update and fixes. ● Use third party libraries https://android-arsenal.com/ ● Fix bugs by yourself https://android.googlesource.com/platform/frameworks/support/ https://android.googlesource.com/platform/frameworks/support/+/master/design/ ● Create everything by yourself