-
-
Notifications
You must be signed in to change notification settings - Fork 18
SimpleColorDialog
Philipp Niedermayer edited this page May 28, 2021
·
5 revisions
extends CustomListDialog, Full API reference
A Dialog that can be used to chose a color from a pallet. Also allows for custom colors using the ColorWheelDialog
SimpleColorDialog.build()
.title(R.string.pick_a_color)
.colorPreset(color)
.allowCustom(true)
.show(this, COLOR_DIALOG);-
Color pallet
.colors(Context context, @ArrayRes int colorArrayRes)
.colors(@ColorInt int[] colors)
Predefined pallets:
-
MATERIAL_COLOR_PALLET(Default if unspecified) MATERIAL_COLOR_PALLET_LIGHTMATERIAL_COLOR_PALLET_DARKBEIGE_COLOR_PALLET
-
Initial selected color
.colorPreset(@ColorInt int color) -
Allow custom
.allowCustom(boolean allow)
The Bundle returned from this dialog will contain the following extras
@ColorInt int COLOR // The color chosenJavadoc API
Screenshot gallery
Styling dialogs with themes
Fullscreen dialogs
SimpleDialog
CustomViewDialog
CustomListDialog
SimpleCheckDialog
SimpleColorDialog
SimpleColorWheelDialog
SimpleDateDialog
SimpleEMailDialog
SimpleFormDialog
SimpleImageDialog
SimpleInputDialog
SimpleListDialog
SimplePinDialog
SimpleProgressDialog
SimpleTimeDialog