In package com.nhaarman.acorn.android.transition
class com.nhaarman.acorn.android.transition.DoBeforeTransition
A SceneTransition implementation that can execute an action before a delegate SceneTransition is executed.
This can be used to hide the keyboard before the transition starts, for example.
Methods
fun execute(parent: , callback: Callback)
Executes the transition.
Implementers of this interface have full control over parent and must update its child hierarchy accordingly. That means any old views should be removed and new views must be inflated and added to the parent.
When the transition is done, implementers must always invoke Callback.onComplete. Optionally, Callback.attach can be invoked to attach the resulting Container to the Scene before the transition has finished.
Extensions
fun SceneTransition.doOnStart(action: ()->Unit): SceneTransition
Returns a SceneTransition that runs action before the receiving SceneTransition instance is started.
-
action: (
)->Unit
The action to run.
fun SceneTransition.hideKeyboardOnStart(): SceneTransition
Returns a new SceneTransition instance that hides the keyboard before the receiving SceneTransition is invoked.
- No parameters