bluelinelabs / bluelinelabs/Conductor
"Back" animation played after reordering backstack in tab navigation
- Dominant language
- Java
- Stars
- 3.9k
- Forks
- 338
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I have a bottom tabs navigation. Each tab is a child controller. I when clicking on tab I have previously already been to, I reorder that controller to top
```
val backstack = tabRouter.backstack
val controllerClass = itemIdToControllerClass(itemId)
val index = indexOf(backstack, controllerClass)
if (index == -1) {
// Push new
val controller = ...
tabRouter.pushController(RouterTransaction.with(controller)
.pushChangeHandler(CrossfadeChangeHandler())
.popChangeHandler(CrossfadeChangeHandler())
} else {
// Reorder to top
val transaction = backstack[index]
backstack.removeAt(index)
backstack.add(transaction)
tabRouter.setBackstack(backstack, CrossfadeChangeHandler())
}
```
However, what the problem is that, doing this, when clicking on such reusing tab, **it plays the "back" part of animation change handler** (also sometimes from view is null so it skips completely). I kind of understand why, but is there a way around this?
(My animation is asymmetrical so it is noticable)
Id like for each tab click play the "push" (AnimatorChangeHandler.getAnimator(...isPush: Boolean = true) animation (regardless of it being reused or not)
is this possible somehow?
Contributor guide
Assessment
This issue has not been assessed yet.