From 13b88382e4dbc7dbf41afd969de281d8457a35cd Mon Sep 17 00:00:00 2001 From: Michael Rapp Date: Sun, 9 Dec 2018 23:47:14 +0100 Subject: [PATCH] Use getColor-method instead of getInt-method to obtain colors from XML attributes. --- .../mikhaellopez/circularprogressbar/CircularProgressBar.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circularprogressbar/src/main/java/com/mikhaellopez/circularprogressbar/CircularProgressBar.java b/circularprogressbar/src/main/java/com/mikhaellopez/circularprogressbar/CircularProgressBar.java index dd5d246..1f089e6 100755 --- a/circularprogressbar/src/main/java/com/mikhaellopez/circularprogressbar/CircularProgressBar.java +++ b/circularprogressbar/src/main/java/com/mikhaellopez/circularprogressbar/CircularProgressBar.java @@ -61,8 +61,8 @@ private void init(Context context, AttributeSet attrs) { strokeWidth = typedArray.getDimension(R.styleable.CircularProgressBar_cpb_progressbar_width, strokeWidth); backgroundStrokeWidth = typedArray.getDimension(R.styleable.CircularProgressBar_cpb_background_progressbar_width, backgroundStrokeWidth); // Color - color = typedArray.getInt(R.styleable.CircularProgressBar_cpb_progressbar_color, color); - backgroundColor = typedArray.getInt(R.styleable.CircularProgressBar_cpb_background_progressbar_color, backgroundColor); + color = typedArray.getColor(R.styleable.CircularProgressBar_cpb_progressbar_color, color); + backgroundColor = typedArray.getColor(R.styleable.CircularProgressBar_cpb_background_progressbar_color, backgroundColor); } finally { typedArray.recycle(); }