In package com.nhaarman.acorn.android.dispatching
class com.nhaarman.acorn.android.dispatching.AcornSceneDispatcher
A default SceneDispatcher implementation that utilizes a UIHandler and an ActivityHandler to dispatch Scenes.
Methods
Starts dispatching the Scene instances for given navigator.
By disposing the resulting DisposableHandle one can stop the dispatching.
-
navigator: Navigator
fun onUIVisible()
To be invoked when the application's UI becomes visible to the user. A good place to invoke this would be in Activity.onStart.
- No parameters
fun onUINotVisible()
To be invoked when the application's UI becomes invisible to the user. A good place to invoke this would be in Activity.onStop.
- No parameters
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
fun onActivityResult(resultCode: Int, data: ?)
To be invoked when the Activity receives an invocation to its Activity.onActivityResult method.
-
resultCode: Int
-
data:
?
fun saveInstanceState(): SavedState
Saves any state for this SceneDispatcher.
- No parameters