fix:【光环助手V5.16.0】光环下载进度条优化-1128测试 https://jira.shanqu.cc/browse/GHZS-478

fix:【光环助手V5.16.0】光环下载进度条优化-测试问题-2022\\11\\29 https://jira.shanqu.cc/browse/GHZS-484
fix:【光环助手V5.16.0】光环下载进度条优化-1129测试 https://jira.shanqu.cc/browse/GHZS-486
This commit is contained in:
叶子维
2022-11-30 10:31:42 +08:00
parent f9e16d1f32
commit fa33fe3d71
11 changed files with 167 additions and 128 deletions

View File

@ -15,9 +15,9 @@ import com.gh.download.DownloadManager;
import com.gh.gamecenter.R;
import com.gh.gamecenter.adapter.viewholder.DetailViewHolder;
import com.gh.gamecenter.common.constant.Constants;
import com.gh.gamecenter.common.entity.LinkEntity;
import com.gh.gamecenter.common.utils.ExtensionsKt;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.common.entity.LinkEntity;
import com.gh.gamecenter.entity.PluginLocation;
import com.gh.gamecenter.manager.PackagesManager;
import com.gh.vspace.VHelper;
@ -235,7 +235,7 @@ public class DetailDownloadUtils {
if (XapkUnzipStatus.UNZIPPING.name().equals(xapkStatus)) {
String percent = downloadEntity.getMeta().get(XapkInstaller.XAPK_UNZIP_PERCENT);
viewHolder.mDownloadPb.setText("游戏解压中 " + percent + "%");
viewHolder.mDownloadPb.setText("游戏解压中 " + percent + "%");
viewHolder.mDownloadPb.setProgress((int) (Float.valueOf(percent) * 10));
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.XAPK_UNZIPPING);
return;
@ -256,6 +256,9 @@ public class DetailDownloadUtils {
}
switch (downloadEntity.getStatus()) {
case timeout:
case neterror:
case subscribe:
case downloading:
case pause:
case overflow:
@ -268,10 +271,7 @@ public class DetailDownloadUtils {
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.DOWNLOADING_NORMAL);
}
break;
case timeout:
case neterror:
case waiting:
case subscribe:
viewHolder.mDownloadPb.setText(R.string.waiting);
if (downloadEntity.isPluggable() && PackagesManager.INSTANCE.isInstalled(downloadEntity.getPackageName())) {
viewHolder.mDownloadPb.setButtonStyle(DownloadButton.ButtonStyle.WAITING);