How to animate between CardView to flat-style EditText, as shown on the Dialer app on Lollipop?

500 Views Asked by At

On Lollipop, you can see on the dialer a very smooth transition between a CardView and a full-width EditText (or it's still a cardView), from this:

enter image description here

to this:

enter image description here

and back.

I've tried to play with the cardView and its properties, but failed to achieve this animation.

How can I achieve this transition?

I was thinking: maybe I should put 2 layers of views, where one of them will change its size when you click, and the other will be the one that's being clicked. Is this how it's probably working? Then again, it would probably not work well and smoothly as what's shown on the dialer app.

0

There are 0 best solutions below