-
-
Notifications
You must be signed in to change notification settings - Fork 18
SimpleListDialog
eltos edited this page Apr 14, 2018
·
15 revisions
extends CustomListDialog
![](https://raw.githubusercontent.com/wiki/eltos/SimpleDialogFragments/media/simplelistdialog.png)
A ListDialog that displays text items.
CustomListDialog.build()
.title(R.string.select_one)
.items(context, new int[]{R.string.choiceA, R.string.choiceB, R.string.choiceC})
.choiceMode(SINGLE_CHOICE)
.show(Activity.this, DIALOG_1);
All of CustomListDialog plus:
-
Labels
.items(String[] labels)
.items(Context context, @ArrayRes int labelArrayResourceIds)
.items(Context context, int[] labelsResourceIds)
.items(String[] labels, long[] ids)
Populate the list with the labels provided (either Strings or android resource ids). Optionally, an array of ids can be used to identify which labels were selected inonResult
. -
Items
items(ArrayList<? extends SimpleListItem> items)
Use a custom set of objects extending SimpleListItem and overwrite it'sgetString()
and (optionally)getId()
method.
Additionally to the results of the CustomListDialog, these are returned:
ArrayList<String> SELECTED_LABELS // Selected Labels (except in `NO_CHOICE`-mode)
String SELECTED_SINGLE_LABEL // Selected Label (only for `SINGLE_CHOICE`- and `SINGLE_CHOICE_DIRECT`-mode)
Javadoc API
Screenshot gallery
Styling dialogs with themes
Fullscreen dialogs
SimpleDialog
CustomViewDialog
CustomListDialog
SimpleCheckDialog
SimpleColorDialog
SimpleColorWheelDialog
SimpleDateDialog
SimpleEMailDialog
SimpleFormDialog
SimpleImageDialog
SimpleInputDialog
SimpleListDialog
SimplePinDialog
SimpleProgressDialog
SimpleTimeDialog