M
M
MikkiMouse2016-01-17 04:31:27
Android
MikkiMouse, 2016-01-17 04:31:27

Dynamic animation of fragment change, how to do it right?

Good day
Actually, when changing one fragment to another, I want to use animation tied to coordinates. I want an effect like in Google Play, when you click on any CardView.
Video: https://www.youtube.com/watch?v=dMltz0reMYo (from the 4th second)
I understand correctly that this is implemented as follows:
1. We get the desired coordinates (tap on the screen, the location of the element in the list, etc.) etc.)
2. Pass coordinates to fragment B
3. Change fragment A to fragment B, without setCustomAnimations
4. Run animations for views in onCreateView() of fragment B
Or is it done differently? Maybe there is some analogue of setCustomAnimations for animations created in the code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Dovnar, 2016-01-17
@MikkiMouse

Here: eng / rus
The main idea of ​​your problem is in Customize Activity Transitions .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question