下载进度超过100%的情况处理

This commit is contained in:
kehaoyuan
2019-04-17 18:15:41 +08:00
parent 9042488a65
commit 7ad3a7ae92
7 changed files with 21 additions and 9 deletions

View File

@ -102,7 +102,7 @@ public class DownloadProgressBar extends ProgressBar {
String txt = TextUtils.ellipsize(mText, mFakeTextPaint, width, TextUtils.TruncateAt.END).toString();
srcCanvas.drawText(txt, getWidth() / 2, baseline, mPaint);
mPaint.setXfermode(mDuffXFerMode);
if (getProgress() != 0 && getProgress() != MAX_LENGTH) {
if (getProgress() != 0) {
mPaint.setColor(DOWNLOAD_IMAGE_STYLE == mDownloadStyle ? Color.BLACK : Color.WHITE); // 反向颜色
}