Fixed color picker default color

This commit is contained in:
M66B 2019-10-10 17:09:40 +02:00
parent ca9d43e0bb
commit cba79bbe1e
1 changed files with 3 additions and 4 deletions

View File

@ -53,13 +53,9 @@ public class FragmentDialogColor extends FragmentDialogBase {
String title = args.getString("title");
boolean reset = args.getBoolean("reset", false);
if (color == Color.TRANSPARENT)
color = Color.BLUE;
ColorPickerDialogBuilder builder = ColorPickerDialogBuilder
.with(getContext())
.setTitle(title)
.initialColor(color)
.showColorEdit(true)
.wheelType(ColorPickerView.WHEEL_TYPE.FLOWER)
.density(6)
@ -78,6 +74,9 @@ public class FragmentDialogColor extends FragmentDialogBase {
}
});
if (color != Color.TRANSPARENT)
builder.initialColor(color);
if (reset)
builder.setNegativeButton(R.string.title_reset, new DialogInterface.OnClickListener() {
@Override