public static class MaterialDialog.Builder
extends java.lang.Object
MaterialDialog
.
Constructor and Description |
---|
Builder(android.app.Activity activity)
|
Modifier and Type | Method and Description |
---|---|
MaterialDialog
|
build()
Build the
MaterialDialog .
|
MaterialDialog.Builder
|
setAnimation(int animationResId)
It sets the resource json to the
com.airbnb.lottie.LottieAnimationView .
|
MaterialDialog.Builder
|
setAnimation(java.lang.String fileName)
It sets the json file to the
com.airbnb.lottie.LottieAnimationView
from assets.
|
MaterialDialog.Builder
|
setCancelable(boolean isCancelable)
|
MaterialDialog.Builder
|
setMessage(java.lang.String message)
|
MaterialDialog.Builder
|
setNegativeButton(java.lang.String name,
AbstractDialog.OnClickListener onClickListener)
Sets the Negative Button to Material Dialog
without icon.
|
MaterialDialog.Builder
|
setNegativeButton(java.lang.String name,
int icon,
AbstractDialog.OnClickListener onClickListener)
Sets the Negative Button to Material Dialog
with icon
|
MaterialDialog.Builder
|
setPositiveButton(java.lang.String name,
AbstractDialog.OnClickListener onClickListener)
Sets the Positive Button to Material Dialog
without icon
|
MaterialDialog.Builder
|
setPositiveButton(java.lang.String name,
int icon,
AbstractDialog.OnClickListener onClickListener)
Sets the Positive Button to Material Dialog
with icon
|
MaterialDialog.Builder
|
setTitle(java.lang.String title)
|
public Builder(android.app.Activity activity)
activity
- where Material Dialog is to be
built.
public MaterialDialog.Builder setTitle(java.lang.String title)
title
- Sets the Title of Material Dialog.public MaterialDialog.Builder setMessage(java.lang.String message)
message
- Sets the Message of Material Dialog.
public MaterialDialog.Builder setCancelable(boolean isCancelable)
isCancelable
- Sets cancelable property of
Material Dialog.
public MaterialDialog.Builder setPositiveButton(java.lang.String name, AbstractDialog.OnClickListener onClickListener)
name
- sets the name/label of button.onClickListener
- interface for callback event
on click of button.
this, for chaining.
public MaterialDialog.Builder setPositiveButton(java.lang.String name, int icon, AbstractDialog.OnClickListener onClickListener)
name
- sets the name/label of button.icon
- sets the resource icon for button.onClickListener
- interface for callback event
on click of button.
public MaterialDialog.Builder setNegativeButton(java.lang.String name, AbstractDialog.OnClickListener onClickListener)
name
- sets the name/label of button.onClickListener
- interface for callback event
on click of button.
this, for chaining.
public MaterialDialog.Builder setNegativeButton(java.lang.String name, int icon, AbstractDialog.OnClickListener onClickListener)
name
- sets the name/label of button.icon
- sets the resource icon for button.onClickListener
- interface for callback event
on click of button.
public MaterialDialog.Builder setAnimation(int animationResId)
com.airbnb.lottie.LottieAnimationView
.
animationResId
- sets the resource to com.airbnb.lottie.LottieAnimationView
.
public MaterialDialog.Builder setAnimation(java.lang.String fileName)
com.airbnb.lottie.LottieAnimationView
from assets.
fileName
- sets the file from assets to com.airbnb.lottie.LottieAnimationView
.
public MaterialDialog build()
MaterialDialog
.