Skip to content

Commit

Permalink
setProgress() min < (preset min - offsetValue) 异常(增加上下限保护)
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenhhe authored and archurcode committed May 20, 2021
1 parent 1d96211 commit 755d97d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ public void initView() {
bar.setRange(modeInt.getMin(), modeInt.getMax());
// bar.setIndicatorText(progress + modeInt.getUnit());
bar.setOnRangeChangedListener(onRangeChangedListener);
if (progress <= modeInt.getMin()) progress = modeInt.getMin();
if (progress >= modeInt.getMax()) progress = modeInt.getMax();
bar.setProgress(progress);
if (modeInt.getShowOp()) {
eqLayout.setVisibility(View.VISIBLE);
Expand Down

0 comments on commit 755d97d

Please sign in to comment.