Skip to content

Magellan 1.x Dialogs

Ryan Moelter edited this page Jul 18, 2021 · 1 revision

Magellan has support for Dialogs out of the box. All you need to do is call showDialog(), and the Dialog will be restored for you on Screen rotation.

Code example

In your Screen:

    showDialog(new DialogCreator() {
      @Override
      public Dialog createDialog(Activity activity) {
        return new AlertDialog.Builder(activity)
            .setTitle("Hello")
            .setMessage("This is a dialog")
            .create();
      }
    });