IAN LAKE: What if you had a Google engineer
to support your app development and they
dealt with supporting every version of Android
or building those basic components so you
don't have to?
We've got you covered.
What if you, like me, had spent ages building
a great modern UI, only to find more edge
cases to handle to get it great on every device?
We've got you covered.
What if your boss says you need to support Google Cast, Ware,
TV, and Auto by tomorrow?
We've got you covered.
The Android Support Library gives you
the tools to build apps faster.
We've packaged the essential components
you need to build a great app that
works on the huge variety of Android devices out there.
It's like having Googlers helping
you every step of the way.
I'm Ian Lake.
I'm here to talk to you about what the Support Library is,
and why you should use it.
OK.
Hear me out.
Shouldn't the newest version of Android
have everything you need?
It does have quite a bit.
But think of it more like the foundation of a house.
A solid but inflexible base to build your app on top of.
The Support Library is the framing
you actually build your app around,
letting you build apps faster and focus
on the important part, the unique experiences
only your app provides.
So maybe this framework is helpful.
But what does that exactly entail?
Well, we've talked about the Support Library
as single library.
It's actually a whole constellation of libraries.
Yeah.
There's a lot there.
Thankfully, you don't have to use all of it.
You can choose exactly what makes sense for your app.
So you may have noticed this library
at the base of just about everything?
That's the support-v4 library, providing compatibility shims
and new functionality for devices
all the way back to Android 1.6.
It includes support for application components--
like fragments-- notification enhancements for Ware and Auto,
and more.
Support for common UI patterns, like paging
through content, tabs, and navigation drawers.
And makes it easy to load and share content.
As well as a ton of classes to make your life easier.
And you see all those components with stars next to them?
Those are unique to the Support Library,
making this an essential part of any app,
even if you're targeting only the latest Android versions.
So they've got the big one out of the way.
Phew.
Believe me, if they were all like that,
we'd be here all day.
You may have heard of this material design thing.
A fresh new look for Android, iOS, the web, and everything.
The appcompal library makes it easy to give your app
a material code of paint all the way back to API 7,
through a custom theme and a backward compatible version
of the AppBar framework.
I can't tell you how critical this
is for making a modern-looking Android app that looks great
on the latest devices, yet doesn't have you pulling
your hair out supporting the thousands of Android devices
out there.
So what else could there be?
You've got a beautiful app using familiar UI patterns.
So the question becomes, how do you take it to the next level?
Perhaps you have some fantastic video content
that would look great on a TV.
The mediarouter library provides the Cast button,
needed to get your content to Google Cast
devices like Chromecast and the Nexus player.
Or take it a step farther, and build out a great Android TV
app using the leanback library.
Maybe your app has fantastic pictures.
In that case, you might want to use the palette library
to pull out prominent colors from those pictures and color
coordinate your UI.
Perhaps you need a bit more UI polish
to really make your app pop off the screen.
The cardview library builds a consistent card look
that fits in perfectly with material design.
The gridlayout library gives you an easy way
to align elements to a grid without requiring
a complicated relative layout or multiple linear layouts.
The recyclerview serves as a more flexible and animated
replacement to listview, making it
easy to build lists and grids that react to changing
data in a beautiful way.
But maybe pixel pushing isn't your thing.
You can use annotations from the annotations library
to give extra hints to the compiler
and catch even more errors at build time,
rather than your app misbehaving at run time.
Or you want to do some serious parallel processing.
Renderscript is perfect for that.
Finally, if your code should ever
grow beyond the 65,000 method decks limit
that exists on pre-Lollipop devices,
the multidex library can keep your app building.
So there's a ton out there, all serving
as the framing which can help you build apps faster and work
across a wide range of Android devices,
letting you focus on the unique experiences
only your app provides.
You can learn even more about all the parts of the Support
Library on the developer site.
I'm excited to see what you can build
with the help of the Android Support Library.