public static class Dialog.Builder extends java.lang.Object implements DialogFragment.Builder, android.os.Parcelable
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<Dialog.Builder> |
CREATOR |
protected int |
mContentViewId |
protected Dialog |
mDialog |
protected java.lang.CharSequence |
mNegative |
protected java.lang.CharSequence |
mNeutral |
protected java.lang.CharSequence |
mPositive |
protected int |
mStyleId |
protected java.lang.CharSequence |
mTitle |
| Modifier | Constructor and Description |
|---|---|
|
Dialog.Builder() |
|
Dialog.Builder(int styleId) |
protected |
Dialog.Builder(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
Dialog |
build(android.content.Context context)
Get a Dialog instance used for this fragment.
|
Dialog.Builder |
contentView(int layoutId) |
int |
describeContents() |
Dialog |
getDialog() |
Dialog.Builder |
negativeAction(java.lang.CharSequence action) |
Dialog.Builder |
neutralAction(java.lang.CharSequence action) |
protected Dialog |
onBuild(android.content.Context context,
int styleId)
Get a appropriate Dialog instance will be used for styling later.
|
protected void |
onBuildDone(Dialog dialog)
This function will be called after Builder done apply styling to Dialog.
|
void |
onCancel(android.content.DialogInterface dialog)
Handle OnCancel event of dialog.
|
void |
onDismiss(android.content.DialogInterface dialog)
Handle OnDismiss event of dialog.
|
void |
onNegativeActionClicked(DialogFragment fragment)
Handle click event on Negative Action.
|
void |
onNeutralActionClicked(DialogFragment fragment)
Handle click event on Neutral Action.
|
void |
onPositiveActionClicked(DialogFragment fragment)
Handle click event on Positive Action.
|
protected void |
onReadFromParcel(android.os.Parcel in)
Child class should override this function and read back any saved attributes.
|
protected void |
onWriteToParcel(android.os.Parcel dest,
int flags)
Child class should override this function and write down all attributes will be saved.
|
Dialog.Builder |
positiveAction(java.lang.CharSequence action) |
Dialog.Builder |
style(int styleId) |
Dialog.Builder |
title(java.lang.CharSequence title) |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
protected int mStyleId
protected int mContentViewId
protected java.lang.CharSequence mTitle
protected java.lang.CharSequence mPositive
protected java.lang.CharSequence mNegative
protected java.lang.CharSequence mNeutral
protected Dialog mDialog
public static final android.os.Parcelable.Creator<Dialog.Builder> CREATOR
public Dialog.Builder()
public Dialog.Builder(int styleId)
protected Dialog.Builder(android.os.Parcel in)
public Dialog.Builder style(int styleId)
public Dialog.Builder contentView(int layoutId)
public Dialog.Builder title(java.lang.CharSequence title)
public Dialog.Builder positiveAction(java.lang.CharSequence action)
public Dialog.Builder negativeAction(java.lang.CharSequence action)
public Dialog.Builder neutralAction(java.lang.CharSequence action)
public Dialog getDialog()
public void onPositiveActionClicked(DialogFragment fragment)
DialogFragment.BuilderonPositiveActionClicked in interface DialogFragment.Builderpublic void onNegativeActionClicked(DialogFragment fragment)
DialogFragment.BuilderonNegativeActionClicked in interface DialogFragment.Builderpublic void onNeutralActionClicked(DialogFragment fragment)
DialogFragment.BuilderonNeutralActionClicked in interface DialogFragment.Builderpublic void onCancel(android.content.DialogInterface dialog)
DialogFragment.BuilderonCancel in interface DialogFragment.Builderpublic void onDismiss(android.content.DialogInterface dialog)
DialogFragment.BuilderonDismiss in interface DialogFragment.Builderpublic Dialog build(android.content.Context context)
DialogFragment.Builderbuild in interface DialogFragment.Buildercontext - A Context instance.protected Dialog onBuild(android.content.Context context, int styleId)
onBuildDone(Dialog)context - A Context instance.styleId - The resourceId of Dialog's style.protected void onBuildDone(Dialog dialog)
dialog - The Dialog instance.protected void onReadFromParcel(android.os.Parcel in)
protected void onWriteToParcel(android.os.Parcel dest,
int flags)
public void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelablepublic int describeContents()
describeContents in interface android.os.Parcelable