All Projects → eltos → Simpledialogfragments

eltos / Simpledialogfragments

Licence: apache-2.0
A collection of easy to use and extendable DialogFragment's for Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Simpledialogfragments

Aestheticdialogs
📱 An Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs.
Stars: ✭ 352 (+274.47%)
Mutual labels:  library, material-design, dialog, dialogs
Lovelydialog
This library is a set of simple wrapper classes that are aimed to help you easily create fancy material dialogs.
Stars: ✭ 1,043 (+1009.57%)
Mutual labels:  material-design, dialog, dialogs
React Native Material Dialog
Material design dialogs for React Native 💬
Stars: ✭ 135 (+43.62%)
Mutual labels:  material-design, dialog, dialogs
soloalert
A customizable lightweight Alert Library with Material UI and awesome features.
Stars: ✭ 18 (-80.85%)
Mutual labels:  dialogs, dialog, easy-to-use
Androidlibs
🔥正在成为史上最全分类 Android 开源大全~~~~(长期更新 Star 一下吧)
Stars: ✭ 7,148 (+7504.26%)
Mutual labels:  library, dialog
Fullscreendialog
Android Material full screen dialog
Stars: ✭ 11 (-88.3%)
Mutual labels:  material-design, dialog
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-84.04%)
Mutual labels:  library, easy-to-use
Art
🎨 ASCII art library for Python
Stars: ✭ 1,026 (+991.49%)
Mutual labels:  library, easy-to-use
Sweet Modal Vue
The sweetest library to happen to modals.
Stars: ✭ 682 (+625.53%)
Mutual labels:  library, dialog
Smartisandialog
Smartisan style Dialog.
Stars: ✭ 33 (-64.89%)
Mutual labels:  library, dialog
Eyebrows
An eyebrows gradient color animation for android.
Stars: ✭ 49 (-47.87%)
Mutual labels:  library, easy-to-use
Matter
Material Design Components in Pure CSS. Materializing HTML at just one class per component 🍰
Stars: ✭ 888 (+844.68%)
Mutual labels:  library, material-design
Textfieldboxes
Material Design text field that comes in a box, based on (OLD) Google Material Design guidelines.
Stars: ✭ 760 (+708.51%)
Mutual labels:  library, material-design
Android Circledialog
仿IOS圆角对话框、进度条、列表框、输入框,ad广告框,支持横竖屏切换
Stars: ✭ 880 (+836.17%)
Mutual labels:  dialog, dialogs
Stickyswitch
⭐️ beautiful switch widget with sticky animation ⭐️
Stars: ✭ 725 (+671.28%)
Mutual labels:  library, material-design
Vulkan2drenderer
Easy to use 2D rendering engine using Vulkan API as backend.
Stars: ✭ 60 (-36.17%)
Mutual labels:  library, easy-to-use
Material About Library
Makes it easy to create beautiful about screens for your apps
Stars: ✭ 1,099 (+1069.15%)
Mutual labels:  library, fragments
Materialstyleddialogs
A library that shows a beautiful and customizable Material-based dialog with header. API 14+ required.
Stars: ✭ 1,139 (+1111.7%)
Mutual labels:  material-design, dialog
Wymaterialbutton
Interactive and fully animated Material Design button for iOS developers.
Stars: ✭ 80 (-14.89%)
Mutual labels:  library, material-design
Expanding Collection
ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion
Stars: ✭ 5,456 (+5704.26%)
Mutual labels:  library, material-design

SimpleDialogFragments

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
Releases
Screenshots
Demo APK

Features

  • Common dialogs like
    • Alert dialogs with optional checkbox
    • Input dialogs with suggestions and validations
    • Filterable single- / multi-choice dialogs
    • Color pickers
    • Form dialogs
    • Date and time pickers
    • Pin code dialog
  • Customizable and extendable dialogs
  • Material design
  • Easy resut handling even after rotation changes
  • Persistant on rotation

Usage

Check the release page for all available release variants:

In your apps build.gradle:

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

You can also use JitPack.

Examples

Alert dialog

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

Choice dialog

int[] data = new int[]{R.string.choice_A, R.string.choice_B, R.string.choice_C};

SimpleListDialog.build()
                .title(R.string.select_one)
                .choiceMode(ListView.CHOICE_MODE_SINGLE_DIRECT)
                .items(getBaseContext(), data)
                .show(this, LIST_DIALOG);

Color picker

SimpleColorDialog.build()
                 .title(R.string.pick_a_color)
                 .colorPreset(Color.RED)
                 .allowCustom(true)
                 .show(this, COLOR_DIALOG);

Form dialog

SimpleFormDialog.build()
                .title(R.string.register)
                .msg(R.string.please_fill_in_form)
                .fields(
                        Input.name(USERNAME).required().hint(R.string.username).validatePatternAlphanumeric(),
                        Input.password(PASSWORD).required().max(20).validatePatternStrongPassword(),
                        Input.email(EMAIL).required(),
                        Input.plain(COUNTRY).hint(R.string.country)
                             .inputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES)
                             .suggest(R.array.countries_locale).forceSuggestion(),
                        Check.box(null).label(R.string.terms_accept).required()
                )
                .show(this, REGISTRATION_DIALOG);

See Wiki for more examples.

Receive Results

Let the hosting Activity or Fragment implement the SimpleDialog.OnDialogResultListener

@Override
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.

Extensions

Known extensions and projects using this library:

License

Copyright 2018 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.

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].