Google I/O 2014 – What’s New in Android (Full Transcript)

Dan Sandler: Absolutely.

Chet Haase: Because on the Android team, we think not only about why, but also about X. So we have — 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 —

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 to scale that view, well, then you need to tell the containment hierarchy of that view not to clip it. Well, giving it elevation pops it into– what you can picture is like an aquarium, a 3D volume that sits on top of the view hierarchy. And all of a sudden, you’ve got much more flexibility about how that thing is drawn, about how it’s clipped, and about the ordering with which it and its shadow is drawn in the hierarchy.

We have animations. Yay, more animation stuff. The biggest one in this area is activity transitions — in particular, the ability to share elements between activities. So we’ve seen some work. I think it was last year at I/O there was an animation talk, and there was some “DevBytes” around this where we showed techniques for passing information between activities such that you could pass information about elements, and you could sort of fake this animation to look like it transitions seamlessly from one activity to another.

ALSO READ:   Apple iPhone 6 Keynote - September 2014 Launch Event (Full Transcript)

So that technique has been baked into the platform, so there’s a standard API way for you to say this is my shared element, or a set of shared elements, and you can pass those between activities, and they can share them. They can animate them between the activities. You can animate other items in and out between the activities, and you can customize the entire experience, making it all part of the material idea of making all the transitions seamless for the user as they go from state to state to state in their application, or in your application.

Also, there’s new animation curve capabilities, both motion and timing curves, so you can have a much more custom path-based curve in the timing area. You can also move things in x and y along a curve, which is a little bit tricky. Possible, but tricky before.

And finally, there’s animated reveal capabilities. So you can reveal the next state of an activity or a view by having a circular reveal that exposes it over time. And I think there’s a video of some of this stuff. So this is sort of an epilepsy-causing animation here that I looped, just showing some of the shared element transition stuff where we’re popping the view in and out.

If you look closely, you can see a shadow that’s popped as we’re elevating it. And then as it goes back down to the view hierarchy, we launch the next activity and pass that view over as the shared element between these two separate activities. We have some new icon capabilities. There’s a couple of different ways of animating states in icons. One of them you see in the check boxes and radio buttons, the ability to basically animate key frames, or these images that represent an animation from one state to another.

And there’s another one called StateListAnimator, where when you go from one state to another, you can specify a custom animation that will animate properties over time. And then finally, we have touch feedback ripples, which gives the user indication of what’s going on in the UI when they press that button. It’s not simply going from unpressed to pressed, but it’s actually giving them information about the gradual state change that’s occurring, as well as possibly where that state change occurred.

So if we look at the video here, let’s see if — that is really hard to see on this screen. There’s some subtle ripples on the button down below, and you can see the ripples are actually emanating from the touch point that I had when I touched this beautiful button in my UI.

Pages: First | ← Previous | 1 | 2 | 3 | ... | Next → | Last | Single page view

Leave a Reply