Kaopiz / KProgressHUD

An implement of ProgressHUD for Android, similar to MBProgressHUD, SVProgressHUD for iOS.
Apache License 2.0
1.65k stars 382 forks source link

在KProgressHUD中 设置 BAR_DETERMINATE 问题 #42

Open zhangyang520 opened 6 years ago

zhangyang520 commented 6 years ago

出现 进度条setProgress(0) ,初始化 绘制进度时,绘制实心 部分 向左偏移!

解决办法: BarView类中 setProgress方法中 mInBound矩形类中的right位置:加上 mBoundGap @Override public void setProgress(int progress) { this.mProgress = progress; mInBound.set(mBoundGap, mBoundGap, mBoundGap+(getWidth() - mBoundGap) * mProgress / mMax, getHeight() - mBoundGap); invalidate(); }