Controller
abstract class Controller
Content copied to clipboard
A Controller manages portions of the UI. It is similar to an Activity or Fragment in that it manages its own lifecycle and controls interactions between the UI and whatever logic is required. It is, however, a much lighter weight component than either Activities or Fragments. While it offers several lifecycle methods, they are much simpler and more predictable than those of Activities and Fragments.
Types
LifecycleListener
Link copied to clipboard
abstract class LifecycleListener
Content copied to clipboard
RetainViewMode
Link copied to clipboard
enum RetainViewMode
Content copied to clipboard
Functions
addLifecycleListener
Link copied to clipboard
fun addLifecycleListener(@NonNull() lifecycleListener: Controller.LifecycleListener)
Content copied to clipboard
getActivity
Link copied to clipboard
Returns the host Activity of this Controller's Router or
{@code null}
if thisController has not yet been attached to an Activity or if the Activity has been destroyed.getApplicationContext
Link copied to clipboard
getChildRouter
Link copied to clipboard
getResources
Link copied to clipboard
getTargetController
Link copied to clipboard
Returns the target Controller that was set with the setTargetController method or
{@code null}
if this Controller has no target.handleBack
Link copied to clipboard
isAttached
Link copied to clipboard
isDestroyed
Link copied to clipboard
onActivityResult
Link copied to clipboard
open fun onActivityResult(requestCode: Int, resultCode: Int, @Nullable() data: Intent)
Content copied to clipboard
onCreateOptionsMenu
Link copied to clipboard
open fun onCreateOptionsMenu(@NonNull() menu: Menu, @NonNull() inflater: MenuInflater)
Content copied to clipboard
onOptionsItemSelected
Link copied to clipboard
onPrepareOptionsMenu
Link copied to clipboard
onRequestPermissionsResult
Link copied to clipboard
overridePopHandler
Link copied to clipboard
open fun overridePopHandler(@Nullable() overriddenPopHandler: ControllerChangeHandler)
Content copied to clipboard
Overrides the ControllerChangeHandler that should be used for popping this Controller.
overridePushHandler
Link copied to clipboard
open fun overridePushHandler(@Nullable() overriddenPushHandler: ControllerChangeHandler)
Content copied to clipboard
Overrides the ControllerChangeHandler that should be used for pushing this Controller.
registerForActivityResult
Link copied to clipboard
removeChildRouter
Link copied to clipboard
removeLifecycleListener
Link copied to clipboard
fun removeLifecycleListener(@NonNull() lifecycleListener: Controller.LifecycleListener)
Content copied to clipboard
requestPermissions
Link copied to clipboard
fun requestPermissions(@NonNull() permissions: Array<String>, requestCode: Int)
Content copied to clipboard
setTargetController
Link copied to clipboard
shouldShowRequestPermissionRationale
Link copied to clipboard
open fun shouldShowRequestPermissionRationale(@NonNull() permission: String): Boolean
Content copied to clipboard
startActivity
Link copied to clipboard
startActivityForResult
Link copied to clipboard
startIntentSenderForResult
Link copied to clipboard
Properties
hasOptionsMenu
Link copied to clipboard
instanceId
Link copied to clipboard
isBeingDestroyed
Link copied to clipboard
optionsMenuHidden
Link copied to clipboard
overriddenPopHandler
Link copied to clipboard
overriddenPushHandler
Link copied to clipboard
parentController
Link copied to clipboard
retainViewMode
Link copied to clipboard
Extensions
asTransaction
Link copied to clipboard
fun Controller.asTransaction(popChangeHandler: ControllerChangeHandler? = null, pushChangeHandler: ControllerChangeHandler? = null): RouterTransaction
Content copied to clipboard