GitHunt
EL

eltos/SimpleDialogFragments

An Android library to create dialogs with ease and handle user interaction reliably, using fragments and material design.

SimpleDialogFragments

Android API 21+
Maven Central
JitPack
Code Climate Rating
Github 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.

๐Ÿง‘โ€๐Ÿ’ป API โ„น๏ธ Wiki ๐Ÿš€ Releases
๐Ÿ–ผ๏ธ Screenshots ๐Ÿ“ฑ Demo ๐Ÿช™ Donate

Features

  • Common dialogs that can be used with few lines of code
    • Alert dialogs
    • Input and checkbox dialogs with suggestions and validations
    • Filterable single- / multi-choice dialogs
    • Color pickers (palettes and/or HSV)
    • Extensive forms
    • Date and time pickers
    • Pin code dialog
    • Progress dialogs
  • Easy result handling even after rotation changes
  • Persistence on rotation changes
  • Material design
  • Fullscreen dialogs
  • Customizable and extendable dialogs

Usage

Check the release page for the latest and older versions:

In your module level build.gradle when using mavenCentral:

dependencies {
    implementation 'io.github.eltos:simpledialogfragments:3.10'
}

or if using JitPack:

dependencies {
    implementation 'com.github.eltos:simpledialogfragments:v3.10'
}

Building dialogs

Building dialogs is very easy and short handed:

SimpleDialog.build()
            .title(R.string.hello)
            .msg(R.string.hello_world)
            .show(this);

Check the wiki pages for instructions and examples on how to build the different dialogs available.

Receive Results

Supply a tag when showing the dialog and let the hosting Activity or Fragment implement the SimpleDialog.OnDialogResultListener.
For details, please refere to the wiki pages.

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

Extensions

Known extensions and projects using this library:

License

Copyright 2017-2025 Philipp Niedermayer (github.com/eltos)

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 http://www.apache.org/licenses/LICENSE-2.0
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.

Languages

Java99.1%Kotlin0.9%

Contributors

Apache License 2.0
Created January 1, 2017
Updated January 23, 2026
eltos/SimpleDialogFragments | GitHunt