In package com.nhaarman.acorn.android.transition
class com.nhaarman.acorn.android.transition.FadeOutToBottomTransition
A SceneTransition that fades the current View out to bottom, revealing the new View underneath.
This class assumes there is currently a single View present in the parent ViewGroup. If there is more than one View, the first child is used to fade out.
Any views that live in the parent ViewGroup before the transition starts wil be removed.
Constructors
constructor(viewController: ()->ViewController)
A SceneTransition that fades the current View out to bottom, revealing the new View underneath.
This class assumes there is currently a single View present in the parent ViewGroup. If there is more than one View, the first child is used to fade out.
Any views that live in the parent ViewGroup before the transition starts wil be removed.
-
viewController: (
)->ViewController
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