public static class WizardDialog.Builder extends AbstractHeaderDialogBuilder<WizardDialog,WizardDialog.Builder>
| Constructor and Description |
|---|
Builder(android.content.Context context)
Creates a new builder, which allows to create dialogs, which are designed according to
Android 5's Material Design guidelines even on pre-Lollipop devices and provide a
navigation for switching between multiple fragments.
|
Builder(android.content.Context context,
int themeResourceId)
Creates a new builder, which allows to create dialogs, which are designed according to
Android 5's Material Design guidelines even on pre-Lollipop devices and provide a
navigation for switching between multiple fragments.
|
| Modifier and Type | Method and Description |
|---|---|
WizardDialog.Builder |
addFragment(java.lang.CharSequence title,
java.lang.Class<? extends Fragment> fragmentClass)
Adds a new fragment to the dialog, which is created by the builder.
|
WizardDialog.Builder |
addFragment(java.lang.CharSequence title,
java.lang.Class<? extends Fragment> fragmentClass,
android.os.Bundle arguments)
Adds a new fragment to the dialog, which is created by the builder.
|
WizardDialog.Builder |
addFragment(java.lang.Class<? extends Fragment> fragmentClass)
Adds a new fragment to the dialog, which is created by the builder.
|
WizardDialog.Builder |
addFragment(java.lang.Class<? extends Fragment> fragmentClass,
android.os.Bundle arguments)
Adds a new fragment to the dialog, which is created by the builder.
|
WizardDialog.Builder |
addFragment(int resourceId,
java.lang.Class<? extends Fragment> fragmentClass)
Adds a new fragment to the dialog, which is created by the builder.
|
WizardDialog.Builder |
addFragment(int resourceId,
java.lang.Class<? extends Fragment> fragmentClass,
android.os.Bundle arguments)
Adds a new fragment to the dialog, which is created by the builder.
|
WizardDialog.Builder |
addWizardListener(WizardDialog.WizardListener listener)
Adds a new listener, which should be notified, when the user navigates within the dialog,
which is created by the builder.
|
WizardDialog.Builder |
enableSwipe(boolean enable)
Sets, whether switching fragments using swipe gestures should be enabled, or not.
|
WizardDialog.Builder |
enableTabLayout(boolean enable)
Enables or disables the tabs, which indicate the currently shown fragment.
|
protected void |
obtainStyledAttributes(int themeResourceId)
Obtains all relevant attributes from the current theme.
|
protected WizardDialog |
onCreateDialog(android.content.Context context,
int themeResourceId)
The method, which is invoked on subclasses in order to create the dialog, which is configured
by the builder.
|
WizardDialog.Builder |
setBackButtonText(java.lang.CharSequence text)
Sets the text of the dialog's back button.
|
WizardDialog.Builder |
setBackButtonText(int resourceId)
Sets the text of the dialog's back button.
|
WizardDialog.Builder |
setButtonBarDividerColor(int color)
Sets the color of the divider, which is located above the dialog's buttons.
|
WizardDialog.Builder |
setButtonTextColor(int color)
Sets the color of the button texts of the dialog.
|
WizardDialog.Builder |
setFinishButtonText(java.lang.CharSequence text)
Sets the text of the dialog's finish button.
|
WizardDialog.Builder |
setFinishButtonText(int resourceId)
Sets the text of the dialog's finish button.
|
WizardDialog.Builder |
setNextButtonText(java.lang.CharSequence text)
Sets the text of the dialog's next button.
|
WizardDialog.Builder |
setNextButtonText(int resourceId)
Sets the text of the dialog's next button.
|
WizardDialog.Builder |
setTabIndicatorColor(int color)
Sets the color of the indicator, which indicates the currently shown fragment.
|
WizardDialog.Builder |
setTabIndicatorHeight(int height)
Sets the height of the indicator, which indicates the currently shown fragment.
|
WizardDialog.Builder |
setTabPosition(WizardDialog.TabPosition tabPosition)
Sets the position of the tabs, which indicate the currently shown fragment.
|
WizardDialog.Builder |
setTabSelectedTextColor(int selectedTextColor)
Sets the selected text color of the tabs, which indicate the currently shown fragment.
|
WizardDialog.Builder |
setTabTextColor(int textColor)
Sets the text color of the tabs, which indicates the currently shown fragment.
|
WizardDialog |
show(FragmentManager fragmentManager,
java.lang.String tag)
Creates a dialog with the arguments, which have been supplied to the builder and
immediately displays it.
|
WizardDialog |
show(FragmentTransaction fragmentTransaction,
java.lang.String tag)
Creates a dialog with the arguments, which have been supplied to the builder and
immediately displays it.
|
WizardDialog.Builder |
showButtonBar(boolean show)
Sets, whether the dialog's buttons should be shown, or not.
|
WizardDialog.Builder |
showButtonBarDivider(boolean show)
Sets, whether the divider, which is located above the dialog's buttons, should be shown,
or not.
|
WizardDialog.Builder |
showTabLayout(boolean show)
Sets, whether the tabs, which indicate the currently shown fragment, should be shown
shown, or not.
|
setHeaderBackground, setHeaderBackground, setHeaderBackgroundColor, setHeaderDividerColor, setHeaderHeight, setHeaderIcon, setHeaderIcon, showHeader, showHeaderDividercreate, getContext, getDialog, self, setBackground, setBackground, setBackgroundColor, setCancelable, setCustomMessage, setCustomMessage, setCustomTitle, setCustomTitle, setIcon, setIcon, setIconAttribute, setMessage, setMessage, setMessageColor, setOnCancelListener, setOnDismissListener, setOnShowListener, setTitle, setTitle, setTitleColor, setView, setViewpublic Builder(android.content.Context context)
context - The context, which should be used by the builder, as an instance of the class
Context. The context may not be nullpublic Builder(android.content.Context context,
int themeResourceId)
context - The context, which should be used by the builder, 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 WizardDialog.Builder addFragment(java.lang.Class<? extends Fragment> fragmentClass)
fragmentClass - The class of the fragment, which should be added, as an instance of the class
Class. The class may not be nullWizardDialog.Builderpublic final WizardDialog.Builder addFragment(java.lang.Class<? extends Fragment> fragmentClass, android.os.Bundle arguments)
fragmentClass - The class of the fragment, which should be added, as an instance of the class
Class. The class may not be nullarguments - A bundle, which should be passed to the fragment, when it is shown, as an
instance of the class Bundle or null, if no arguments should be passed to
the fragmentWizardDialog.Builderpublic final WizardDialog.Builder addFragment(int resourceId, java.lang.Class<? extends Fragment> fragmentClass)
resourceId - The resource id of the title of the fragment, which should be added, as an Integer value. The resource id must correspond to a valid string resourcefragmentClass - The class of the fragment, which should be added, as an instance of the class
Class. The class may not be nullWizardDialog.Builderpublic final WizardDialog.Builder addFragment(int resourceId, java.lang.Class<? extends Fragment> fragmentClass, android.os.Bundle arguments)
resourceId - The resource id of the title of the fragment, which should be added, as an Integer value. The resource id must correspond to a valid string resourcefragmentClass - The class of the fragment, which should be added, as an instance of the class
Class. The class may not be nullarguments - A bundle, which should be passed to the fragment, when it is shown, as an
instance of the class Bundle or null, if no arguments should be passed to
the fragmentWizardDialog.Builderpublic final WizardDialog.Builder addFragment(java.lang.CharSequence title, java.lang.Class<? extends Fragment> fragmentClass)
title - The title of the fragment, which should be added, as an instance of the type
CharSequence or null, if no title should be setfragmentClass - The class of the fragment, which should be added, as an instance of the class
Class. The class may not be nullWizardDialog.Builderpublic final WizardDialog.Builder addFragment(java.lang.CharSequence title, java.lang.Class<? extends Fragment> fragmentClass, android.os.Bundle arguments)
title - The title of the fragment, which should be added, as an instance of the type
CharSequence or null, if no title should be setfragmentClass - The class of the fragment, which should be added, as an instance of the class
Class. The class may not be nullarguments - A bundle, which should be passed to the fragment, when it is shown, as an
instance of the class Bundle or null, if no arguments should be passed to
the fragmentWizardDialog.Builderpublic final WizardDialog.Builder setTabPosition(WizardDialog.TabPosition tabPosition)
tabPosition - The position, which should be set, as a value of the enum WizardDialog.TabPosition.
The position may either be USE_HEADER, PREFER_HEADER or
NO_HEADERWizardDialog.Builderpublic final WizardDialog.Builder enableTabLayout(boolean enable)
enable - True, if the tabs should be enabled, false otherwiseWizardDialog.Builderpublic final WizardDialog.Builder showTabLayout(boolean show)
show - True, if the tabs, which indicate the currently shown fragment, should be shown,
false otherwiseWizardDialog.Builderpublic final WizardDialog.Builder setTabIndicatorHeight(int height)
height - The height, which should be set, in pixels as an Integer value. The
height must be at least 1WizardDialog.Builderpublic final WizardDialog.Builder setTabIndicatorColor(int color)
color - The color, which should be set, as an Integer valueWizardDialog.Builderpublic final WizardDialog.Builder setTabTextColor(int textColor)
textColor - The text color, which should be set, as an Integer valueWizardDialog.Builderpublic final WizardDialog.Builder setTabSelectedTextColor(int selectedTextColor)
selectedTextColor - The selected text color, which should be set, as an Integer valueWizardDialog.Builderpublic final WizardDialog.Builder enableSwipe(boolean enable)
enable - True, if switching fragments using swipe gestures should be enabled, false
otherwiseWizardDialog.Builderpublic final WizardDialog.Builder showButtonBar(boolean show)
show - True, if the dialog's buttons should be shown, false otherwiseWizardDialog.Builderpublic final WizardDialog.Builder setButtonTextColor(int color)
color - The color, which should be set, as an Integer valueWizardDialog.Builderpublic final WizardDialog.Builder showButtonBarDivider(boolean show)
show - True, if the divider, which is located above the dialog's buttons, should be
show, false otherwiseWizardDialog.Builderpublic final WizardDialog.Builder setButtonBarDividerColor(int color)
color - The color, which should be set, as an Integer valueWizardDialog.Builderpublic final WizardDialog.Builder setBackButtonText(int resourceId)
resourceId - The resource id of the text, which should be set, as an Integer value.
The resource id must correspond to a valid string resourceWizardDialog.Builderpublic final WizardDialog.Builder setBackButtonText(java.lang.CharSequence text)
text - The text, which should be set, as an instance of the class CharSequence.
The text may neither be null, nor emptyWizardDialog.Builderpublic final WizardDialog.Builder setNextButtonText(int resourceId)
resourceId - The resource id of the text, which should be set, as an Integer value.
The resource id must correspond to a valid string resourceWizardDialog.Builderpublic final WizardDialog.Builder setNextButtonText(java.lang.CharSequence text)
text - The text, which should be set, as an instance of the class CharSequence.
The text may neither be null, nor emptyWizardDialog.Builderpublic final WizardDialog.Builder setFinishButtonText(int resourceId)
resourceId - The resource id of the text, which should be set, as an Integer value.
The resource id must correspond to a valid string resourceWizardDialog.Builderpublic final WizardDialog.Builder setFinishButtonText(java.lang.CharSequence text)
text - The text, which should be set, as an instance of the class CharSequence.
The text may neither be null, nor emptyWizardDialog.Builderpublic final WizardDialog.Builder addWizardListener(WizardDialog.WizardListener listener)
onSaveInstanceState-method, because it is not serializable. Therefore this
method must be called again after configuration changes, e.g when the orientation of the
device has changed, in order to re-register the listeners.listener - The listener, which should be added, as an instance of the type WizardDialog.WizardListener. The listener may not be nullWizardDialog.Builderpublic final WizardDialog show(FragmentManager fragmentManager, java.lang.String tag)
fragmentManager - The fragment manager, which should be used by the dialog, as an instance of the
class FragmentManager. The fragment manager may not be nulltag - The tag, which should be used to show the dialog, as a String or null, if
no tag should be usedWizardDialogpublic final WizardDialog show(FragmentTransaction fragmentTransaction, java.lang.String tag)
fragmentTransaction - The fragment transaction, which should be used to show the dialog, as an instance
of the class FragmentTransaction. The fragment transaction may not be nulltag - The tag, which should be used to show the dialog, as a String or null, if
no tag should be usedWizardDialogprotected final WizardDialog onCreateDialog(android.content.Context context, int themeResourceId)
AbstractMaterialDialogBuilderonCreateDialog in class AbstractMaterialDialogBuilder<WizardDialog,WizardDialog.Builder>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 valueprotected final void obtainStyledAttributes(int themeResourceId)
AbstractMaterialDialogBuilderobtainStyledAttributes in class AbstractHeaderDialogBuilder<WizardDialog,WizardDialog.Builder>themeResourceId - 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 style resource