public static class MaterialDialog.Builder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected <any> |
adapter |
protected boolean |
alwaysCallInputCallback |
protected boolean |
alwaysCallMultiChoiceCallback |
protected boolean |
alwaysCallSingleChoiceCallback |
protected boolean |
autoDismiss |
protected int |
backgroundColor |
protected int |
btnSelectorNegative |
protected int |
btnSelectorNeutral |
protected int |
btnSelectorPositive |
protected int |
btnSelectorStacked |
protected GravityEnum |
btnStackedGravity |
protected int |
buttonRippleColor |
protected GravityEnum |
buttonsGravity |
protected MaterialDialog.ButtonCallback |
callback |
protected boolean |
cancelable |
protected boolean |
canceledOnTouchOutside |
protected android.content.DialogInterface.OnCancelListener |
cancelListener |
protected java.lang.CharSequence |
checkBoxPrompt |
protected boolean |
checkBoxPromptInitiallyChecked |
protected android.widget.CompoundButton.OnCheckedChangeListener |
checkBoxPromptListener |
protected android.content.res.ColorStateList |
choiceWidgetColor |
protected java.lang.CharSequence |
content |
protected int |
contentColor |
protected boolean |
contentColorSet |
protected GravityEnum |
contentGravity |
protected float |
contentLineSpacingMultiplier |
protected android.content.Context |
context |
protected int |
customTheme |
protected android.view.View |
customView |
protected java.lang.Integer[] |
disabledIndices |
protected android.content.DialogInterface.OnDismissListener |
dismissListener |
protected int |
dividerColor |
protected boolean |
dividerColorSet |
protected android.graphics.drawable.Drawable |
icon |
protected boolean |
indeterminateIsHorizontalProgress |
protected boolean |
indeterminateProgress |
protected boolean |
inputAllowEmpty |
protected MaterialDialog.InputCallback |
inputCallback |
protected java.lang.CharSequence |
inputHint |
protected int |
inputMaxLength |
protected int |
inputMinLength |
protected java.lang.CharSequence |
inputPrefill |
protected int |
inputRangeErrorColor |
protected int |
inputType |
protected int |
itemColor |
protected boolean |
itemColorSet |
protected int[] |
itemIds |
protected java.util.ArrayList<java.lang.CharSequence> |
items |
protected GravityEnum |
itemsGravity |
protected android.content.DialogInterface.OnKeyListener |
keyListener |
protected RecyclerView.LayoutManager |
layoutManager |
protected boolean |
limitIconToDefaultSize |
protected android.content.res.ColorStateList |
linkColor |
protected MaterialDialog.ListCallback |
listCallback |
protected MaterialDialog.ListCallbackMultiChoice |
listCallbackMultiChoice |
protected MaterialDialog.ListCallbackSingleChoice |
listCallbackSingleChoice |
protected MaterialDialog.ListLongCallback |
listLongCallback |
protected int |
listSelector |
protected int |
maxIconSize |
protected android.graphics.Typeface |
mediumFont |
protected android.content.res.ColorStateList |
negativeColor |
protected boolean |
negativeColorSet |
protected boolean |
negativeFocus |
protected java.lang.CharSequence |
negativeText |
protected android.content.res.ColorStateList |
neutralColor |
protected boolean |
neutralColorSet |
protected boolean |
neutralFocus |
protected java.lang.CharSequence |
neutralText |
protected MaterialDialog.SingleButtonCallback |
onAnyCallback |
protected MaterialDialog.SingleButtonCallback |
onNegativeCallback |
protected MaterialDialog.SingleButtonCallback |
onNeutralCallback |
protected MaterialDialog.SingleButtonCallback |
onPositiveCallback |
protected android.content.res.ColorStateList |
positiveColor |
protected boolean |
positiveColorSet |
protected boolean |
positiveFocus |
protected java.lang.CharSequence |
positiveText |
protected int |
progress |
protected int |
progressMax |
protected java.lang.String |
progressNumberFormat |
protected java.text.NumberFormat |
progressPercentFormat |
protected android.graphics.Typeface |
regularFont |
protected int |
selectedIndex |
protected java.lang.Integer[] |
selectedIndices |
protected android.content.DialogInterface.OnShowListener |
showListener |
protected boolean |
showMinMax |
protected StackingBehavior |
stackingBehavior |
protected java.lang.Object |
tag |
protected Theme |
theme |
protected java.lang.CharSequence |
title |
protected int |
titleColor |
protected boolean |
titleColorSet |
protected GravityEnum |
titleGravity |
protected int |
widgetColor |
protected boolean |
widgetColorSet |
protected boolean |
wrapCustomViewInScroll |
| Constructor and Description |
|---|
Builder(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
MaterialDialog.Builder |
adapter(<any> adapter,
RecyclerView.LayoutManager layoutManager)
Sets a custom
android.support.v7.widget.RecyclerView.Adapter for the dialog's list |
MaterialDialog.Builder |
alwaysCallInputCallback() |
MaterialDialog.Builder |
alwaysCallMultiChoiceCallback()
By default, the multi choice callback is only called when the user clicks the positive button
or if there are no buttons.
|
MaterialDialog.Builder |
alwaysCallSingleChoiceCallback()
By default, the single choice callback is only called when the user clicks the positive
button or if there are no buttons.
|
MaterialDialog.Builder |
autoDismiss(boolean dismiss)
This defaults to true.
|
MaterialDialog.Builder |
backgroundColor(int color) |
MaterialDialog.Builder |
backgroundColorAttr(int colorAttr) |
MaterialDialog.Builder |
backgroundColorRes(int colorRes) |
MaterialDialog.Builder |
btnSelector(int selectorRes)
设置按钮的点击效果
|
MaterialDialog.Builder |
btnSelector(int selectorRes,
DialogAction which) |
MaterialDialog.Builder |
btnSelectorStacked(int selectorRes) |
MaterialDialog.Builder |
btnStackedGravity(GravityEnum gravity)
Sets the gravity used for the text in stacked action buttons.
|
MaterialDialog |
build() |
MaterialDialog.Builder |
buttonRippleColor(int color)
设置按钮点击的波纹颜色
|
MaterialDialog.Builder |
buttonRippleColorAttr(int colorAttr) |
MaterialDialog.Builder |
buttonRippleColorRes(int colorRes) |
MaterialDialog.Builder |
buttonsGravity(GravityEnum gravity) |
MaterialDialog.Builder |
callback(MaterialDialog.ButtonCallback callback) |
MaterialDialog.Builder |
cancelable(boolean cancelable)
设置对话框点击外部是否可消失
|
MaterialDialog.Builder |
canceledOnTouchOutside(boolean canceledOnTouchOutside) |
MaterialDialog.Builder |
cancelListener(android.content.DialogInterface.OnCancelListener listener)
设置对话框的取消监听
|
MaterialDialog.Builder |
checkBoxPrompt(java.lang.CharSequence prompt,
boolean initiallyChecked,
android.widget.CompoundButton.OnCheckedChangeListener checkListener) |
MaterialDialog.Builder |
checkBoxPromptRes(int prompt,
boolean initiallyChecked,
android.widget.CompoundButton.OnCheckedChangeListener checkListener) |
MaterialDialog.Builder |
choiceWidgetColor(android.content.res.ColorStateList colorStateList) |
MaterialDialog.Builder |
content(java.lang.CharSequence content)
设置对话框的内容
|
MaterialDialog.Builder |
content(int contentRes)
设置对话框的内容
|
MaterialDialog.Builder |
content(int contentRes,
boolean html) |
MaterialDialog.Builder |
content(int contentRes,
java.lang.Object... formatArgs) |
MaterialDialog.Builder |
contentColor(int color)
设置对话框内容的文字颜色
|
MaterialDialog.Builder |
contentColorAttr(int colorAttr) |
MaterialDialog.Builder |
contentColorRes(int colorRes) |
MaterialDialog.Builder |
contentGravity(GravityEnum gravity)
设置对话框内容的对齐方式
|
MaterialDialog.Builder |
contentLineSpacing(float multiplier) |
MaterialDialog.Builder |
customTheme(int themeStyle)
自定义dialog主题
|
MaterialDialog.Builder |
customView(int layoutRes,
boolean wrapInScrollView)
设置对话框自定义布局
|
MaterialDialog.Builder |
customView(android.view.View view,
boolean wrapInScrollView) |
MaterialDialog.Builder |
dismissListener(android.content.DialogInterface.OnDismissListener listener)
设置对话框的消失监听
|
MaterialDialog.Builder |
dividerColor(int color)
设置分割线的颜色
|
MaterialDialog.Builder |
dividerColorAttr(int colorAttr) |
MaterialDialog.Builder |
dividerColorRes(int colorRes) |
android.content.Context |
getContext() |
int |
getItemColor() |
android.graphics.Typeface |
getRegularFont() |
MaterialDialog.Builder |
icon(android.graphics.drawable.Drawable icon)
设置对话框的图标
|
MaterialDialog.Builder |
iconAttr(int iconAttr) |
MaterialDialog.Builder |
iconRes(int icon) |
MaterialDialog.Builder |
input(java.lang.CharSequence hint,
java.lang.CharSequence prefill,
boolean allowEmptyInput,
MaterialDialog.InputCallback callback)
设置对话框输入框的样式
|
MaterialDialog.Builder |
input(java.lang.CharSequence hint,
java.lang.CharSequence prefill,
MaterialDialog.InputCallback callback) |
MaterialDialog.Builder |
input(int hint,
int prefill,
boolean allowEmptyInput,
MaterialDialog.InputCallback callback) |
MaterialDialog.Builder |
input(int hint,
int prefill,
MaterialDialog.InputCallback callback) |
MaterialDialog.Builder |
inputRange(int minLength,
int maxLength) |
MaterialDialog.Builder |
inputRange(int minLength,
int maxLength,
int errorColor) |
MaterialDialog.Builder |
inputRangeRes(int minLength,
int maxLength,
int errorColor)
Same as #
inputRange(int, int, int), but it takes a color resource ID for the error
color. |
MaterialDialog.Builder |
inputType(int type) |
MaterialDialog.Builder |
items(java.lang.CharSequence... items) |
MaterialDialog.Builder |
items(java.util.Collection collection)
设置对话框列表内容的集合
|
MaterialDialog.Builder |
items(int itemsRes) |
MaterialDialog.Builder |
itemsCallback(MaterialDialog.ListCallback callback)
设置对话框列表的点击回调
|
MaterialDialog.Builder |
itemsCallbackMultiChoice(java.lang.Integer[] selectedIndices,
MaterialDialog.ListCallbackMultiChoice callback)
设置对话框列表多选监听
Pass null for the selected indices to leave all options unselected initially.
|
MaterialDialog.Builder |
itemsCallbackSingleChoice(int selectedIndex,
MaterialDialog.ListCallbackSingleChoice callback)
设置对话框列表单选监听
Pass anything below 0 (such as -1) for the selected index to leave all options unselected
initially.
|
MaterialDialog.Builder |
itemsColor(int color)
设置对话框列表字体的颜色
|
MaterialDialog.Builder |
itemsColorAttr(int colorAttr) |
MaterialDialog.Builder |
itemsColorRes(int colorRes) |
MaterialDialog.Builder |
itemsDisabledIndices(java.lang.Integer... disabledIndices)
Sets indices of items that are not clickable.
|
MaterialDialog.Builder |
itemsGravity(GravityEnum gravity) |
MaterialDialog.Builder |
itemsIds(int idsArrayRes) |
MaterialDialog.Builder |
itemsIds(int[] idsArray) |
MaterialDialog.Builder |
itemsLongCallback(MaterialDialog.ListLongCallback callback)
设置对话框列表的长按点击回调
|
MaterialDialog.Builder |
keyListener(android.content.DialogInterface.OnKeyListener listener) |
MaterialDialog.Builder |
limitIconToDefaultSize()
Limits the display size of a set icon to 40dp.
|
MaterialDialog.Builder |
linkColor(android.content.res.ColorStateList colorStateList) |
MaterialDialog.Builder |
linkColor(int color) |
MaterialDialog.Builder |
linkColorAttr(int colorAttr) |
MaterialDialog.Builder |
linkColorRes(int colorRes) |
MaterialDialog.Builder |
listSelector(int selectorRes)
设置对话框列表的点击效果
|
MaterialDialog.Builder |
maxIconSize(int maxIconSize) |
MaterialDialog.Builder |
maxIconSizeRes(int maxIconSizeRes) |
MaterialDialog.Builder |
negativeColor(android.content.res.ColorStateList colorStateList) |
MaterialDialog.Builder |
negativeColor(int color)
设置中性按钮文字的颜色
|
MaterialDialog.Builder |
negativeColorAttr(int colorAttr) |
MaterialDialog.Builder |
negativeColorRes(int colorRes) |
MaterialDialog.Builder |
negativeFocus(boolean isFocusedDefault) |
MaterialDialog.Builder |
negativeText(java.lang.CharSequence message)
设置否定按钮的文字
|
MaterialDialog.Builder |
negativeText(int negativeRes) |
MaterialDialog.Builder |
neutralColor(android.content.res.ColorStateList colorStateList) |
MaterialDialog.Builder |
neutralColor(int color) |
MaterialDialog.Builder |
neutralColorAttr(int colorAttr) |
MaterialDialog.Builder |
neutralColorRes(int colorRes) |
MaterialDialog.Builder |
neutralFocus(boolean isFocusedDefault) |
MaterialDialog.Builder |
neutralText(java.lang.CharSequence message)
设置中性按钮的文字
|
MaterialDialog.Builder |
neutralText(int neutralRes)
设置中性按钮的文字
|
MaterialDialog.Builder |
onAny(MaterialDialog.SingleButtonCallback callback) |
MaterialDialog.Builder |
onNegative(MaterialDialog.SingleButtonCallback callback)
设置否定按钮的点击回调
|
MaterialDialog.Builder |
onNeutral(MaterialDialog.SingleButtonCallback callback)
设置中性按钮的点击回调
|
MaterialDialog.Builder |
onPositive(MaterialDialog.SingleButtonCallback callback)
设置确定按钮的点击回调
|
MaterialDialog.Builder |
positiveColor(android.content.res.ColorStateList colorStateList) |
MaterialDialog.Builder |
positiveColor(int color)
设置确定按钮文字的颜色
|
MaterialDialog.Builder |
positiveColorAttr(int colorAttr) |
MaterialDialog.Builder |
positiveColorRes(int colorRes) |
MaterialDialog.Builder |
positiveFocus(boolean isFocusedDefault) |
MaterialDialog.Builder |
positiveText(java.lang.CharSequence message)
设置确定按钮的文字
|
MaterialDialog.Builder |
positiveText(int positiveRes)
设置确定按钮的文字
|
MaterialDialog.Builder |
progress(boolean indeterminate,
int max)
Makes this dialog a progress dialog.
|
MaterialDialog.Builder |
progress(boolean indeterminate,
int max,
boolean showMinMax)
Makes this dialog a progress dialog.
|
MaterialDialog.Builder |
progressIndeterminateStyle(boolean horizontal)
By default, indeterminate progress dialogs will use a circular indicator.
|
MaterialDialog.Builder |
progressNumberFormat(java.lang.String format)
hange the format of the small text showing current and maximum units of progress.
|
MaterialDialog.Builder |
progressPercentFormat(java.text.NumberFormat format)
Change the format of the small text showing the percentage of progress.
|
MaterialDialog |
show() |
MaterialDialog.Builder |
showListener(android.content.DialogInterface.OnShowListener listener)
设置对话框的显示监听
|
MaterialDialog.Builder |
stackingBehavior(StackingBehavior behavior)
Sets action button stacking behavior.
|
MaterialDialog.Builder |
tag(java.lang.Object tag) |
MaterialDialog.Builder |
theme(Theme theme) |
MaterialDialog.Builder |
title(java.lang.CharSequence title)
设置标题
|
MaterialDialog.Builder |
title(int titleRes) |
MaterialDialog.Builder |
titleColor(int color)
设置标题的字体颜色
|
MaterialDialog.Builder |
titleColorAttr(int colorAttr) |
MaterialDialog.Builder |
titleColorRes(int colorRes) |
MaterialDialog.Builder |
titleGravity(GravityEnum gravity)
设置标题的对齐方式
|
MaterialDialog.Builder |
typeface(java.lang.String medium,
java.lang.String regular)
Sets the fonts used in the dialog, by file names.
|
MaterialDialog.Builder |
typeface(android.graphics.Typeface medium,
android.graphics.Typeface regular)
Sets the fonts used in the dialog.
|
MaterialDialog.Builder |
widgetColor(int color) |
MaterialDialog.Builder |
widgetColorAttr(int colorAttr) |
MaterialDialog.Builder |
widgetColorRes(int colorRes) |
protected final android.content.Context context
protected java.lang.CharSequence title
protected GravityEnum titleGravity
protected GravityEnum contentGravity
protected GravityEnum btnStackedGravity
protected GravityEnum itemsGravity
protected GravityEnum buttonsGravity
protected int buttonRippleColor
protected int titleColor
protected int contentColor
protected java.lang.CharSequence content
protected java.util.ArrayList<java.lang.CharSequence> items
protected java.lang.CharSequence positiveText
protected java.lang.CharSequence neutralText
protected java.lang.CharSequence negativeText
protected boolean positiveFocus
protected boolean neutralFocus
protected boolean negativeFocus
protected android.view.View customView
protected int widgetColor
protected android.content.res.ColorStateList choiceWidgetColor
protected android.content.res.ColorStateList positiveColor
protected android.content.res.ColorStateList negativeColor
protected android.content.res.ColorStateList neutralColor
protected android.content.res.ColorStateList linkColor
protected MaterialDialog.ButtonCallback callback
protected MaterialDialog.SingleButtonCallback onPositiveCallback
protected MaterialDialog.SingleButtonCallback onNegativeCallback
protected MaterialDialog.SingleButtonCallback onNeutralCallback
protected MaterialDialog.SingleButtonCallback onAnyCallback
protected MaterialDialog.ListCallback listCallback
protected MaterialDialog.ListLongCallback listLongCallback
protected MaterialDialog.ListCallbackSingleChoice listCallbackSingleChoice
protected MaterialDialog.ListCallbackMultiChoice listCallbackMultiChoice
protected boolean alwaysCallMultiChoiceCallback
protected boolean alwaysCallSingleChoiceCallback
protected Theme theme
protected int customTheme
protected boolean cancelable
protected boolean canceledOnTouchOutside
protected float contentLineSpacingMultiplier
protected int selectedIndex
protected java.lang.Integer[] selectedIndices
protected java.lang.Integer[] disabledIndices
protected boolean autoDismiss
protected android.graphics.Typeface regularFont
protected android.graphics.Typeface mediumFont
protected android.graphics.drawable.Drawable icon
protected boolean limitIconToDefaultSize
protected int maxIconSize
protected <any> adapter
protected RecyclerView.LayoutManager layoutManager
protected android.content.DialogInterface.OnDismissListener dismissListener
protected android.content.DialogInterface.OnCancelListener cancelListener
protected android.content.DialogInterface.OnKeyListener keyListener
protected android.content.DialogInterface.OnShowListener showListener
protected StackingBehavior stackingBehavior
protected boolean wrapCustomViewInScroll
protected int dividerColor
protected int backgroundColor
protected int itemColor
protected boolean indeterminateProgress
protected boolean showMinMax
protected int progress
protected int progressMax
protected java.lang.CharSequence inputPrefill
protected java.lang.CharSequence inputHint
protected MaterialDialog.InputCallback inputCallback
protected boolean inputAllowEmpty
protected int inputType
protected boolean alwaysCallInputCallback
protected int inputMinLength
protected int inputMaxLength
protected int inputRangeErrorColor
protected int[] itemIds
protected java.lang.CharSequence checkBoxPrompt
protected boolean checkBoxPromptInitiallyChecked
protected android.widget.CompoundButton.OnCheckedChangeListener checkBoxPromptListener
protected java.lang.String progressNumberFormat
protected java.text.NumberFormat progressPercentFormat
protected boolean indeterminateIsHorizontalProgress
protected boolean titleColorSet
protected boolean contentColorSet
protected boolean itemColorSet
protected boolean positiveColorSet
protected boolean neutralColorSet
protected boolean negativeColorSet
protected boolean widgetColorSet
protected boolean dividerColorSet
protected int listSelector
protected int btnSelectorStacked
protected int btnSelectorPositive
protected int btnSelectorNeutral
protected int btnSelectorNegative
protected java.lang.Object tag
public final android.content.Context getContext()
public final int getItemColor()
public final android.graphics.Typeface getRegularFont()
public MaterialDialog.Builder title(int titleRes)
public MaterialDialog.Builder title(java.lang.CharSequence title)
title - public MaterialDialog.Builder titleGravity(GravityEnum gravity)
gravity - public MaterialDialog.Builder buttonRippleColor(int color)
color - public MaterialDialog.Builder buttonRippleColorRes(int colorRes)
public MaterialDialog.Builder buttonRippleColorAttr(int colorAttr)
public MaterialDialog.Builder titleColor(int color)
color - public MaterialDialog.Builder titleColorRes(int colorRes)
public MaterialDialog.Builder titleColorAttr(int colorAttr)
public MaterialDialog.Builder typeface(android.graphics.Typeface medium, android.graphics.Typeface regular)
typeface(String,
String) instead, to avoid duplicate Typeface allocations and high memory usage.medium - The font used on titles and action buttons. Null uses device default.regular - The font used everywhere else, like on the content and list items. Null uses
device default.public MaterialDialog.Builder typeface(java.lang.String medium, java.lang.String regular)
medium - The name of font in assets/fonts used on titles and action buttons (null uses
device default). E.g. [your-project]/app/main/assets/fonts/[medium]regular - The name of font in assets/fonts used everywhere else, like content and list
items (null uses device default). E.g. [your-project]/app/main/assets/fonts/[regular]public MaterialDialog.Builder icon(android.graphics.drawable.Drawable icon)
icon - public MaterialDialog.Builder iconRes(int icon)
public MaterialDialog.Builder iconAttr(int iconAttr)
public MaterialDialog.Builder content(int contentRes)
contentRes - public MaterialDialog.Builder content(int contentRes, boolean html)
public MaterialDialog.Builder content(java.lang.CharSequence content)
content - public MaterialDialog.Builder content(int contentRes, java.lang.Object... formatArgs)
public MaterialDialog.Builder contentColor(int color)
color - public MaterialDialog.Builder contentColorRes(int colorRes)
public MaterialDialog.Builder contentColorAttr(int colorAttr)
public MaterialDialog.Builder contentGravity(GravityEnum gravity)
gravity - public MaterialDialog.Builder contentLineSpacing(float multiplier)
public MaterialDialog.Builder items(java.util.Collection collection)
collection - public MaterialDialog.Builder items(int itemsRes)
public MaterialDialog.Builder items(java.lang.CharSequence... items)
public MaterialDialog.Builder itemsCallback(MaterialDialog.ListCallback callback)
callback - public MaterialDialog.Builder itemsLongCallback(MaterialDialog.ListLongCallback callback)
callback - public MaterialDialog.Builder itemsColor(int color)
color - public MaterialDialog.Builder itemsColorRes(int colorRes)
public MaterialDialog.Builder itemsColorAttr(int colorAttr)
public MaterialDialog.Builder itemsGravity(GravityEnum gravity)
public MaterialDialog.Builder itemsIds(int[] idsArray)
public MaterialDialog.Builder itemsIds(int idsArrayRes)
public MaterialDialog.Builder buttonsGravity(GravityEnum gravity)
public MaterialDialog.Builder itemsCallbackSingleChoice(int selectedIndex, MaterialDialog.ListCallbackSingleChoice callback)
selectedIndex - The checkbox index that will be selected initially.callback - The callback that will be called when the presses the positive button.public MaterialDialog.Builder alwaysCallSingleChoiceCallback()
public MaterialDialog.Builder itemsCallbackMultiChoice(java.lang.Integer[] selectedIndices, MaterialDialog.ListCallbackMultiChoice callback)
selectedIndices - The radio button indices that will be selected initially.callback - The callback that will be called when the presses the positive button.public MaterialDialog.Builder itemsDisabledIndices(java.lang.Integer... disabledIndices)
disabledIndices - The item indices that will be disabled from selection.public MaterialDialog.Builder alwaysCallMultiChoiceCallback()
public MaterialDialog.Builder positiveText(int positiveRes)
positiveRes - public MaterialDialog.Builder positiveText(java.lang.CharSequence message)
message - public MaterialDialog.Builder positiveColor(int color)
color - public MaterialDialog.Builder positiveColorRes(int colorRes)
public MaterialDialog.Builder positiveColorAttr(int colorAttr)
public MaterialDialog.Builder positiveColor(android.content.res.ColorStateList colorStateList)
public MaterialDialog.Builder positiveFocus(boolean isFocusedDefault)
public MaterialDialog.Builder neutralText(int neutralRes)
neutralRes - public MaterialDialog.Builder neutralText(java.lang.CharSequence message)
message - public MaterialDialog.Builder negativeColor(int color)
color - public MaterialDialog.Builder negativeColorRes(int colorRes)
public MaterialDialog.Builder negativeColorAttr(int colorAttr)
public MaterialDialog.Builder negativeColor(android.content.res.ColorStateList colorStateList)
public MaterialDialog.Builder negativeText(int negativeRes)
public MaterialDialog.Builder negativeText(java.lang.CharSequence message)
message - public MaterialDialog.Builder negativeFocus(boolean isFocusedDefault)
public MaterialDialog.Builder neutralColor(int color)
public MaterialDialog.Builder neutralColorRes(int colorRes)
public MaterialDialog.Builder neutralColorAttr(int colorAttr)
public MaterialDialog.Builder neutralColor(android.content.res.ColorStateList colorStateList)
public MaterialDialog.Builder neutralFocus(boolean isFocusedDefault)
public MaterialDialog.Builder linkColor(int color)
public MaterialDialog.Builder linkColorRes(int colorRes)
public MaterialDialog.Builder linkColorAttr(int colorAttr)
public MaterialDialog.Builder linkColor(android.content.res.ColorStateList colorStateList)
public MaterialDialog.Builder listSelector(int selectorRes)
selectorRes - public MaterialDialog.Builder btnSelectorStacked(int selectorRes)
public MaterialDialog.Builder btnSelector(int selectorRes)
selectorRes - public MaterialDialog.Builder btnSelector(int selectorRes, DialogAction which)
public MaterialDialog.Builder btnStackedGravity(GravityEnum gravity)
GravityEnum.END.gravity - The gravity to use.public MaterialDialog.Builder checkBoxPrompt(java.lang.CharSequence prompt, boolean initiallyChecked, android.widget.CompoundButton.OnCheckedChangeListener checkListener)
public MaterialDialog.Builder checkBoxPromptRes(int prompt, boolean initiallyChecked, android.widget.CompoundButton.OnCheckedChangeListener checkListener)
public MaterialDialog.Builder customView(int layoutRes, boolean wrapInScrollView)
layoutRes - wrapInScrollView - public MaterialDialog.Builder customView(android.view.View view, boolean wrapInScrollView)
public MaterialDialog.Builder progress(boolean indeterminate, int max)
indeterminate - If true, an infinite circular spinner is shown. If false, a horizontal
progress bar is shown that is incremented or set via the built MaterialDialog instance.max - When indeterminate is false, the max value the horizontal progress bar can get to.public MaterialDialog.Builder progress(boolean indeterminate, int max, boolean showMinMax)
indeterminate - If true, an infinite circular spinner is shown. If false, a horizontal
progress bar is shown that is incremented or set via the built MaterialDialog instance.max - When indeterminate is false, the max value the horizontal progress bar can get to.showMinMax - For determinate dialogs, the min and max will be displayed to the left
(start) of the progress bar, e.g. 50/100.public MaterialDialog.Builder progressNumberFormat(java.lang.String format)
public MaterialDialog.Builder progressPercentFormat(java.text.NumberFormat format)
public MaterialDialog.Builder progressIndeterminateStyle(boolean horizontal)
public MaterialDialog.Builder widgetColor(int color)
public MaterialDialog.Builder widgetColorRes(int colorRes)
public MaterialDialog.Builder widgetColorAttr(int colorAttr)
public MaterialDialog.Builder choiceWidgetColor(android.content.res.ColorStateList colorStateList)
public MaterialDialog.Builder dividerColor(int color)
color - public MaterialDialog.Builder dividerColorRes(int colorRes)
public MaterialDialog.Builder dividerColorAttr(int colorAttr)
public MaterialDialog.Builder backgroundColor(int color)
public MaterialDialog.Builder backgroundColorRes(int colorRes)
public MaterialDialog.Builder backgroundColorAttr(int colorAttr)
public MaterialDialog.Builder callback(MaterialDialog.ButtonCallback callback)
public MaterialDialog.Builder onPositive(MaterialDialog.SingleButtonCallback callback)
callback - public MaterialDialog.Builder onNegative(MaterialDialog.SingleButtonCallback callback)
callback - public MaterialDialog.Builder onNeutral(MaterialDialog.SingleButtonCallback callback)
callback - public MaterialDialog.Builder onAny(MaterialDialog.SingleButtonCallback callback)
public MaterialDialog.Builder theme(Theme theme)
public MaterialDialog.Builder customTheme(int themeStyle)
themeStyle - public MaterialDialog.Builder cancelable(boolean cancelable)
cancelable - public MaterialDialog.Builder canceledOnTouchOutside(boolean canceledOnTouchOutside)
public MaterialDialog.Builder autoDismiss(boolean dismiss)
dismiss - Whether or not to dismiss the dialog automatically.public MaterialDialog.Builder adapter(<any> adapter, RecyclerView.LayoutManager layoutManager)
android.support.v7.widget.RecyclerView.Adapter for the dialog's listadapter - The adapter to set to the list.layoutManager - The layout manager to use in the RecyclerView. Pass null to use the
default linear manager.public MaterialDialog.Builder limitIconToDefaultSize()
public MaterialDialog.Builder maxIconSize(int maxIconSize)
public MaterialDialog.Builder maxIconSizeRes(int maxIconSizeRes)
public MaterialDialog.Builder showListener(android.content.DialogInterface.OnShowListener listener)
listener - public MaterialDialog.Builder dismissListener(android.content.DialogInterface.OnDismissListener listener)
listener - public MaterialDialog.Builder cancelListener(android.content.DialogInterface.OnCancelListener listener)
listener - public MaterialDialog.Builder keyListener(android.content.DialogInterface.OnKeyListener listener)
public MaterialDialog.Builder stackingBehavior(StackingBehavior behavior)
behavior - The behavior of the action button stacking logic.public MaterialDialog.Builder input(java.lang.CharSequence hint, java.lang.CharSequence prefill, boolean allowEmptyInput, MaterialDialog.InputCallback callback)
hint - prefill - allowEmptyInput - callback - public MaterialDialog.Builder input(java.lang.CharSequence hint, java.lang.CharSequence prefill, MaterialDialog.InputCallback callback)
public MaterialDialog.Builder input(int hint, int prefill, boolean allowEmptyInput, MaterialDialog.InputCallback callback)
public MaterialDialog.Builder input(int hint, int prefill, MaterialDialog.InputCallback callback)
public MaterialDialog.Builder inputType(int type)
public MaterialDialog.Builder inputRange(int minLength, int maxLength)
public MaterialDialog.Builder inputRange(int minLength, int maxLength, int errorColor)
errorColor - Pass in 0 for the default red error color (as specified in guidelines).public MaterialDialog.Builder inputRangeRes(int minLength, int maxLength, int errorColor)
inputRange(int, int, int), but it takes a color resource ID for the error
color.public MaterialDialog.Builder alwaysCallInputCallback()
public MaterialDialog.Builder tag(java.lang.Object tag)
public MaterialDialog build()
public MaterialDialog show()