diff --git a/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java b/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java index 63fe61b..9fdaf48 100644 --- a/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java +++ b/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java @@ -330,8 +330,9 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int widthSize = MeasureSpec.getSize(widthMeasureSpec); int heightMode = MeasureSpec.getMode(heightMeasureSpec); int heightSize = MeasureSpec.getSize(heightMeasureSpec); - int defaultWidth = Math.max(getSuggestedMinimumWidth(), mDefaultSize); - int defaultHeight = Math.max(getSuggestedMinimumHeight(), mDefaultSize); + int defaultSize = mDefaultSize; + int defaultWidth = Math.max(getSuggestedMinimumWidth(), defaultSize); + int defaultHeight = Math.max(getSuggestedMinimumHeight(), defaultSize); int width; int height; switch (widthMode) {