|
|
@@ -17,6 +17,7 @@ import android.widget.TextView; |
|
|
|
|
|
|
|
import androidx.core.content.FileProvider; |
|
|
|
|
|
|
|
import com.capton.colorfulprogressbar.ColorfulProgressbar; |
|
|
|
import com.example.bpa.R; |
|
|
|
import com.example.bpa.config.ConfigName; |
|
|
|
|
|
|
@@ -50,7 +51,7 @@ public class UpdateManager { |
|
|
|
private static final int DOWN_OVER = 2; |
|
|
|
|
|
|
|
/* 刷新的进度条 */ |
|
|
|
private ProgressBar mProgress; |
|
|
|
private ColorfulProgressbar mProgress; |
|
|
|
|
|
|
|
/* 新版本apk的远程路径 */ |
|
|
|
private String apkUrl ; |
|
|
@@ -173,6 +174,7 @@ public class UpdateManager { |
|
|
|
public void showProgress() |
|
|
|
{ |
|
|
|
mProgress.setProgress(progress); |
|
|
|
mProgress.setSecondProgress(progress); |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
@@ -226,7 +228,9 @@ public class UpdateManager { |
|
|
|
alg.show(); |
|
|
|
Window win = alg.getWindow(); |
|
|
|
win.setContentView(R.layout.common_dialog_progress); |
|
|
|
mProgress = (ProgressBar)win.findViewById(R.id.update_progress); |
|
|
|
mProgress = (ColorfulProgressbar)win.findViewById(R.id.update_progress); |
|
|
|
mProgress.showPercentText(true); |
|
|
|
mProgress.setAnimation(true); |
|
|
|
Button negativeButton = (Button)win.findViewById(R.id.NegativeButton); |
|
|
|
negativeButton.setOnClickListener(new View.OnClickListener() { |
|
|
|
@Override |
|
|
|