-
-
Notifications
You must be signed in to change notification settings - Fork 18
Styles
The library provides a number of default styles.
@style/SimpleDialogTheme |
@style/SimpleDialogMaterialTheme |
---|---|
You can specify a global theme with the alertDialogTheme
attribute (all dialogs) or the simpleDialogTheme
attribute (only simple dialogs) in your apps styles.xml
. Here is a simple example, have a look at styles.xml for a more advanced example:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
<!-- use the provided default styles-->
<item name="alertDialogTheme">@style/SimpleDialogTheme</item>
<item name="alertDialogTheme">@style/SimpleDialogMaterialTheme</item>
<!-- specify a custom style-->
<item name="simpleDialogTheme">@style/MyDialogTheme</item>
</style>
<style name="MyDialogTheme" parent="SimpleDialogTheme">
<!-- customizations for all dialogs -->
<item name="colorPrimary">@color/colorAccent</item>
</style>
</resources>
You can set custom themes on a per-dialog-basis by using the theme(int resId)
method. See SimpleDialog#available-customizations.
Javadoc API
Screenshot gallery
Styling dialogs with themes
Fullscreen dialogs
SimpleDialog
CustomViewDialog
CustomListDialog
SimpleCheckDialog
SimpleColorDialog
SimpleColorWheelDialog
SimpleDateDialog
SimpleEMailDialog
SimpleFormDialog
SimpleImageDialog
SimpleInputDialog
SimpleListDialog
SimplePinDialog
SimpleProgressDialog
SimpleTimeDialog