SPEAKER: We focused on a few key things
with Android Support Library version 26,
shipping new features related to text and animation,
improving parity with the Android framework
and various form factors, such as Wear and TV, and finally,
making the library leaner by moving mean SDK to 14
and dropping 1.4 K methods.
So let's start by saying what's new with text and fonts.
With Support Library 26, we have simplified working
with custom fonts.
You can now use them like any other resource,
placing them in a new font resource folder.
We also now support downloadable fonts,
meaning that you don't need to bundle your phone
files in your APK.
Instead, the system will fetch them for you
from a font provider such as Google Fonts provided
by Google Play services.
Next up before texts, emojis.
You might have seen this sad, blank, square character
whenever an app can't display an emoji.
Involving Unicode standards mean that the OS doesn't always
have an up-to-date fonts to display the newer symbols.
With the emoji compat library, your app
can get backwards compatible emoji support on devices
with APL level 19 and higher.
You now have three widgets--
emoji edit text, emoji text view, emoji button,
but also support for app compat widgets
and helper classes that allow you to work
with your own custom widgets.
Emoji compat can be configured with either bundled or
downloadable fonts.
Check out the documentation to find out how to use it.
Let's say that you want the text size of your text field
to expand or contract automatically
to fill its layout.
With Support Library 26, all you need to set up
is the text view autosize.
You can control the granularity to define a step size, together
with a minimum and maximum text size.
Or you can provide a discrete range of sizes to use.
Next topic on our list, animation.
You can now implement animations driven by physics forces,
so being velocity-based rather than time-based.
This helps create a smooth, natural-looking animation
that can correct its course, when the target changes.
It also simplifies hand-off between gestures
and animations.
We have two main types of physics-based animations,
spring and fling.
Let's say you have a view that can be dragged
around the screen, but then when you release it,
you want it to go back to its place.
Using a spring animation will make the view
feel like it's being pulled back by an invisible, but familiar
force.
You can customize the spring stiffness, damping ratio,
and its final position.
If you want to animate the property of an object
and you want the animation to end gradually,
use the fling animation.
You can customize parameters such as the starting velocity,
the friction, and the minimum and maximum animation values.
If you're working with vector graphics,
you'll be happy to hear that some of the features introduced
in your SDKs are also part of the support library.
Vector drawable compat has a new property, fill type,
that determines which regions of the image are inside the shape,
similar to the fill rule property of the SPGs.
Animated vector drawable compat has now the ability
to morph shapes and be fine bath-based interpolators,
allowing it to create rich animations that
work back to API 14.
Developing for Android Wear or Android TV?
We have some good news for you.
The Wear online library has now become a full support library
that contains some classes that you might already be using,
such as box inset layout, swipe dismiss
frame layout, wearable recycler view,
as well as some new components for action and navigation
drawers.
Several improvements have been made to Leanback's API,
including a new video playback element with seek support.
Check out the Leanback documentation to find out more.
We have some other notable changes
in this version of the support library.
The percent support module was deprecated.
So you should do its ratios on the ConstraintLayout widget
instead.
And we have a new PreferenceDataStore API
that allows you to implement your own preference storage.
But also a behavior change for our FragmentManager--
executePendingtransaction, commitNow,
and similar transaction calls are no longer
allowed during FragmentManager state changes.
Fonts, emojis, autosize text view, physics-based animation,
vector graphics, form factor changes,
and others-- that's a lot of APIs in the new support
library that allow you to implement the best
experience for users.
To find out more, check out the documentation page
and the Google IO talk on What's New in Support Library.
[MUSIC PLAYING]