Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Support Library - Guts and Glory (Android Dev Summit)

Chris Banes
September 23, 2015

Support Library - Guts and Glory (Android Dev Summit)

Presented with Adam Powell.

AppCompat and the Design library are two great libraries which help you jump-start your Android app. As with all things which are backwards compatible (back to API 7!) though, there are quite a few gotchas along the way.

Chris Banes

September 23, 2015
Tweet

More Decks by Chris Banes

Other Decks in Technology

Transcript

  1. RecyclerView * Component providing data-set windowing * Improves upon similar

    framework components * Supports nested scrolling back to API v7
  2. AppCompat * UI compatibility layer for v7+ * Backports framework

    features, but no more * Goal: stay up to date with the framework
  3. AppCompat Themes Toolbar Tinting <style name="MyTheme" parent="Theme.AppCompat"> <item name="colorPrimary">...</item> <item

    name="colorPrimaryDark">...</item> <item name=“colorAccent">...</item> <item name=“colorControlNormal">...</item> <item name="colorControlActivated">...</item> </style> res/values/themes.xml
  4. Design * UI feature library * Provides features not in

    the framework * Goal: implement high-value UI components
  5. FAB NV Snackbar TL Design ViewPager viewPager = ...; PagerAdapter

    pagerAdapter = ...; viewPager.setAdapter(pagerAdapter); tabLayout.setupWithViewPager(viewPager); MyActivity.java
  6. FAB NV Snackbar TL Design ViewPager viewPager = ...; PagerAdapter

    pagerAdapter = ...; viewPager.setAdapter(pagerAdapter); tabLayout.setupWithViewPager(viewPager); MyActivity.java