14
Design Support Library What does it provide: Text Input Layer Floating Action Button Snackbar Material Tabs Navigation View Animation effects

I/O '15 - Design Support Library

Embed Size (px)

Citation preview

Page 1: I/O '15 - Design Support Library

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

Page 2: I/O '15 - Design Support Library

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

Page 3: I/O '15 - Design Support Library

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

Page 4: I/O '15 - Design Support Library

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

Page 5: I/O '15 - Design Support Library

SnackbarGoodbye Toast, Hello Snackbar

Page 6: I/O '15 - Design Support Library

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

Binds with your ViewPager too

Page 7: I/O '15 - Design Support Library

Navigation ViewNavigation Drawer, made easy.

Add items via code or via XML

Page 8: I/O '15 - Design Support Library

Navigation View - DeclaringAdd NavigationView to your DrawerLayout

Page 9: I/O '15 - Design Support Library

Navigation View - Add ItemsAdd Menu Items to your Navigation View

Page 10: I/O '15 - Design Support Library

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:

Page 11: I/O '15 - Design Support Library

CoordinatorLayout and the app bar

Page 12: I/O '15 - Design Support Library

Collapsing Toolbar Layout

Page 13: I/O '15 - Design Support Library

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!