Reputation: 1069
In my app, I use Activity.overridePendingTransition()
to customize the activity transition animations to a fade. This works fine on all my phones... except one, a Samsung A14 running Android 14.
On that phone, the animation is nothing like the requested fade (the old screen slides up, then suddenly switches to the new screen).
Has anyone seen this on other phones? How common is it? Any workarounds?
Upvotes: 2
Views: 195
Reputation: 2379
You should start using Activity.overrideAcitivityTransition()
for now, like:
fun addExitAnimation() {
if (VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
overrideActivityTransition(OVERRIDE_TRANSITION_CLOSE, 0, R.anim.screen_from_menu_exit)
} else {
overridePendingTransition(0, R.anim.screen_from_menu_exit)
}
}
Upvotes: 0