public abstract class AbstractHeaderDialog extends AbstractMaterialDialog implements HeaderDialog
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 |
AbstractHeaderDialog(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 and may contain a header.
|
| Modifier and Type | Method and Description |
|---|---|
android.graphics.drawable.Drawable |
getHeaderBackground()
Returns the background of the dialog's header.
|
int |
getHeaderDividerColor()
Returns the color of the divider of the dialog's header.
|
int |
getHeaderHeight()
Returns the height of the dialog's header.
|
android.graphics.drawable.Drawable |
getHeaderIcon()
Returns the icon of the dialog's header.
|
boolean |
isHeaderDividerShown()
Returns, whether the divider of the dialog's header is shown, or not.
|
boolean |
isHeaderShown()
Returns, whether the dialog's header is shown, or not.
|
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 |
setHeaderBackground(android.graphics.Bitmap background)
Sets the background of the dialog's header.
|
void |
setHeaderBackground(int resourceId)
Sets the background of the dialog's header.
|
void |
setHeaderBackgroundColor(int color)
Sets the background color of the dialog's header.
|
void |
setHeaderDividerColor(int color)
Sets the color of the divider of the dialog's header.
|
void |
setHeaderHeight(int height)
Sets the height of the dialog's header.
|
void |
setHeaderIcon(android.graphics.Bitmap icon)
Sets the icon of the dialog's header.
|
void |
setHeaderIcon(int resourceId)
Sets the icon of the dialog's header.
|
void |
showHeader(boolean show)
Sets, whether the dialog's header should be shown, or not.
|
void |
showHeaderDivider(boolean show)
Sets, whether the divider of the dialog's header should be shown, or not.
|
getBackground, getIcon, getMessage, getMessageColor, getTitle, getTitleColor, onStart, onStop, setBackground, setBackground, setBackgroundColor, setCustomMessage, setCustomMessage, setCustomTitle, setCustomTitle, setIcon, setIcon, setIconAttribute, setMessage, setMessage, setMessageColor, setTitle, setTitleColor, setView, setViewaddContentView, 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, setOnShowListenergetBackground, getIcon, getMessage, getMessageColor, getTitle, getTitleColor, setBackground, setBackground, setBackgroundColor, setCustomMessage, setCustomMessage, setCustomTitle, setCustomTitle, setIcon, setIcon, setIconAttribute, setMessage, setMessage, setMessageColor, setTitle, setTitle, setTitleColor, setView, setViewgetContextprotected AbstractHeaderDialog(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 themepublic final boolean isHeaderShown()
HeaderDialogDecoratorisHeaderShown in interface HeaderDialogDecoratorpublic final void showHeader(boolean show)
HeaderDialogDecoratorshowHeader in interface HeaderDialogDecoratorshow - True, if the dialog's header should be shown, false otherwisepublic final int getHeaderHeight()
HeaderDialogDecoratorgetHeaderHeight in interface HeaderDialogDecoratorInteger valuepublic final void setHeaderHeight(int height)
HeaderDialogDecoratorsetHeaderHeight in interface HeaderDialogDecoratorheight - The height, which should be set, in pixels as an Integer value. The height
must be at least 0public final android.graphics.drawable.Drawable getHeaderBackground()
HeaderDialogDecoratorgetHeaderBackground in interface HeaderDialogDecoratorDrawablepublic final void setHeaderBackgroundColor(int color)
HeaderDialogDecoratorsetHeaderBackgroundColor in interface HeaderDialogDecoratorcolor - The background color, which should be set, as an Integer valuepublic final void setHeaderBackground(int resourceId)
HeaderDialogDecoratorsetHeaderBackground in interface HeaderDialogDecoratorresourceId - 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 setHeaderBackground(android.graphics.Bitmap background)
HeaderDialogDecoratorsetHeaderBackground in interface HeaderDialogDecoratorbackground - The background, which should be set, as an instance of the class Bitmap or
null, if no background should be shownpublic final android.graphics.drawable.Drawable getHeaderIcon()
HeaderDialogDecoratorgetHeaderIcon in interface HeaderDialogDecoratorDrawable or null,
if no icon has been setpublic final void setHeaderIcon(int resourceId)
HeaderDialogDecoratorsetHeaderIcon in interface HeaderDialogDecoratorresourceId - 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 setHeaderIcon(android.graphics.Bitmap icon)
HeaderDialogDecoratorsetHeaderIcon in interface HeaderDialogDecoratoricon - The icon, which should be set, as an instance of the class Bitmap or null, if
no icon should be setpublic final int getHeaderDividerColor()
HeaderDialogDecoratorgetHeaderDividerColor in interface HeaderDialogDecoratorInteger valuepublic final void setHeaderDividerColor(int color)
HeaderDialogDecoratorsetHeaderDividerColor in interface HeaderDialogDecoratorcolor - The color, which should be set, as an Integer valuepublic final boolean isHeaderDividerShown()
HeaderDialogDecoratorisHeaderDividerShown in interface HeaderDialogDecoratorpublic final void showHeaderDivider(boolean show)
HeaderDialogDecoratorshowHeaderDivider in interface HeaderDialogDecoratorshow - True, if the divider of the dialog's header should be shown, false otherwisepublic android.os.Bundle onSaveInstanceState()
onSaveInstanceState in class AbstractMaterialDialogpublic void onRestoreInstanceState(android.os.Bundle savedInstanceState)
onRestoreInstanceState in class AbstractMaterialDialogprotected void onAttachDecorators(android.view.View view)
AbstractMaterialDialogonAttachDecorators in class AbstractMaterialDialogview - 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()
AbstractMaterialDialogonDetachDecorators in class AbstractMaterialDialog