In package com.nhaarman.acorn.android.dispatching
class com.nhaarman.acorn.android.dispatching.SceneDispatcher
A SceneDispatcher is responsible for bridging between Activity instances and the Navigator, handling changes of Scene instances, and ensuring the UI is properly updated.
Methods
Starts dispatching the Scene instances for given navigator.
By disposing the resulting DisposableHandle one can stop the dispatching.
-
navigator: Navigator
abstract 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
abstract 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
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 onActivityResult(resultCode: Int, data: ?)
To be invoked when the Activity receives an invocation to its Activity.onActivityResult method.
-
resultCode: Int
-
data:
?
abstract fun saveInstanceState(): SavedState
Saves any state for this SceneDispatcher.
- No parameters