Unit |
addContentView(view: View!, params: LayoutParams!)
|
Unit |
addOnContextAvailableListener(@NonNull listener: OnContextAvailableListener)
Add a new OnContextAvailableListener for receiving a callback for when this class is associated with a android.content.Context .
Listeners are triggered in the order they are added when added before the Context is available. Listeners added after the context has been made available will have the Context synchronously delivered to them as part of this call. Any listener added here will receive a callback as part of super.onCreate() , but importantly before any other logic is done (including calling through to the framework Activity#onCreate(Bundle) with the exception of restoring the state of the SavedStateRegistry for use in your listener.
|
ActivityResultRegistry |
getActivityResultRegistry()
Get the ActivityResultRegistry associated with this activity.
|
ViewModelProvider.Factory |
getDefaultViewModelProviderFactory()
Returns the default ViewModelProvider.Factory that should be used when no custom Factory is provided to the ViewModelProvider constructors.
The extras of getIntent() when this is first called will be used as the defaults to any androidx.lifecycle.SavedStateHandle passed to a view model created using this factory.
|
Any? |
getLastCustomNonConfigurationInstance()
Return the value previously returned from onRetainCustomNonConfigurationInstance() .
|
Lifecycle |
getLifecycle()
Returns the Lifecycle of the provider.
Overriding this method is no longer supported and this method will be made final in a future version of ComponentActivity. If you do override this method, you must :
- Return an instance of
LifecycleRegistry
- Lazily initialize your LifecycleRegistry object when this is first called. Note that this method will be called in the super classes' constructor, before any field initialization or object state creation is complete.
|
OnBackPressedDispatcher |
getOnBackPressedDispatcher()
Retrieve the OnBackPressedDispatcher that will be triggered when onBackPressed() is called.
|
SavedStateRegistry |
getSavedStateRegistry()
|
ViewModelStore |
getViewModelStore()
Returns the ViewModelStore associated with this activity
Overriding this method is no longer supported and this method will be made final in a future version of ComponentActivity.
|
Unit |
onBackPressed()
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.
|
Any? |
onRetainCustomNonConfigurationInstance()
Use this instead of onRetainNonConfigurationInstance() . Retrieve later with getLastCustomNonConfigurationInstance() .
|
Any? |
onRetainNonConfigurationInstance()
Retain all appropriate non-config state. You can NOT override this yourself! Use a androidx.lifecycle.ViewModel if you want to retain your own non config state.
|
Unit |
onSaveInstanceState(@NonNull outState: Bundle)
|
Context? |
peekAvailableContext()
|
ActivityResultLauncher<I> |
registerForActivityResult(@NonNull contract: ActivityResultContract<I, O>, @NonNull registry: ActivityResultRegistry, @NonNull callback: ActivityResultCallback<O>)
|
ActivityResultLauncher<I> |
registerForActivityResult(@NonNull contract: ActivityResultContract<I, O>, @NonNull callback: ActivityResultCallback<O>)
|
Unit |
removeOnContextAvailableListener(@NonNull listener: OnContextAvailableListener)
|
Unit |
reportFullyDrawn()
|
Unit |
setContentView(@LayoutRes layoutResID: Int)
|
Unit |
setContentView(view: View!)
|
Unit |
setContentView(view: View!, params: LayoutParams!)
|
Unit |
startActivityForResult(intent: Intent!, requestCode: Int)
|
Unit |
startActivityForResult(intent: Intent!, requestCode: Int, @Nullable options: Bundle?)
|
Unit |
startIntentSenderForResult(intent: IntentSender!, requestCode: Int, @Nullable fillInIntent: Intent?, flagsMask: Int, flagsValues: Int, extraFlags: Int)
|
Unit |
startIntentSenderForResult(intent: IntentSender!, |