BaseCarAppActivity
abstract class BaseCarAppActivity : FragmentActivity
CarAppActivity |
The class representing a car app activity in the main display. |
Core logic for CarAppLibrary Activity interaction with a host.
This base class handles binding and providing the UI surface of the real activity to the host, and responds to instruction by the host to display content. 3P must not change the layout; otherwise the host does not guarantee the right execution.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
Unit |
bindToViewModel(sessionInfo: SessionInfo)Binds the |
ComponentName? |
Retrieves the |
Unit |
Called when the activity has detected the user's press of the back key. |
ComponentName? |
Protected functions |
|
|---|---|
Unit |
{@inheritDoc} |
Unit |
Destroy all fragments. |
Unit |
onNewIntent(intent: Intent){@inheritDoc} |
Unit |
onPause()Dispatch onPause() to fragments. |
Inherited Constants |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Inherited properties |
||
|---|---|---|
|
Public constructors
Public functions
bindToViewModel
fun bindToViewModel(sessionInfo: SessionInfo): Unit
Binds the BaseCarAppActivity and it's view against the view model.
getServiceComponentName
fun getServiceComponentName(): ComponentName?
Retrieves the ComponentName to which the view model will talk in order to render.
onBackPressed
fun onBackPressed(): Unit
Called when the activity has detected the user's press of the back key. The onBackPressedDispatcher will be given a chance to handle the back button before the default behavior of android.app.Activity.onBackPressed is invoked.
| See also | |
|---|---|
onBackPressedDispatcher |
retrieveServiceComponentName
@ExperimentalCarApi
fun retrieveServiceComponentName(): ComponentName?
| See also | |
|---|---|
getServiceComponentName |
Protected functions
onCreate
protected fun onCreate(savedInstanceState: Bundle?): Unit
{@inheritDoc}
If your ComponentActivity is annotated with ContentView, this will call setContentView for you.
onNewIntent
protected fun onNewIntent(intent: Intent): Unit
{@inheritDoc}
Dispatches this call to all listeners added via addOnNewIntentListener.