public static class SimpleDialog.Builder extends Dialog.Builder implements SimpleDialog.OnSelectionChangedListener
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<SimpleDialog.Builder> |
CREATOR |
protected java.lang.CharSequence[] |
mItems |
protected java.lang.CharSequence |
mMessage |
protected int |
mMode |
protected int[] |
mSelectedIndexes |
mContentViewId, mDialog, mNegative, mNeutral, mPositive, mStyleId, mTitle| Modifier | Constructor and Description |
|---|---|
|
SimpleDialog.Builder() |
|
SimpleDialog.Builder(int styleId) |
protected |
SimpleDialog.Builder(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
int |
getSelectedIndex() |
int[] |
getSelectedIndexes() |
java.lang.CharSequence |
getSelectedValue() |
java.lang.CharSequence[] |
getSelectedValues() |
SimpleDialog.Builder |
items(java.lang.CharSequence[] items,
int selectedIndex) |
SimpleDialog.Builder |
message(java.lang.CharSequence message) |
SimpleDialog.Builder |
multiChoiceItems(java.lang.CharSequence[] items,
int... selectedIndexes) |
protected Dialog |
onBuild(android.content.Context context,
int styleId)
Get a appropriate Dialog instance will be used for styling later.
|
protected void |
onReadFromParcel(android.os.Parcel in)
Child class should override this function and read back any saved attributes.
|
void |
onSelectionChanged(int index,
boolean selected)
Called when the checked state of an item changed.
|
protected void |
onWriteToParcel(android.os.Parcel dest,
int flags)
Child class should override this function and write down all attributes will be saved.
|
build, contentView, describeContents, getDialog, negativeAction, neutralAction, onBuildDone, onNegativeActionClicked, onNeutralActionClicked, onPositiveActionClicked, positiveAction, style, title, writeToParcelprotected int mMode
protected java.lang.CharSequence mMessage
protected java.lang.CharSequence[] mItems
protected int[] mSelectedIndexes
public static final android.os.Parcelable.Creator<SimpleDialog.Builder> CREATOR
public SimpleDialog.Builder()
public SimpleDialog.Builder(int styleId)
protected SimpleDialog.Builder(android.os.Parcel in)
public SimpleDialog.Builder message(java.lang.CharSequence message)
public SimpleDialog.Builder items(java.lang.CharSequence[] items, int selectedIndex)
public SimpleDialog.Builder multiChoiceItems(java.lang.CharSequence[] items, int... selectedIndexes)
public int getSelectedIndex()
public java.lang.CharSequence getSelectedValue()
public int[] getSelectedIndexes()
public java.lang.CharSequence[] getSelectedValues()
protected Dialog onBuild(android.content.Context context, int styleId)
Dialog.BuilderDialog.Builder.onBuildDone(Dialog)onBuild in class Dialog.Buildercontext - A Context instance.styleId - The resourceId of Dialog's style.public void onSelectionChanged(int index,
boolean selected)
SimpleDialog.OnSelectionChangedListeneronSelectionChanged in interface SimpleDialog.OnSelectionChangedListenerindex - The index of item.selected - The checked state.protected void onReadFromParcel(android.os.Parcel in)
Dialog.BuilderonReadFromParcel in class Dialog.Builderprotected void onWriteToParcel(android.os.Parcel dest,
int flags)
Dialog.BuilderonWriteToParcel in class Dialog.Builder