public abstract class AbstractHeaderDialogFragment extends AbstractMaterialDialogFragment 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| Constructor and Description |
|---|
AbstractHeaderDialogFragment()
Creates a dialog, which is designed according to Android 5's Material Design guidelines even
on pre-Lollipop devices, is able to show fragments 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,
FragmentManager fragmentManager)
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.
|
protected void |
onRestoreInstanceState(android.os.Bundle savedInstanceState)
The method, which is invoked when the dialog is re-created in order to restore its state.
|
void |
onSaveInstanceState(android.os.Bundle outState) |
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.
|
cancel, getBackground, getContext, getIcon, getMessage, getMessageColor, getTitle, getTitleColor, onCancel, onCreateDialog, onCreateView, onDestroy, onDestroyView, onDismiss, onStart, setBackground, setBackground, setBackgroundColor, setContext, setCustomMessage, setCustomMessage, setCustomTitle, setCustomTitle, setIcon, setIcon, setIconAttribute, setMessage, setMessage, setMessageColor, setOnCancelListener, setOnDismissListener, setOnShowListener, setThemeResourceId, setTitle, setTitle, setTitleColor, setView, setViewclone, 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, setViewgetContextpublic AbstractHeaderDialogFragment()
public 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 void onSaveInstanceState(android.os.Bundle outState)
onSaveInstanceState in class AbstractMaterialDialogFragmentprotected void onRestoreInstanceState(android.os.Bundle savedInstanceState)
AbstractMaterialDialogFragmentonSaveInstanceState-method.onRestoreInstanceState in class AbstractMaterialDialogFragmentsavedInstanceState - The bundle, which has been used to store the state, as an instance of the class
Bundle. The bundle may not be nullprotected void onAttachDecorators(android.view.View view,
FragmentManager fragmentManager)
AbstractMaterialDialogFragmentonAttachDecorators in class AbstractMaterialDialogFragmentview - 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 nullfragmentManager - The fragment manager, which can be used to show fragment within the dialog, as an
instance of the class FragmentManager. The fragment manager may not be nullprotected void onDetachDecorators()
AbstractMaterialDialogFragmentonDetachDecorators in class AbstractMaterialDialogFragment