android-styled-dialogs alternatives and similar packages
Based on the "Dialog Widget" category.
Alternatively, view android-styled-dialogs alternatives based on common mentions on social networks and blogs.
-
LicensesDialog
LicensesDialog is an open source library to display licenses of third-party libraries in an Android app. -
FancyGifDialog-Android
Make your native android Dialog Fancy and Gify. A library that takes the standard Android Dialog to the next level with a variety of styling options and Gif's. Style your dialog from code. -
LongPressPopup
Make a Popup appear long pressing on a view and handle drag-release events on its elements -
PostOffice
DISCONTINUED. This is a library for easily constructing Holo and Material Design Dialogs. -
AndroidSliderPreference
DISCONTINUED. Android library that allows applications to add dialog-based slider widgets to their settings -
WhatIsNewDialog
An Android library for displaying a dialog where it presents new features in the app. -
MonthYearPickerDialog
Dialog for Android that allows pick month and year without exact day which is impossible with standard DatePickerDialog. It has customizable UI and different modes of selecting.
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of android-styled-dialogs or a related project?
README
StyledDialogs for Android
[Screenshot of the dialogs](graphics/screenshot-small.png)
Demo app:
Features:
- Compatible with Material Design Guidelines
- Same look for Android 2.2+
- Built on top of standard DialogFragment
- Supports stacked buttons, neutral button, callbacks even after rotation
- Light and dark theme
- Contains even more specialized dialogs: List, Progress, Time&Date Picker, Custom, ...
How to include it in your project:
dependencies {
compile 'com.avast:android-styled-dialogs:2.3.3'
}
Hosted in jcenter:
How to style all dialogs:
It uses standard Material colors, for example like this:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/indigo</item>
<item name="colorPrimaryDark">@color/indigo_dark</item>
<item name="colorAccent">@color/pink</item>
</style>
For dark theme, inherit from Theme.AppCompat
. Or you can force dark theme per individual dialog using useDarkTheme()
builder method.
You can also force light theme per individual dialog using useLightTheme()
builder method.
How to create simple dialogs:
Easy:
Dialog with a simple message only:
SimpleDialogFragment.createBuilder(this, getSupportFragmentManager()).setMessage(R.string.message).show();
Dialog with a title, message and two buttons:
SimpleDialogFragment.createBuilder(this, getSupportFragmentManager()).setTitle(R.string.title).setMessage(R.string.message).setPositiveButtonText(R.string.positive_button).setNegativeButtonText(R.string.negative_button).show();
How to react on button press in your Activity/Fragment:
Simply implement interface ISimpleDialogListener
in your Activity/Fragment. Listener's callbacks have requestCode
parameter - you can use it if you have more dialogs in one Activity/Fragment.
For Fragments use setTargetFragment()
method in the builder.
It's not possible to use normal Java callbacks, because they are lost after device rotation.
How to react on cancelling the dialog:
Implement interface ISimpleDialogCancelListener
in your Activity/Fragment.
How to create custom DialogFragments:
Extend BaseDialogFragment
.
Have a look at JayneHatDialogFragment for a practical example.
Contributing
Pull requests are welcomed!
Please set your Android Studio formatting to our code style.
Why 'Dialogs'?
Theodor Dialogs was a famous Czech painter, uncle of Jára Cimrman. Jára Cimrman was a playwright, philosopher, inventor, teacher, poet, mathematician and more but he lacked painting skills. That's why Theodor was helping him with many projects. Just like Android and this library do.
See our other Czech personalities who help with #AndroidDev.
*Note that all licence references and agreements mentioned in the android-styled-dialogs README section above
are relevant to that project's source code only.