In package com.nhaarman.acorn.android
class com.nhaarman.acorn.android.AcornActivity
A base Activity implementation to simplify Acorn usage.
If you can't or don't want to inherit from this class, you can use the AcornActivityDelegate class and route the necessary Activity function calls to it.
Constructors
constructor()
A base Activity implementation to simplify Acorn usage.
If you can't or don't want to inherit from this class, you can use the AcornActivityDelegate class and route the necessary Activity function calls to it.
- No parameters
Methods
Returns the NavigatorProvider to use in this Activity.
NavigatorProvider instances should be shared across instances, so make sure you cache this instance outside of this Activity.
- No parameters
protected open fun provideViewControllerFactory(): ViewControllerFactory
Returns the ViewControllerFactory that can provide ViewController instances for this Activity.
The instance returned here will be combined with a SceneViewControllerFactory to be able to use Scene instances as ViewController factories.
Returns NoopViewControllerFactory by default.
- No parameters
protected open fun provideTransitionFactory(viewControllerFactory: ViewControllerFactory): SceneTransitionFactory
Returns the SceneTransitionFactory to create SceneTransition instances for this Activity. The resulting factory instance will be combined with a DefaultSceneTransitionFactory as fallback.
By default, this returns a NoopSceneTransitionFactory.
-
viewControllerFactory: ViewControllerFactory
The ViewControllerFactory as returned by provideViewControllerFactory.
protected open fun provideActivityControllerFactory(): ActivityControllerFactory
Returns the ActivityControllerFactory that can provide ActivityController instances when using external Activities.
- No parameters
protected open fun provideRootView(): ?
Returns the root ViewGroup that is used to inflate Scene views in.
This method will be called once by Acorn, so it is safe to create new instances here.
Override this method if you want to provide your own ViewGroup implementation. If the returned ViewGroup has no parent, it will be passed to a call to setContentView.
This method returns null
by default, which will result in an empty ViewGroup being
used as the content view.
- No parameters
Returns the navigator used in this instance. Must only be called after onCreate has been called.
- No parameters
open fun onCreate(savedInstanceState: ?)
-
savedInstanceState:
?
open fun onStart()
- No parameters
open fun onActivityResult(requestCode: Int, resultCode: Int, data: ?)
-
requestCode: Int
-
resultCode: Int
-
data:
?
open fun onBackPressed()
- No parameters
open fun onStop()
- No parameters
open fun onDestroy()
- No parameters
open fun onSaveInstanceState(outState: )
-
outState: