How to animate between CardView and FlatTrade EditText as shown in Dialer on Lollipop?

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

enter image description here

:

enter image description here

and back.

I tried to play with cardView and its properties, but could not achieve this animation.

How can I achieve this transition?

I thought: maybe I should put 2 layers of views, where one of them will change its size when pressed, and the other will be the one that will be pressed. Is this likely to work? Again, this probably won't work well and smoothly, like what is shown in the dialer application.

+4
source share

All Articles