字幕列表 影片播放
CHET HAASE: Good afternoon, and welcome to the first session,
right?
What's New In Android?
The session that I like to think of as the Android
keynote for the people that couldn't actually
wake up that early.
So congratulations for actually waking up this early.
We'll see how it goes.
[APPLAUSE]
Yes, well done.
Give yourselves a hand.
Absolutely.
This is a talk that traditionally
has been done by me and Romain Guy,
who could not make it this year because we didn't ask him to.
Though we did get an appropriate stand-in for Romain.
We found someone that can fake a decent French accent.
DAN SANDLER: [SPEAKING FRENCH] Eiffel Tower.
CHET HAASE: So with that, let's introduce ourselves,
because obviously you have no idea who we are.
I am Chet Haase.
I am on the UI Toolkit team in Android.
DAN SANDLER: I'm Dan Sandler.
I'm on the Android System UI team.
CHET HAASE: That accent didn't last very long.
DAN SANDLER: It didn't.
I couldn't.
CHET HAASE: All right, so one of the questions that comes up--
it just came up at lunchtime, actually,
down in the cafeteria-- is OK, so there's an L release.
What does L stand for?
And I'm here to tell you-- can we
have like, a drum roll, or something?
[AUDIENCE ATTEMPTS DRUM ROLL]
L if I know.
But for today, we are calling this the L Developer Preview
release.
We heard about this in the keynote,
and we can see by the graphics on the screen that aren't quite
professionally done that it is not a final release.
It is instead a preview release where things work pretty well,
but it's not done yet.
We're hard at work finishing the L release.
And in the meantime, we're exposing it to you
to actually use in the meantime, get your apps running and happy
on it, and most importantly, to send us
feedback about what's not working exactly perfectly
so that we can actually nail that down by the time
we ship it.
So in the meantime today, we wanted
to give a session talking about all the bits
that are new in this preview release
that you can get your hands on and play with,
and there's a lot of material in here.
We'll see how fast--
DAN SANDLER: We have about six hours of material
to cover in 45 minutes, so you're gonna have to hang on.
CHET HAASE: So first of all, let's
start with graphics and UI, because I
like to start with graphics and UI,
and I usually like to end with that as well.
So we heard about the material design stuff in the keynote,
and we wanted to touch on a couple of those elements
in here.
I also want to point out, I'll give you
references at the end of this section,
about where to go for more information
during the conference.
In fact, one of the whole points of this session
is to give you just a little bit more detailed info on all
of the feature areas that we find interesting to talk
about, and also the references to what
other sessions and what other videos you should check out,
or sandboxes that have further information,
or where you can simply find Diane on the show floor
if you want to ask her directly.
So in the material area, we have a new theme,
we have some new widgets for you,
and we also have some new APIs, which
you can use at your option.
The theme exposes new colors.
There's an idea in material design
that all the assets are by default grayscale,
and then they can be tinted.
So it's very easy to brand your application,
or your application state, with colors,
as opposed to baking the colors directly into the assets.
So that's much easier now.
There's new icons out there.
Some of them are animated, part of
the rich interactive experience that we have.
With material design, we have touch feedback ripples.
We'll see a little bit more about-- give the user
a sense of interacting with the UI
and knowing exactly what's going on in the UI at all times.
And also, activity transitions with shared hero elements.
We'll see a little bit more about that.
In the widget space, we have a couple
of widgets that are very important.
One of them is minor.
It's CardView.
There's not a lot there.
It's basically a container with rounded corners,
and it's raised up off the view hierarchy plane a little bit
to give a shadowed look to it.
This is not something that's too hard to do in your own code,
but having CardView there allows you to have this look
and feel in a consistent way that other applications are
using it as well.
RecyclerView is a little bit larger.
If we can actually just do an informal poll of
who has actually used ListView?
OK.
If I can just count.
Hang on.
OK, so that was basically everyone in the audience.
Now if we can get a count of the people
who have enjoyed that experience?
I count two, which is actually one more than I expected.
So you can think of RecyclerView as being ListView2.
This is more extensible, more flexible.
We have layout managers that you can plug in
to get different layouts.
It's amazing.
You can actually linearly lay out
both vertically and horizontally.
Incredible.
[CHEERING]
DAN SANDLER: Absolutely.
CHET HAASE: Because on the Android team,
we think not only about why, but also about X. So we have--
[GROANING]
We have a linear-- why the groan?
We have a linear layout manager in there right now.
We have some other layout managers
that we're working on that will come out with it,
or you can write your own custom layout manager.
There's also animations baked into it.
Some very simple add remove animations right now.
I don't know if anybody has actually
tried to implement animations in ListView.
I know I personally have done several videos trying
to explain how to do this nearly impossible task.
What we'd like is for that to simply be automatic,
so we've started down the road for that.
And both of these, most importantly,
unlike a lot of the new APIs, which are obviously
just part of the L release, these widgets
are actually in the support library in V7.
So you can use those--
[APPLAUSE]
DAN SANDLER: How much did you pay them?
We're getting a lot of applause lines here.
CHET HAASE: I actually don't know what they're clapping at.
It has nothing to do with what I'm saying.
Something else is going on--
DAN SANDLER: World Cup.
CHET HAASE: So you can use those in your material applications,
in your L applications, but you can also
use them in code for earlier releases as well.
So have at it.
Also, in the graphics area, we have real time soft shadows.
We heard a little bit about that in the keynote.
We'll hear more tomorrow in some sessions tomorrow.
It's the ability to give elevation to views to pop them
up off the view hierarchy plane.
Not only giving them elevation and Z value,
and then allowing them to cast a shadow, a soft shadow based
on that elevation, but also to draw outside their bounds.
One of the tricky parts about doing things like shadows
is, or if you want <