How can I get started with android material design animation on android
2 answers
Yes, there is a way and it looks super sleek.
Basically there are 4 steps: 1. Make the 2nd activity transparent 2. Measure the size and position of the view you want to animate in the 1st activity and pass it to the second action in the kit 3. Animate the layout change in the 2nd action using the onPreDraw listing and data from the 1st activity. 4. Overwrite the default activity transitions
check out this DevByte , it explains exactly how to do it.
+3
source to share
Check class ActivityOptionsCompat. You can use it like this:
final ActivityOptionsCompat options = ActivityOptionsCompat.makeScaleUpAnimation(yourButton, 0, 0, 0, 0);
startActivity(activityStartingIntent, options.toBundle());
This should create a transition starting at the specified view and the specified starting size (which is 0 in this example).
+1
source to share