AUListDialog (formerly APListPopDialog) provides a list dialog box containing a title, an option list, a Confirm button, and a Cancel button. Each option is a PopMenuItem with icon, option name, and selected state.
Sample image

Dependency
See Quick start.
API description
public interface OnItemClickListener {
void onItemClick(int index);
}
public AUListDialog(Context context, ArrayList<String> list)
public AUListDialog(ArrayList<PopMenuItem> list, Context context)
public AUListDialog(String title, ArrayList<PopMenuItem> list, Context context)
public AUListDialog(String title, String message, ArrayList<PopMenuItem> list, Context context)
public AUListDialog(String title, ArrayList<PopMenuItem> list, boolean showSelectionState,
String positiveString, View.OnClickListener positiveListener,
String negativeString, View.OnClickListener negativeListener, Context context)
public AUListDialog(String title, String message, ArrayList<PopMenuItem> list, boolean showSelectionState,
String positiveString, View.OnClickListener positiveListener,
String negativeString, View.OnClickListener negativeListener, Context context)
public void setOnItemClickListener(OnItemClickListener listener) {
this.listener = listener;
}
public void updateData(ArrayList<PopMenuItem> list)
Sample code
List dialog with options only
new AUListDialog(this, getData(7)).show();
private ArrayList<String> getData(int size){
ArrayList<String> data = new ArrayList<String>();
for (int i= 1 ; i<= size; i++){
data.add("Option"+ String.valueOf(i));
}
return data;
}
List dialog with a title
ArrayList<PopMenuItem> items = new ArrayList<PopMenuItem>();
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
new AUListDialog("Title", items, this).show();
List dialog with description text
ArrayList<PopMenuItem> items = new ArrayList<PopMenuItem>();
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
new AUListDialog("", "The description should not exceed 3 rows, and no ending mark is needed at the end of the last sentence.", items, this).show();
List dialog with a title and description text
ArrayList<PopMenuItem> items = new ArrayList<PopMenuItem>();
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
new AUListDialog("Single-line Title", "The description should not exceed 3 rows, and no ending mark is needed at the end of the last sentence.", items, this).show();
List dialog with checkboxes
ArrayList<PopMenuItem> items = new ArrayList<PopMenuItem>();
PopMenuItem item = new PopMenuItem("Option", null);
item.setType(AUCheckIcon.STATE_UNCHECKED);
items.add(item);
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
items.add(new PopMenuItem("Option", null));
new AUListDialog("Title", items, true, "OK", null, "Cancel", null, this).show();