Skip to content

Commit

Permalink
#update UpgradeDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
wumeng1 authored and wumeng1 committed Jul 22, 2021
1 parent 3d0db81 commit 2dde588
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib_bugly/src/main/java/com/mirkowu/lib_bugly/UpgradeDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,20 @@ public void onReceive(DownloadTask downloadTask) {
llProgress.setVisibility(VISIBLE);
tvProgress.setText(String.format("%d%%", progress));
mProgressBar.setProgress(progress);

//重置状态
if (tvPositive.getVisibility() == VISIBLE) {
tvPositive.setVisibility(GONE);
tvNegative.setVisibility(VISIBLE);

if (isForceUpgrade) {
tvNegative.setText(com.mirkowu.lib_upgrade.R.string.up_downloading);
tvNegative.setEnabled(false);
} else {
tvNegative.setText(com.mirkowu.lib_upgrade.R.string.up_cancel);
tvNegative.setEnabled(true);
}
}
}

@Override
Expand Down

0 comments on commit 2dde588

Please sign in to comment.