Open Kevin-Luong opened 6 years ago
You can use custom theme for dialog like this
<style name="ColorPickerDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:background">@color/colorPrimaryDark</item>
</style>
ColorPickerDialogBuilder
.with(context, R.style.ColorPickerDialogTheme)
.setTitle("Choose color")
.initialColor(currentBackgroundColor)
.wheelType(ColorPickerView.WHEEL_TYPE.FLOWER)
.density(12)
.setOnColorSelectedListener(new OnColorSelectedListener() {
@Override
public void onColorSelected(int selectedColor) {
toast("onColorSelected: 0x" + Integer.toHexString(selectedColor));
}
})
.setPositiveButton("ok", new ColorPickerClickListener() {
@Override
public void onClick(DialogInterface dialog, int selectedColor, Integer[] allColors) {
changeBackgroundColor(selectedColor);
}
})
.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
})
.build()
.show();
Hi QuadFlask
Your library is great! I'm using it for studying. I have a question that how to change the background color of the color picker dialog from white (mine) to dark (yours) like pictures below. As I add this library and execute it, it is a just white color for the dialog. I tried to find out how to change, however, I'm still have not found the solution yet. I think the dark color is more beautiful than white.
I hope that you may give me the solution for it. Thank you, Kevin.
(Mine)![screenshot_20180515-164510 1](https://user-images.githubusercontent.com/39298548/40049691-993cfd4e-585f-11e8-9c56-fd6b26a5c577.png)
(Your)![screenshot_20180515-164458 1](https://user-images.githubusercontent.com/39298548/40049696-9ca1c3fc-585f-11e8-8679-592f4be01c00.png)