光环助手V4.0.2-更新推送功能优化(3)https://gitlab.ghzs.com/pm/halo-app-issues/-/issues/882
This commit is contained in:
@ -208,19 +208,23 @@ public class UpdateManager {
|
||||
// 显示助手有更新提示框
|
||||
private void showUpdateDialog(final String md5) {
|
||||
final Dialog updateDialog = new Dialog(mContext);
|
||||
Window window = updateDialog.getWindow();
|
||||
if (window != null) {
|
||||
window.setBackgroundDrawableResource(android.R.color.transparent);
|
||||
}
|
||||
|
||||
View view = View.inflate(mContext, R.layout.app_update_hint_dialog, null);
|
||||
|
||||
TextView content = view.findViewById(R.id.updeta_content);
|
||||
TextView content = view.findViewById(R.id.desc);
|
||||
content.setText(Html.fromHtml(appEntity.getContent()));
|
||||
|
||||
TextView version = view.findViewById(R.id.update_app_version);
|
||||
version.setText(String.format("光环助手V%s更新内容:", appEntity.getVersion()));
|
||||
TextView version = view.findViewById(R.id.version);
|
||||
version.setText(String.format("版本%s更新日志:", appEntity.getVersion()));
|
||||
|
||||
TextView size = view.findViewById(R.id.update_app_size);
|
||||
size.setText(String.format("大小:%s", appEntity.getSize()));
|
||||
TextView size = view.findViewById(R.id.size);
|
||||
size.setText(String.format("大小 %s", appEntity.getSize()));
|
||||
|
||||
view.findViewById(R.id.update_cancel).setOnClickListener(
|
||||
view.findViewById(R.id.cancel).setOnClickListener(
|
||||
v -> {
|
||||
if (appEntity.isForce()) {
|
||||
AppManager.getInstance().finishAllActivity();
|
||||
@ -229,7 +233,7 @@ public class UpdateManager {
|
||||
}
|
||||
});
|
||||
|
||||
view.findViewById(R.id.update_confirm).setOnClickListener(
|
||||
view.findViewById(R.id.confirm).setOnClickListener(
|
||||
v -> {
|
||||
updateDialog.dismiss();
|
||||
String path = FileUtils.getDownloadPath(mContext,
|
||||
|
||||
Reference in New Issue
Block a user