[MUSIC PLAYING]
CHET HAASE: Hey, welcome to another "Now in Android."
This is episode number 19.
Not a lot happened in the last couple weeks,
because the team was pretty focused on creating stuff
for launch content.
But I'll tell you about the stuff that did happen.
Starting with launch content, you have probably
heard this already, but we were going
to have the Android 11 beta launch show on June 3.
That has been postponed.
Please check out the site for details
about when that thing is coming out
and what there will be when it does arrive.
That should be updated very soon.
Also, Android Studio, the 4.0 release
just came into the stable channel, so check that out.
I've talked about this release in various "Now in Android"
posts already, but very quickly, some of the stuff
that you can look forward to in that release
include motion editors.
So Motion Layout is a subclass of constraint layout
that allows you to create easy transitions between states.
Think of it as the Transitions API on steroids.
It allows you to create a before state and an after state,
and then animate between them either automatically, or--
this is the really powerful part--
you can customize that animation.
And you can have it react to user gestures.
So you can actually basically scrub the animation.
You can scroll that screen, and it'll
run the animation in direct interaction
with the user actions, and then it can animate from there.
Very cool, but really tedious to do in XML code.
It was always meant to be driven by a visual tool.
And now that visual tool is available in Android Studio
4.0.
So check that out.
Layout Inspector-- substantially rewritten
to offer such features as live updates.
So you can change the UI in the device
and see those reflected in the tool.
You can also use the 3D Containment Hierarchy Viewer,
so you can actually get a better feel
for how all the different views and view groups
relate to each other.
And you can also see how the property attributes--
those resources, where are they defined, and why, and how?
You can click through to go to the code that defines them.
It helps you understand your code a lot better.
Build Analyzer-- another powerful feature
that tells you where the [INAUDIBLE] of your
build performance are.
Maybe it's in a library that you dragged in,
or something that you have impact
on that you can change to affect your build performance locally.
There is a blog post by Adarsh Fernando
where he goes over a lot of the details.
And there's also a video by Yacine Rezgui.
He also gives a great overview of a lot
of the powerful features in 4.0.
So check those out.
Articles and videos-- Murat Yener
posted an article in the Kotlin Vocabulary series
on reification.
So generics are powerful.
They allow you to add compile-time type information
to APIs and data structures that may not otherwise
support that information.
That's great, except at runtime, you
don't have access to that type information
because of something called type erasure.
So basically, the type doesn't make it into the byte code,
and so you can't retrieve it at runtime.
Kotlin has a workaround for that,
using the reified keyword, as well as inline classes
capabilities.
So if you declare something to be both reified and inline,
it actually takes the type information
and embeds it in the byte code so that you
can retrieve it at runtime.
Murat also posted a video in the similarly named Kotlin
Vocabulary video series.
And this basically goes hand in hand with the article
that I talked about last time on object,
on the Kotlin keyword object.
So check that out.
There is an updated sample.
So there was already a sample from Android 10
on how to use the Bubbles API, but Bubbles
was a developer option.
It was an optional API at that point.
We wanted developers to play with it,
but users weren't really using it.
Now it's a full feature in Android 11,
and you should learn about how to use it
and about some of the changes that
have taken place between Android 10 and Android 11.
So that sample has been updated to be very Android 11-friendly,
and you should check that out.
Speaking of Bubbles, there's also
a podcast that came out recently on Bubbles called "Bubbles."
So check out ADB 140, in which Tor and Romain and I talk
to Mady as well as Artur on the system UI team about how
Bubbles works under the hood, how you can use it,
and how you can use the API and the capabilities
to take conversations with people in your application
and expose them into the UI for Android overall.
As usual, all of the links for all the stuff that I talked
about are in the article.
So check out the Medium article for Episode 19.
And if you like the video, go ahead and like and share
it and subscribe to the Android Developers channel on YouTube.
Thanks.
[MUSIC PLAYING]