Skip to content

Commit 58e3822

Browse files
author
Michael Krehan
committed
Fix for #12945: ProgressBar.setMax() will always redraw.
Fix for issue #12945: Changing the maximum of a progress bar does not cause it to be redrawn, even though a new maximum changes the position of the current progress in relation to its maximum. With this fix, setMax() will always cause refreshProgress() to be called if the maximum is different than it was before. Change-Id: I971ec3302953bcadc0aac3dd8241481bab2b5a91
1 parent 93552de commit 58e3822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/widget/ProgressBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ public synchronized void setMax(int max) {
666666

667667
if (mProgress > max) {
668668
mProgress = max;
669-
refreshProgress(R.id.progress, mProgress, false);
670669
}
670+
refreshProgress(R.id.progress, mProgress, false);
671671
}
672672
}
673673

0 commit comments

Comments
 (0)