API 14+ Download Latest JitPack Code Climate Rating Travis CI License

SimpleDialogFragments Library is a collection of easy to use and extendable DialogFragment's for Android. It is fully compatible with rotation changes and can be implemented with only a few lines of code.

A new approach of result handling ensures data integrity over rotation changes, that many other libraries lack.

JavaDoc API
Demo APK



Check the release page for all available release variants:

In your apps build.gradle:

dependencies {
    implementation 'com.github.eltos:simpledialogfragments:v3.2'

You can also use JitPack.


Alert dialog

Choice dialog

int[] data = new int[]{R.string.choice_A, R.string.choice_B, R.string.choice_C};
                .items(getBaseContext(), data)
                .show(this, LIST_DIALOG);

Color picker
                 .show(this, COLOR_DIALOG);

Form dialog
                             .inputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES)
                .show(this, REGISTRATION_DIALOG);

See Wiki for more examples.

Receive Results

Let the hosting Activity or Fragment implement the SimpleDialog.OnDialogResultListener

public boolean onResult(@NonNull String dialogTag, int which, @NonNull Bundle extras) {
    if (which == BUTTON_POSITIVE && PASSWORD_DIALOG.equals(dialogTag)){
        String pw = extras.getString(SimpleInputDialogFragment.TEXT);
        // ...
        return true;
    if (which == BUTTON_POSITIVE && LIST_DIALOG.equals(dialogTag)){
        ArrayList<Integer> pos = extras.getIntegerArrayList(SimpleListDialog.SELECTED_POSITIONS);
        // ...
        return true;
    if (which == BUTTON_POSITIVE && REGISTRATION_DIALOG.equals(dialogTag)){
        String username = extras.getString(USERNAME);
        String password = extras.getString(PASSWORD);
        // ...
        return true;
    // ...
    return false;

Make sure to check the demo application.


Known extensions and projects using this library:


Copyright 2018 Philipp Niedermayer (

Licensed under the Apache License 2.0

You may only use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software in compliance with the License. For more information visit
The above copyright notice alongside a copy of the Apache License shall be included in all copies or substantial portions of the Software not only in source code but also in a license listing accessible by the user.

I would appreciate being notified when you release an application that uses this library. Thanks!