All Products
Search
Document Center

Mobile Platform as a Service:List dialog

Last Updated:Jan 26, 2026

AUListDialog (formerly APListPopDialog) creates a list dialog box that can include a title, a list of options, and OK and Cancel buttons. Each option is a PopMenuItem object that contains information such as an icon, an option name, and a selection state.

Preview

Android

API reference

public interface OnItemClickListener {
    void onItemClick(int index);
}

/**
 * Creates an AUListDialog from the specified list data. The items contain only text and no images.
 *
 * @param context The context object.
 * @param list A list of strings. These are pure ItemName properties with no images.
 */
public AUListDialog(Context context, ArrayList<String> list)

/**
 * Creates an AUListDialog from the specified list data.
 *
 * @param list A list of PopMenuItem objects.
 * @param context The context object.
 */
public AUListDialog(ArrayList<PopMenuItem> list, Context context) 

/**
 * Creates an AUListDialog from the specified list data.
 *
 * @param title The title.
 * @param list A list of PopMenuItem objects. Icons can be set.
 * @param context The context object.
 */
public AUListDialog(String title, ArrayList<PopMenuItem> list, Context context) 

/**
 * Creates an AUListDialog from the specified list data.
 *
 * @param title The title.
 * @param message The message body.
 * @param list A list of PopMenuItem objects. Icons can be set.
 * @param context The context object.
 */
public AUListDialog(String title, String message, ArrayList<PopMenuItem> list, Context context) 

/**
 * Creates an AUListDialog from the specified list data.
 *
 * @param title The title.
 * @param list A list of PopMenuItem objects.
 * @param showSelectionState Specifies whether to display an icon for the selection state of an option.
 * @param positiveString The text of the OK button.
 * @param positiveListener The listener for the OK button.
 * @param negativeString The text of the Cancel button.
 * @param negativeListener The listener for the Cancel button.
 * @param context The context object.
 */
public AUListDialog(String title, ArrayList<PopMenuItem> list, boolean showSelectionState,
        String positiveString, View.OnClickListener positiveListener,
        String negativeString, View.OnClickListener negativeListener, Context context) 

/**
 * Creates an AUListDialog from the specified list data.
 *
 * @param title The title.
 * @param message The message body.
 * @param list A list of PopMenuItem objects.
 * @param showSelectionState Specifies whether to display an icon for the selection state of an option.
 * @param positiveString The text of the OK button.
 * @param positiveListener The listener for the OK button.
 * @param negativeString The text of the Cancel button.
 * @param negativeListener The listener for the Cancel button.
 * @param context The context object.
 */
public AUListDialog(String title, String message, ArrayList<PopMenuItem> list, boolean showSelectionState,
        String positiveString, View.OnClickListener positiveListener,
        String negativeString, View.OnClickListener negativeListener, Context context)

/**
 * Sets a listener for item click events in the list.
 */
public void setOnItemClickListener(OnItemClickListener listener) {
    this.listener = listener;
}


/**
 * Updates the data in the list.
 *
 * @param list
 */
public void updateData(ArrayList<PopMenuItem> list)

Code examples

  • List-only dialog box

    option1

      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 text "+ String.valueOf(i));
          }
          return data;
      }
  • List dialog box with a title

    Title

      ArrayList<PopMenuItem> items = new ArrayList<PopMenuItem>();
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      new AUListDialog("Title", items, this).show();
  • List dialog box with descriptive text

    option2

      ArrayList<PopMenuItem> items = new ArrayList<PopMenuItem>();
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      new AUListDialog("", "Keep the descriptive text within three lines. Avoid ending a line with a punctuation mark.", items, this).show();
  • List dialog box with a title and descriptive text

    Single-line title

      ArrayList<PopMenuItem> items = new ArrayList<PopMenuItem>();
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      new AUListDialog("Single-line title", "Keep the descriptive text within three lines. Avoid ending a line with a punctuation mark.", items, this).show();
  • List dialog box with checkable items

    Title2

      ArrayList<PopMenuItem> items = new ArrayList<PopMenuItem>();
      PopMenuItem item = new PopMenuItem("Option text", null);
      item.setType(AUCheckIcon.STATE_UNCHECKED);
      items.add(item);
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      items.add(new PopMenuItem("Option text", null));
      new AUListDialog("Title text", items, true, "OK", null, "Cancel", null, this).show();