AppCompatDialog
public class AppCompatDialog extends ComponentDialog implements AppCompatCallback
| java.lang.Object | |||
| ↳ | 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(@NonNull Context context) |
AppCompatDialog(@NonNull Context context, int theme) |
Protected constructors |
|---|
AppCompatDialog( |
Public methods |
|
|---|---|
void |
addContentView(@NonNull View view, ViewGroup.LayoutParams params) |
void |
dismiss() |
boolean |
dispatchKeyEvent(KeyEvent event) |
@Nullable T |
<T extends View> findViewById(@IdRes int id) |
@NonNull AppCompatDelegate |
|
ActionBar |
Support library version of |
void |
Called when a support action mode has finished. |
void |
Called when a support action mode has been started. |
@Nullable ActionMode |
Called when a support action mode is being started for this window. |
void |
setContentView(@LayoutRes int layoutResID) |
void |
setContentView(@NonNull View view) |
void |
setContentView(@NonNull View view, ViewGroup.LayoutParams params) |
void |
setTitle(CharSequence title) |
void |
setTitle(int titleId) |
boolean |
supportRequestWindowFeature(int featureId)Enable extended support library window features. |
Inherited Constants |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited methods |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Public constructors
Protected constructors
AppCompatDialog
protected AppCompatDialog(
@NonNull Context context,
boolean cancelable,
@Nullable DialogInterface.OnCancelListener cancelListener
)
Public methods
getDelegate
public @NonNull AppCompatDelegate getDelegate()
| Returns | |
|---|---|
@NonNull AppCompatDelegate |
The |
getSupportActionBar
public ActionBar getSupportActionBar()
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
public void onSupportActionModeFinished(ActionMode mode)
Called when a support action mode has finished.
| Parameters | |
|---|---|
ActionMode mode |
The action mode that just finished. |
onSupportActionModeStarted
public void onSupportActionModeStarted(ActionMode mode)
Called when a support action mode has been started.
| Parameters | |
|---|---|
ActionMode mode |
The new action mode. |
onWindowStartingSupportActionMode
public @Nullable ActionMode onWindowStartingSupportActionMode(ActionMode.Callback callback)
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 | |
|---|---|
ActionMode.Callback callback |
Callback to control the lifecycle of this action mode |
| Returns | |
|---|---|
@Nullable ActionMode |
The ActionMode that was started, or null if the system should present it |
supportRequestWindowFeature
public boolean supportRequestWindowFeature(int featureId)
Enable extended support library window features.
This is a convenience for calling getWindow().requestFeature().
| Parameters | |
|---|---|
int featureId |
The desired feature as defined in |
| Returns | |
|---|---|
boolean |
Returns true if the requested feature is supported and now enabled. |
| See also | |
|---|---|
requestWindowFeature |
|
requestFeature |