In package com.nhaarman.acorn.android.uistate
class com.nhaarman.acorn.android.uistate.UIHandler
An interface that provides UI handling when working with Scenes.
Methods
abstract fun onUIVisible()
Denotes that the UI window becomes visible to the user, for example when the Activity enters its 'started' state.
- No parameters
abstract fun onUINotVisible()
Denotes that the UI window becomes invisible to the user, for example when the Activity enters its 'stopped' state.
- No parameters
abstract fun onBackPressed(): Boolean
Invoked when the user presses the back button.
Implementations can consume the event by returning true
and stop
further propagation of the event.
- No parameters
abstract fun withScene(scene: Scene, viewControllerFactory: ViewControllerFactory, data: TransitionData?)
Applies given scene to the UI.
Depending on the current internal state the Scene change may occur directly or be scheduled, for example when a transition animation is running.
-
scene: Scene
The new Scene to apply.
-
viewControllerFactory: ViewControllerFactory
The ViewControllerFactory that can provide the ViewController for given scene.
-
data: TransitionData?
Any TransitionData to be used for transitions.
abstract fun withoutScene()
Indicates that there is no local Scene currently active.
- No parameters