ComponentDialog


open class ComponentDialog : Dialog, LifecycleOwner, OnBackPressedDispatcherOwner, SavedStateRegistryOwner

Known direct subclasses
AppCompatDialog

Base class for AppCompat themed android.app.Dialogs.

Known indirect subclasses
AlertDialog

A subclass of Dialog that can display one, two or three buttons.

MediaRouteChooserDialog

This class implements the route chooser dialog for MediaRouter.

MediaRouteControllerDialog

This class implements the route controller dialog for MediaRouter.


Base class for dialogs that enables composition of higher level components.

Summary

Public constructors

ComponentDialog(context: Context, themeResId: @StyleRes Int)

Public functions

open Unit
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
open Unit

Protected functions

open Unit
@CallSuper
onCreate(savedInstanceState: Bundle?)
open Unit
open Unit

Public properties

open Lifecycle
final OnBackPressedDispatcher

The OnBackPressedDispatcher that should handle the system back button.

open SavedStateRegistry

Inherited functions

From android.app.Dialog
open Unit
open Unit
open Unit
open Unit
open Boolean
open Boolean
open Boolean
open Boolean
open Boolean
open Boolean
open T
<T : View> findViewById(p0: Int)
open ActionBar?
Context
open View?
open LayoutInflater
open OnBackInvokedDispatcher
Activity?
SearchEvent?
Int
open Window?
open Unit
open Unit
open Boolean
open Unit
open Unit
open Unit
open Unit
open Boolean
open Unit
open Unit
onCreateContextMenu(
    p0: ContextMenu,
    p1: View,
    p2: ContextMenu.ContextMenuInfo
)
open Boolean
open Boolean
open View?
open Unit
open Boolean
open Boolean
onKeyDown(p0: Int, p1: KeyEvent)
open Boolean
open Boolean
onKeyMultiple(p0: Int, p1: Int, p2: KeyEvent)
open Boolean
open Boolean
onKeyUp(p0: Int, p1: KeyEvent)
open Boolean
open Boolean
onMenuOpened(p0: Int, p1: Menu)
open Boolean
open Unit
open Unit
onPanelClosed(p0: Int, p1: Menu)
open Boolean
open Boolean
onPreparePanel(p0: Int, p1: View?, p2: Menu)
open Unit
open Boolean
open Boolean
open Boolean
open Boolean
open Unit
open Unit
open ActionMode?
open ActionMode?
open Unit
open Unit
open Unit
Boolean
T
<T : View> requireViewById(p0: Int)
open Unit
open Unit
open Unit
open Unit
Unit
Unit
Unit
Unit
open Unit
open Unit
open Unit
open Unit
Unit
open Unit
open Unit
Unit
open Unit
open Unit
open Unit
From android.view.Window.Callback

Public constructors

ComponentDialog

Added in 1.5.0
ComponentDialog(context: Context, themeResId: @StyleRes Int = 0)

Public functions

addContentView

open fun addContentView(view: View, params: ViewGroup.LayoutParams?): Unit

initializeViewTreeOwners

Added in 1.8.0
@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.

onBackPressed

Added in 1.6.0
@CallSuper
open fun onBackPressed(): Unit

onSaveInstanceState

open fun onSaveInstanceState(): Bundle

setContentView

open fun setContentView(layoutResID: Int): Unit

setContentView

open fun setContentView(view: View): Unit

setContentView

open fun setContentView(view: View, params: ViewGroup.LayoutParams?): Unit

Protected functions

onCreate

@CallSuper
protected open fun onCreate(savedInstanceState: Bundle?): Unit

onStart

@CallSuper
protected open fun onStart(): Unit

onStop

@CallSuper
protected open fun onStop(): Unit

Public properties

lifecycle

Added in 1.5.0
open val lifecycleLifecycle

onBackPressedDispatcher

Added in 1.10.0-rc01
final val onBackPressedDispatcherOnBackPressedDispatcher

The OnBackPressedDispatcher that should handle the system back button.

savedStateRegistry

Added in 1.7.0
open val savedStateRegistrySavedStateRegistry