public abstract class AbstractMaterialDialog extends android.app.Dialog implements MaterialDialog
android.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.content.DialogInterface.OnKeyListener, android.content.DialogInterface.OnMultiChoiceClickListener, android.content.DialogInterface.OnShowListener| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMaterialDialog(android.content.Context context,
int themeResourceId)
Creates a dialog, which is designed according to Android 5's Material Design guidelines even
on pre-Lollipop devices.
|
| Modifier and Type | Method and Description |
|---|---|
android.graphics.drawable.Drawable |
getBackground()
Returns the background of the dialog.
|
android.graphics.drawable.Drawable |
getIcon()
Returns the icon of the dialog.
|
java.lang.CharSequence |
getMessage()
Returns the message of the dialog.
|
int |
getMessageColor()
Returns the color of the message of the dialog.
|
java.lang.CharSequence |
getTitle()
Returns the title of the dialog.
|
int |
getTitleColor()
Returns the color of the title of the dialog.
|
protected void |
onAttachDecorators(android.view.View view)
The method, which is invoked when the dialog's decorators should be attached.
|
protected void |
onDetachDecorators()
The method, which is invoked when the dialog's decorators should be detached.
|
void |
onRestoreInstanceState(android.os.Bundle savedInstanceState) |
android.os.Bundle |
onSaveInstanceState() |
void |
onStart() |
void |
onStop() |
void |
setBackground(android.graphics.Bitmap background)
Sets the background of the dialog.
|
void |
setBackground(int resourceId)
Sets the background of the dialog.
|
void |
setBackgroundColor(int color)
Sets the background color of the dialog.
|
void |
setCustomMessage(int resourceId)
Sets the custom view, which should be used to show the message of the dialog.
|
void |
setCustomMessage(android.view.View view)
Sets the custom view, which should be used to show the message of the dialog.
|
void |
setCustomTitle(int resourceId)
Sets the custom view, which should be used to show the title of the dialog.
|
void |
setCustomTitle(android.view.View view)
Sets the custom view, which should be used to show the title of the dialog.
|
void |
setIcon(android.graphics.Bitmap icon)
Sets the icon of the dialog.
|
void |
setIcon(int resourceId)
Sets the icon of the dialog.
|
void |
setIconAttribute(int attributeId)
Set the icon of the dialog.
|
void |
setMessage(java.lang.CharSequence message)
Sets the message of the dialog.
|
void |
setMessage(int resourceId)
Sets the message of the dialog.
|
void |
setMessageColor(int color)
Sets the color of the message of the dialog.
|
void |
setTitle(java.lang.CharSequence title)
Sets the title of the dialog.
|
void |
setTitleColor(int color)
Sets the color of the title of the dialog.
|
void |
setView(int resourceId)
Sets the custom view, which should be shown by the dialog.
|
void |
setView(android.view.View view)
Sets the custom view, which should be shown by the dialog.
|
addContentView, cancel, closeOptionsMenu, create, dismiss, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getSearchEvent, getVolumeControlStream, getWindow, hide, invalidateOptionsMenu, isShowing, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onDetachedFromWindow, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onSearchRequested, onSearchRequested, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, setCancelable, setCanceledOnTouchOutside, setCancelMessage, setContentView, setContentView, setContentView, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setTitle, setVolumeControlStream, show, takeKeyEvents, unregisterForContextMenuclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetCancelable, setOnCancelListener, setOnDismissListener, setOnShowListenersetTitlegetContextprotected AbstractMaterialDialog(android.content.Context context,
int themeResourceId)
context - The context, which should be used by the dialog, as an instance of the class Context. The context may not be nullthemeResourceId - The resource id of the theme, which should be used by the dialog, as an Integer value. The resource id must correspond to a valid themeprotected void onAttachDecorators(android.view.View view)
view - The root view of the view hierarchy, which should be modified by the decorators, as
an instance of the class View. The view may not be nullprotected void onDetachDecorators()
public final android.graphics.drawable.Drawable getIcon()
MaterialDialogDecoratorgetIcon in interface MaterialDialogDecoratorDrawable or null, if no
icon has been setpublic final void setIcon(android.graphics.Bitmap icon)
MaterialDialogDecoratorsetIcon in interface MaterialDialogDecoratoricon - The icon, which should be set, as an instance of the class Bitmap or null, if
no icon should be shownpublic final void setIcon(int resourceId)
MaterialDialogDecoratorsetIcon in interface MaterialDialogDecoratorresourceId - The resource id of the icon, which should be set, as an Integer value. The
resource id must correspond to a valid drawable resourcepublic final void setIconAttribute(int attributeId)
MaterialDialogDecoratorsetIconAttribute in interface MaterialDialogDecoratorattributeId - The id of the theme attribute, which supplies the icon, which should be set, as an
Integer value. The id must point to a valid drawable resourcepublic final int getTitleColor()
MaterialDialogDecoratorgetTitleColor in interface MaterialDialogDecoratorInteger valuepublic final void setTitleColor(int color)
MaterialDialogDecoratorsetTitleColor in interface MaterialDialogDecoratorcolor - The color, which should be set, as an Integer valuepublic final int getMessageColor()
MaterialDialogDecoratorgetMessageColor in interface MaterialDialogDecoratorInteger valuepublic final void setMessageColor(int color)
MaterialDialogDecoratorsetMessageColor in interface MaterialDialogDecoratorcolor - The color, which should be set, as an Integer valuepublic final android.graphics.drawable.Drawable getBackground()
MaterialDialogDecoratorgetBackground in interface MaterialDialogDecoratorDrawable or null, if
no background has been setpublic final void setBackground(android.graphics.Bitmap background)
MaterialDialogDecoratorsetBackground in interface MaterialDialogDecoratorbackground - The background, which should be set, as an instance of the class Bitmap or
null, if no background should be setpublic final void setBackground(int resourceId)
MaterialDialogDecoratorsetBackground in interface MaterialDialogDecoratorresourceId - The resource id of the background, which should be set, as an Integer value.
The resource id must correspond to a valid drawable resourcepublic final void setBackgroundColor(int color)
MaterialDialogDecoratorsetBackgroundColor in interface MaterialDialogDecoratorcolor - The background color, which should be set, as an Integer valuepublic final void setCustomTitle(android.view.View view)
MaterialDialogDecoratorsetCustomTitle in interface MaterialDialogDecoratorview - The view, which should be set, as an instance of the class View or null, if
no custom view should be used to show the titlepublic final void setCustomTitle(int resourceId)
MaterialDialogDecoratorsetCustomTitle in interface MaterialDialogDecoratorresourceId - The resource id of the view, which should be set, as an Integer value. The
resource id must correspond to a valid layout resourcepublic final void setCustomMessage(android.view.View view)
MaterialDialogDecoratorsetCustomMessage in interface MaterialDialogDecoratorview - The view, which should be set, as an instance of the class View or null, if
no custom view should be used to show the titlepublic final void setCustomMessage(int resourceId)
MaterialDialogDecoratorsetCustomMessage in interface MaterialDialogDecoratorresourceId - The resource id of the view, which should be set, as an Integer value. The
resource id must correspond to a valid layout resourcepublic final void setView(android.view.View view)
MaterialDialogDecoratorsetView in interface MaterialDialogDecoratorview - The view, which should be set, as an instance of the class View or null, if
no custom view should be shownpublic final void setView(int resourceId)
MaterialDialogDecoratorsetView in interface MaterialDialogDecoratorresourceId - The resource id of the view, which should be set, as an Integer value. The
resource id must correspond to a valid layout resourcepublic final java.lang.CharSequence getMessage()
MaterialDialogDecoratorgetMessage in interface MaterialDialogDecoratorCharSequence or null, if
no message has been setpublic final void setMessage(java.lang.CharSequence message)
MaterialDialogDecoratorsetMessage in interface MaterialDialogDecoratormessage - The message, which should be set, as an instance of the type CharSequence or
null, if no message should be shownpublic final void setMessage(int resourceId)
MaterialDialogDecoratorsetMessage in interface MaterialDialogDecoratorresourceId - The resource id of the message, which should be set, as an Integer value. The
resource id must correspond to a valid string resourcepublic final java.lang.CharSequence getTitle()
MaterialDialogDecoratorgetTitle in interface MaterialDialogDecoratorCharSequence or null, if
no title has been setpublic final void setTitle(java.lang.CharSequence title)
MaterialDialogDecoratorsetTitle in interface MaterialDialogDecoratorsetTitle in class android.app.Dialogtitle - The title, which should be set, as an instance of the type CharSequence or
null, if no title should be setpublic final void onStart()
onStart in class android.app.Dialogpublic final void onStop()
onStop in class android.app.Dialogpublic android.os.Bundle onSaveInstanceState()
onSaveInstanceState in class android.app.Dialogpublic void onRestoreInstanceState(android.os.Bundle savedInstanceState)
onRestoreInstanceState in class android.app.Dialog