Android Question How to implement Shared Element Transition?

Inman

Well-Known Member
Licensed User
Longtime User
Shared Element Transition lets you move a view from one activity to another in a smooth motion animation (see the example below). Google uses this extensively in their apps like Play Store, Music etc...

This was introduced with Android 5.0 in 2015. I am wondering if we can do this with B4A. Here is a java tutorial:

https://guides.codepath.com/android/Shared-Element-Activity-Transition

1cjqsSA.gif
rUkkfUZ.gif
 

corwin42

Expert
Licensed User
Longtime User
I did a try on this and I guess it is not possible.

I attached an Example which should do the transition between the images. The starting transition does not work and I guess this is because Actvity_Create (and loading the layout) is called too late in the activity lifecycle. (Or I have done a mistake somewhere?)

The back transition works and looks great.

Maybe Erel has an idea how it can be done.
 

Attachments

  • SharedElementTransitionTest.zip
    86.3 KB · Views: 454
Last edited:
Upvote 0

corwin42

Expert
Licensed User
Longtime User
Maybe there is a solution. Will try it later...

Edit: Here we go
 
Last edited:
Upvote 0
Top