I have two main activities - a list view (using the RecyclerView
), and a detailed page. Each item in the list has a small image, and when clicking on an item in the list, I have an animation (using a shared element transition) that makes the image larger, and it takes up the upper half of the screen.
The bottom half of the detailed activity, has many details in various layouts.
My problem is that during the shared element transition of the image, I see all the details just appearing on the overlay.
I would like for the detailed activity to wait for the shared element transition to finish, and then slide in the details from the bottom of the page.
I searched the internet for this, but all the posts I found on the subject are either too old, or don't have enough details, so I couldn't get them to work.
Things I tried already :
- In the detailed view, in
onCreate()
I tried creating aTransitionSet
object with a delayed slide transition, and callgetContentTransitionManager().beginDelayedTransition()
. This didn't seem to do anything. - Creating the same
TransitionSet
object and callinggetWindow().setEnterTransition(myTransitionSet)
but this also doesn't seem to work.
I have defined getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);
in the beginning of the onCreate()
method in the detailed activity.
I'm sure I'm just missing something, I just have no idea what...