Escolar Documentos
Profissional Documentos
Cultura Documentos
56 (https://github.com/eltos/SimpleDialogFragments/stargazers?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=5272) 5
(https://github.com/eltos/SimpleDialogFragments/watchers?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=5272) 15
(https://github.com/eltos/SimpleDialogFragments/network?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=5272) 4
(https://github.com/eltos/SimpleDialogFragments/issues?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=5272)
(https://facebook.com/sharer.php?
General u=https://android-
Category
arsenal.com/details/1/5272)
Free (/free)
Tag
(https://twitter.com/intent/twe
arsenal.com/details/1/5272&text=The%20An
Dialogs (/tag/30)
License
%20SimpleDialogFragments
Apache License, Version 2.0 (http://opensource.org/licenses/Apache-2.0?utm_source=android-arsenal.co
m&utm_medium=referral&utm_campaign=5272)
(http://news.ycombinator.com/submitlink
Min SDK
11 (Android 3.0 Honeycomb) (/api?level=11)
arsenal.com/details/1/5272&t=The%20Andro
Registered
Feb 12, 2017 %20Dialogs%20-%20Simp
Favorites
9
Link
https://github.com/eltos/SimpleDialogFragments (https://github.com/eltos/SimpleDialogFragments?utm_s
ource=android-arsenal.com&utm_medium=referral&utm_campaign=5272)
See also
PostOffice (/details/1/1024)
Easy Native Dialog (/details/1/6525)
Calculator Dialog (/details/1/6824)
(https://plus.google.com/share?
Heins Input Dialogs (/details/1/4802)
SearchableSpinner (/details/1/5718)
url=https://android-
Additional arsenal.com/details/1/5272)
Language
Java
(https://reddit.com/subm
arsenal.com/details/1/5272&title=The%20An
Version
%20Dialogs%20-%20Sim
v3.0 (Aug 21, 2018) (https://github.com/eltos/SimpleDialogFragments/releases/tag/v3.0?utm_source=and
roid-arsenal.com&utm_medium=referral&utm_campaign=5272)
Created
Jan 1, 2017
Updated
Aug 27, 2018
Owner
Philipp Niedermayer (eltos) (/user/eltos)
Contributors
4 (https://github.com/eltos/SimpleDialogFragments/graphs/contributors?utm_source=android-arsenal.com
&utm_medium=referral&utm_campaign=5272)
Activity
Badge
Generate
Download
Source code
Blurb
¡FELICIDADES!
USUARIO 1.000.000
Nuestro sistema aleatorio de
selección de ganadores podría
elegirte como ganador de un
SMARTPHONE
ONLINE: 16/09/2018 15:00
CLICA AQUI
©fabricadepremios
(https://github.com/eltos/SimpleDialogFragments/raw/master/media/logo_named_right.png?
utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=5272)
SimpleDialogFragments
(https://github.com/eltos/SimpleDialogFragments/raw/master/media/screenshot.png?
utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=5272)
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
dependencies {
compile 'com.github.eltos:simpledialogfragment:3.0'
}
Examples
Alert dialog
SimpleDialog.build()
.title(R.string.hello)
.msg(R.string.hello_world)
.show(this);
Choice dialog
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).validatePat
Input.password(PASSWORD).required().max(20).validatePatternStrongPa
Input.email(EMAIL).required(),
Input.plain(COUNTRY).hint(R.string.country)
.inputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLA
.suggest(R.array.countries_locale).forceSuggestion(),
Check.box(null).label(R.string.terms_accept).required()
)
.show(this, REGISTRATION_DIALOG);
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_POSIT
// ...
return true;
}
if (which == BUTTON_POSITIVE && REGISTRATION_DIALOG.equals(dialogTag)){
String username = extras.getString(USERNAME);
String password = extras.getString(PASSWORD);
// ...
return true;
}
// ...
return false;
}
Extensions
License
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 (http://www.apache.org/licenses/LICENSE-2.0?
utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=5272) 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!
Follow us on Twitter (https://twitter.com/Android_Arsenal?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=5272)