leremjs
leremjs

Reputation: 1069

can't override Activity transition animations on Samsung A14

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

Answers (1)

Nokuap
Nokuap

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

Related Questions