AppCompatDialog
class AppCompatDialog : ComponentDialog, AppCompatCallback
| kotlin.Any | |||
| ↳ | android.app.Dialog | ||
| ↳ | androidx.activity.ComponentDialog | ||
| ↳ | androidx.appcompat.app.AppCompatDialog |
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 AppCompat themed android.app.Dialogs.
Summary
Public constructors |
|---|
AppCompatDialog(context: Context) |
AppCompatDialog(context: Context, theme: Int) |
Protected constructors |
|---|
AppCompatDialog( |
Public functions |
|
|---|---|
Unit |
addContentView(view: View, params: ViewGroup.LayoutParams!) |
Unit |
dismiss() |
Boolean |
dispatchKeyEvent(event: KeyEvent!) |
T? |
<T : View?> findViewById(id: @IdRes Int) |
AppCompatDelegate |
|
ActionBar! |
Support library version of |
Unit |
Called when a support action mode has finished. |
Unit |
onSupportActionModeStarted(mode: ActionMode!)Called when a support action mode has been started. |
ActionMode? |
onWindowStartingSupportActionMode(callback: ActionMode.Callback!)Called when a support action mode is being started for this window. |
Unit |
setContentView(layoutResID: @LayoutRes Int) |
Unit |
setContentView(view: View) |
Unit |
setContentView(view: View, params: ViewGroup.LayoutParams!) |
Unit |
setTitle(title: CharSequence!) |
Unit |
|
Boolean |
supportRequestWindowFeature(featureId: Int)Enable extended support library window features. |
Inherited Constants |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
Protected constructors
AppCompatDialog
protected AppCompatDialog(
context: Context,
cancelable: Boolean,
cancelListener: DialogInterface.OnCancelListener?
)
Public functions
getDelegate
fun getDelegate(): AppCompatDelegate
| Returns | |
|---|---|
AppCompatDelegate |
The |
getSupportActionBar
fun getSupportActionBar(): ActionBar!
Support library version of getActionBar.
Retrieve a reference to this dialog's ActionBar.
| Returns | |
|---|---|
ActionBar! |
The Dialog's ActionBar, or null if it does not have one. |
onSupportActionModeFinished
fun onSupportActionModeFinished(mode: ActionMode!): Unit
Called when a support action mode has finished.
| Parameters | |
|---|---|
mode: ActionMode! |
The action mode that just finished. |
onSupportActionModeStarted
fun onSupportActionModeStarted(mode: ActionMode!): Unit
Called when a support action mode has been started.
| Parameters | |
|---|---|
mode: ActionMode! |
The new action mode. |
onWindowStartingSupportActionMode
fun onWindowStartingSupportActionMode(callback: ActionMode.Callback!): ActionMode?
Called when a support action mode is being started for this window. Gives the callback an opportunity to handle the action mode in its own unique and beautiful way. If this method returns null the system can choose a way to present the mode or choose not to start the mode at all.
| Parameters | |
|---|---|
callback: ActionMode.Callback! |
Callback to control the lifecycle of this action mode |
| Returns | |
|---|---|
ActionMode? |
The ActionMode that was started, or null if the system should present it |
supportRequestWindowFeature
fun supportRequestWindowFeature(featureId: Int): Boolean
Enable extended support library window features.
This is a convenience for calling getWindow().requestFeature().
| Parameters | |
|---|---|
featureId: Int |
The desired feature as defined in |
| Returns | |
|---|---|
Boolean |
Returns true if the requested feature is supported and now enabled. |
| See also | |
|---|---|
requestWindowFeature |
|
requestFeature |