I need to show the soft keyboard if the view list is empty. Anyway the apperance of the soft keyboard resizes the activity's view (default behaviour), so I delayed that action until the scene transition ends with view.postOnAnimationDelayed(HARDCODED_TRANSITION_DURATION) { view.showKeyboard() } but I want to get rid of dependence on the exact value of duration
What do you think about that workaround?
interface OnSceneTransitionListener {
fun onSceneTransitionEnd()
}
class MyViewController : ViewController, OnSceneTransitionListener {
override fun onSceneTransitionEnd() {
// show the soft keyboard
}
}
// transition
val newController = viewControllerFor(parent)
callback.attach(newController)
fakeAnimationMethod()
.doOnEnd {
callback.complete(newController)
(newController as? OnSceneTransitionListener)?.onSceneTransitionEnd()
}
I need to show the soft keyboard if the view list is empty. Anyway the apperance of the soft keyboard resizes the activity's view (default behaviour), so I delayed that action until the scene transition ends with
view.postOnAnimationDelayed(HARDCODED_TRANSITION_DURATION) { view.showKeyboard() }
but I want to get rid of dependence on the exact value of durationWhat do you think about that workaround?