Reputation: 2315
Is it possible to combine ActivityOptionsCompat.makeCustomAnimation()
and ActivityOptionsCompat.makeSceneTransitionAnimation()
? I want to acheive the following Activity
change effect:
I can use points 1 and 2, 3 separately, is there a way to use them simultaneously maybe using different method or something?
Upvotes: 4
Views: 1072
Reputation: 20926
The ActivityOptionsCompat.makeSceneTransitionAnimation() should do all of what you want in L+. In your calling Activity's style add:
<item name="android:windowExitTransition">@android:transition/slide_right</item>
and in your called Activity's style add:
<item name="android:windowEnterTransition">@android:transition/fade</item>
<item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
You may want to do this as well:
Upvotes: 5