ComponentDialog
open class ComponentDialog : Dialog, LifecycleOwner, OnBackPressedDispatcherOwner, NavigationEventDispatcherOwner, SavedStateRegistryOwner
AppCompatDialog |
Base class for AppCompat themed |
AlertDialog |
A subclass of Dialog that can display one, two or three buttons. |
MediaRouteChooserDialog |
This class implements the route chooser dialog for |
MediaRouteControllerDialog |
This class implements the route controller dialog for |
Base class for dialogs that enables composition of higher level components.
Summary
Public constructors |
---|
ComponentDialog(context: Context, themeResId: @StyleRes Int) |
Public functions |
|
---|---|
open Unit |
addContentView(view: View, params: ViewGroup.LayoutParams?) |
open Unit |
Sets the view tree owners before setting the content view so that the inflation process and attach listeners will see them already present. |
open Unit |
|
open Bundle |
|
open Unit |
setContentView(layoutResID: Int) |
open Unit |
setContentView(view: View) |
open Unit |
setContentView(view: View, params: ViewGroup.LayoutParams?) |
Public properties |
|
---|---|
open Lifecycle |
|
open NavigationEventDispatcher |
Lazily provides a |
final OnBackPressedDispatcher |
Retrieve the |
open SavedStateRegistry |
Public constructors
Public functions
initializeViewTreeOwners
@CallSuper
open fun initializeViewTreeOwners(): Unit
Sets the view tree owners before setting the content view so that the inflation process and attach listeners will see them already present.
Protected functions
Public properties
navigationEventDispatcher
open val navigationEventDispatcher: NavigationEventDispatcher
Lazily provides a NavigationEventDispatcher
for back navigation handling, including support for predictive back gestures introduced in Android 13 (API 33+).
This dispatcher acts as the central point for back navigation events. When a navigation event occurs (e.g., a back gesture), it safely invokes ComponentDialog.onBackPressed
.
onBackPressedDispatcher
final val onBackPressedDispatcher: OnBackPressedDispatcher
Retrieve the OnBackPressedDispatcher
that will be triggered when onBackPressed
is called.
Returns | |
---|---|
OnBackPressedDispatcher |
The |