Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to animate FAB (expand) to a new Activity

What I'd like to achieve is an effect like this:

enter image description here

Is it something I can achieve using ActivityOptionsCompat or are there other options? How can I replicate an effect like this where the FAB kinda "expands" to a new Activity?

like image 248
LS_ Avatar asked Feb 09 '16 09:02

LS_


1 Answers

These animations are related to material designs, which is called

Shared elements between Activities.

The idea behind this is having two different views in two different layouts and link them somehow with an animation.

Transition framework will then do whatever animations it consider necessary to show the user a transition from one view to another.

Keep this always in mind: the view is not really moving from one layout to another. They are two independent views.

enter image description here

Animation between the views will look like

enter image description here

Check this url for more detail of Material design

like image 138
Ashish Rajvanshi Avatar answered Oct 11 '22 14:10

Ashish Rajvanshi