added in version 24.1.0
belongs to Maven artifact com.android.support:appcompat-v7:28.0.0-alpha1

AppCompatDialog

public class AppCompatDialog
extends Dialog implements AppCompatCallback

java.lang.Object
   ↳ android.app.Dialog
     ↳ android.support.v7.app.AppCompatDialog
Known Direct Subclasses
Known Indirect Subclasses


Base class for AppCompat themed Dialogs.

Summary

Inherited constants

From interface android.content.DialogInterface

Public constructors

AppCompatDialog(Context context)
AppCompatDialog(Context context, int theme)

Protected constructors

AppCompatDialog(Context context, boolean cancelable, DialogInterface.OnCancelListener cancelListener)

Public methods

void addContentView(View view, ViewGroup.LayoutParams params)
<T extends View> T findViewById(int id)
AppCompatDelegate getDelegate()
ActionBar getSupportActionBar()

Support library version of getActionBar().

void onSupportActionModeFinished(ActionMode mode)

Called when a support action mode has finished.

void onSupportActionModeStarted(ActionMode mode)

Called when a support action mode has been started.

ActionMode onWindowStartingSupportActionMode(ActionMode.Callback callback)

Called when a support action mode is being started for this window.

void setContentView(View view)
void setContentView(int layoutResID)
void setContentView(View view, ViewGroup.LayoutParams params)
void setTitle(CharSequence title)
void setTitle(int titleId)
boolean supportRequestWindowFeature(int featureId)

Enable extended support library window features.

Protected methods

void onCreate(Bundle savedInstanceState)
void onStop()

Inherited methods

From class android.app.Dialog
From class java.lang.Object
From interface android.content.DialogInterface
From interface android.view.Window.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.View.OnCreateContextMenuListener
From interface android.support.v7.app.AppCompatCallback

Public constructors

AppCompatDialog

added in version 24.1.0
AppCompatDialog (Context context)

Parameters
context Context

AppCompatDialog

added in version 24.1.0
AppCompatDialog (Context context, 
                int theme)

Parameters
context Context

theme int

Protected constructors

AppCompatDialog

added in version 24.1.0
AppCompatDialog (Context context, 
                boolean cancelable, 
                DialogInterface.OnCancelListener cancelListener)

Parameters
context Context

cancelable boolean

cancelListener DialogInterface.OnCancelListener

Public methods

addContentView

void addContentView (View view, 
                ViewGroup.LayoutParams params)

Parameters
view View

params ViewGroup.LayoutParams

findViewById

T findViewById (int id)

Parameters
id int

Returns
T

getDelegate

added in version 24.1.0
AppCompatDelegate getDelegate ()

Returns
AppCompatDelegate The AppCompatDelegate being used by this Dialog.

getSupportActionBar

added in version 24.1.0
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

added in version 24.1.0
void onSupportActionModeFinished (ActionMode mode)

Called when a support action mode has finished.

Parameters
mode ActionMode: The action mode that just finished.

onSupportActionModeStarted

added in version 24.1.0
void onSupportActionModeStarted (ActionMode mode)

Called when a support action mode has been started.

Parameters
mode ActionMode: The new action mode.

onWindowStartingSupportActionMode

added in version 24.1.0
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
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

setContentView

void setContentView (View view)

Parameters
view View

setContentView

void setContentView (int layoutResID)

Parameters
layoutResID int

setContentView

void setContentView (View view, 
                ViewGroup.LayoutParams params)

Parameters
view View

params ViewGroup.LayoutParams

setTitle

void setTitle (CharSequence title)

Parameters
title CharSequence

setTitle

void setTitle (int titleId)

Parameters
titleId int

supportRequestWindowFeature

added in version 24.1.0
boolean supportRequestWindowFeature (int featureId)

Enable extended support library window features.

This is a convenience for calling getWindow().requestFeature().

Parameters
featureId int: The desired feature as defined in Window or WindowCompat.

Returns
boolean Returns true if the requested feature is supported and now enabled.

Protected methods

onCreate

void onCreate (Bundle savedInstanceState)

Parameters
savedInstanceState Bundle

onStop

void onStop ()