Skip to content

Commit

Permalink
fix: android screen stack animation
Browse files Browse the repository at this point in the history
  • Loading branch information
yayvery committed Feb 12, 2024
1 parent 9fbab8d commit 8cdfa95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.swmansion.rnscreens

import android.content.Context
import android.graphics.Canvas
import android.os.Build
import android.view.View
import com.facebook.react.bridge.ReactContext
import com.facebook.react.uimanager.UIManagerHelper
Expand Down Expand Up @@ -335,8 +336,9 @@ class ScreenStack(context: Context?) : ScreenContainer(context) {
fragmentWrapper.screen.stackPresentation === Screen.StackPresentation.TRANSPARENT_MODAL

private fun needsDrawReordering(fragmentWrapper: ScreenFragmentWrapper): Boolean =
fragmentWrapper.screen.stackAnimation === StackAnimation.SLIDE_FROM_BOTTOM ||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU ||
fragmentWrapper.screen.stackAnimation === StackAnimation.SLIDE_FROM_BOTTOM ||
fragmentWrapper.screen.stackAnimation === StackAnimation.FADE_FROM_BOTTOM ||
fragmentWrapper.screen.stackAnimation === StackAnimation.IOS
fragmentWrapper.screen.stackAnimation === StackAnimation.IOS
}
}
1 change: 0 additions & 1 deletion android/src/main/res/v33/anim-v33/rns_default_enter_in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
android:fillEnabled="true"
android:fillBefore="true"
android:fillAfter="true"
android:startOffset="0"
android:interpolator="@android:interpolator/fast_out_extra_slow_in"
android:duration="450" />

Expand Down
4 changes: 2 additions & 2 deletions android/src/main/res/v33/anim-v33/rns_default_enter_out.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:toAlpha="1.0"
android:fillEnabled="true"
android:fillBefore="true"
android:fillAfter="true"
android:interpolator="@anim/rns_standard_accelerate_interpolator"
android:startOffset="0"
android:duration="83" />
android:duration="450" />

<translate
android:fromXDelta="0"
Expand Down

0 comments on commit 8cdfa95

Please sign in to comment.