From 354298a6edbf0f0ad0273bc615713e2f7594d7c2 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sat, 4 Apr 2020 18:55:23 +0800 Subject: Fix colorview doesn't change its background color after changing color value. --- .../docilealligator/infinityforreddit/CustomView/ColorPickerDialog.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/src/main/java') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomView/ColorPickerDialog.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomView/ColorPickerDialog.java index a60a38da..ff3f9423 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomView/ColorPickerDialog.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomView/ColorPickerDialog.java @@ -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)); -- cgit v1.2.3