Fix colorview doesn't change its background color after changing color value.

This commit is contained in:
Alex Ning 2020-04-04 18:55:23 +08:00
parent 420e9518bc
commit 354298a6ed

View File

@ -64,6 +64,7 @@ public class ColorPickerDialog extends AlertDialog {
try {
changeColorValueEditText = false;
colorValue = Color.parseColor("#" + s);
colorView.setBackgroundColor(colorValue);
seekBarA.setProgress(255);
seekBarR.setProgress(Integer.parseInt(s.substring(0, 2), 16));
seekBarG.setProgress(Integer.parseInt(s.substring(2, 4), 16));
@ -76,6 +77,7 @@ public class ColorPickerDialog extends AlertDialog {
try {
changeColorValueEditText = false;
colorValue = Color.parseColor("#" + s);
colorView.setBackgroundColor(colorValue);
seekBarA.setProgress(Integer.parseInt(s.substring(0, 2), 16));
seekBarR.setProgress(Integer.parseInt(s.substring(2, 4), 16));
seekBarG.setProgress(Integer.parseInt(s.substring(4, 6), 16));