I want to show the enterTransition on top of the exitTransition.
But as you can see in the gif, the enterTransition is below the exitTransition.
How can I solve this problem?
The navigation component
is used for fragment transitions.
EnterFragment.kt
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enterTransition = Slide().apply {
duration = 2000
slideEdge = Gravity.END
}
}
ExitFragment.kt
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
exitTransition = Slide().apply {
duration= 3000
slideEdge = Gravity.START
}
}
nav_main.xml
<action
android:id="@+id/move"
app:destination="@id/fragment_enter"
/>