I/O '15 - Design Support Library

Preview:

Citation preview

Design Support LibraryWhat does it provide:● Text Input Layer● Floating Action Button● Snackbar● Material Tabs● Navigation View● Animation effects

Design Support LibraryWhy is it great? Mainly because:● Takes your material design back till v7● Gives you Standard Material Design components● Takes away a lot of headache and code

Text Input LayerWrap your edit text in TextInputLayout to have the hint floating above it

Floating Action ButtonYour same Floating Action Button, now in support library

SnackbarGoodbye Toast, Hello Snackbar

Tabs - The Material Design WayGet your navigation tabs in few lines of code. Scrolling or fixed, your choice

Binds with your ViewPager too

Navigation ViewNavigation Drawer, made easy.

Add items via code or via XML

Navigation View - DeclaringAdd NavigationView to your DrawerLayout

Navigation View - Add ItemsAdd Menu Items to your Navigation View

Animation/Effects - CoordinatorLayoutChildren of this layout can define behavior and dependency

Upon certain actions, the children can move around depending on each other

You get to define the behavior

Let’s learn from Examples:

CoordinatorLayout and the app bar

Collapsing Toolbar Layout

Add Design Support LibraryUpdate Android Support Library.Add compile 'com.android.support:design:22.2.0' to build.gradle

Things to remember:● Dependencies automatically added:

○ AppCompat○ Support v4

Psst. These controls are visible in Android Studio layout editor!