When a cool new feature is released on Android, it usually isn’t backwards compatible, but Google’s suite of support libraries allow you to implement a wide range of newer features on older devices. The libraries are ever changing, and it can be difficult to keep up with new features, and changes to older features.
In this talk we’ll take a look at the libraries available to you, and some of the more powerful components you can use from them. We’ll also take a dive into important feature updates which are commonly missed, with examples on how to update your app. Leverage the support libraries wisely, and have a modern and efficient app, even on older devices!
13. 2015
@KellyShuster
★ annotations
★ design support
★ custom tabs support
★ percent support
★ app recommendation support (TV)
★ V7 preference support
★ V14 preference support
★ V17 preference support (TV)
34. TextView textView = (TextView) findViewById(R.id.text);
ViewCompat.setElevation(textView, elevationInPx);
★ no lint warning
★ no compile error
★ just doesn’t work on pre-21 :(
121. ArraySet
@KellyShuster
★ previously only available in API 23+
★ now in v4 lib as of 25.1.0
★ more efficient than traditional HashSet
★ similar to ArrayMap, but contains only 1 item
per entry
122. ArraySet
@KellyShuster
★ previously only available in API 23+
★ now in v4 Lib as of 25.1.0
★ more efficient than traditional HashSet
★ similar to ArrayMap, but contains only 1 item
per entry
★ not for large items (slower than HashSet)
○ hundreds of items == OK
123. ArraySet
@KellyShuster
★ previously only available in API 23+
★ now in v4 Lib as of 25.1.0
★ more efficient than traditional HashSet
★ similar to ArrayMap, but contains only 1 item
per entry
★ not for large items (slower than HashSet)
○ hundreds of items == OK
★ shrinks as items are removed
○ you have no control over shrinking