Example #1
0
  /** Shows a Dialog displaying the selected indices and then shows the MIDlet main view. */
  public void showSelectedDialog() {
    String text = (getSelectedIndices().length == 0 ? "No selected items." : "");
    for (int i = 0; i < getSelectedIndices().length; i++) {
      text += "List item " + (getSelectedIndices()[i] + 1) + " selected.\n";
    }

    Dialog.show(
        Compatibility.toLowerCaseIfFT("Selected"),
        text,
        new Command(Compatibility.toUpperCaseIfFT("Continue")),
        null,
        Dialog.TYPE_INFO,
        null,
        1500L);

    DemoMidlet.getMainForm().show();
  }