BackButtonScreen
class BackButtonScreen<C : Screen>(val content: C, val shadow: Boolean = false, val onBackPressed: () -> Unit? = null) : Wrapper<Screen, C> , AndroidScreen<BackButtonScreen<C>>
Adds optional back button handling to a content rendering, possibly overriding that the wrapped rendering's own back button handler.
Parameters
shadow
If true
, onBackPressed is set as the backPressedHandler after the content rendering's view is built / updated, effectively overriding it. If false (the default), onBackPressed is set afterward, to allow the wrapped rendering to take precedence if it sets a backPressedHandler
of its own -- the handler provided here serves as a default.
onBackPressed
The function to fire when the device back button is pressed, or null to set no handler -- or clear a handler that was set previously. Defaults to null
.
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Used to build instances of android.view.View as needed to display renderings of this type.