Skip to content

Commit a338bc7

Browse files
committed
fix: android screen stack animation
software-mansion#2019
1 parent f57f115 commit a338bc7

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.swmansion.rnscreens
22

33
import android.content.Context
44
import android.graphics.Canvas
5+
import android.os.Build
56
import android.view.View
67
import com.facebook.react.bridge.ReactContext
78
import com.facebook.react.uimanager.UIManagerHelper
@@ -335,8 +336,9 @@ class ScreenStack(context: Context?) : ScreenContainer(context) {
335336
fragmentWrapper.screen.stackPresentation === Screen.StackPresentation.TRANSPARENT_MODAL
336337

337338
private fun needsDrawReordering(fragmentWrapper: ScreenFragmentWrapper): Boolean =
338-
fragmentWrapper.screen.stackAnimation === StackAnimation.SLIDE_FROM_BOTTOM ||
339+
Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU ||
340+
fragmentWrapper.screen.stackAnimation === StackAnimation.SLIDE_FROM_BOTTOM ||
339341
fragmentWrapper.screen.stackAnimation === StackAnimation.FADE_FROM_BOTTOM ||
340-
fragmentWrapper.screen.stackAnimation === StackAnimation.IOS
342+
fragmentWrapper.screen.stackAnimation === StackAnimation.IOS
341343
}
342344
}

android/src/main/res/v33/anim-v33/rns_default_enter_in.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
android:fillEnabled="true"
2020
android:fillBefore="true"
2121
android:fillAfter="true"
22-
android:startOffset="0"
2322
android:interpolator="@android:interpolator/fast_out_extra_slow_in"
2423
android:duration="450" />
2524

android/src/main/res/v33/anim-v33/rns_default_enter_out.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
<alpha
77
android:fromAlpha="1.0"
8-
android:toAlpha="0.0"
8+
android:toAlpha="1.0"
99
android:fillEnabled="true"
1010
android:fillBefore="true"
1111
android:fillAfter="true"
1212
android:interpolator="@anim/rns_standard_accelerate_interpolator"
1313
android:startOffset="0"
14-
android:duration="83" />
14+
android:duration="450" />
1515

1616
<translate
1717
android:fromXDelta="0"

0 commit comments

Comments
 (0)