修改弹窗样式(下载提示,插件化安装,正文字号,意见反馈,网络劫持,清除缓存)

This commit is contained in:
khy
2016-08-27 18:17:40 +08:00
parent 000c97881c
commit 63f0b0528c
5 changed files with 175 additions and 64 deletions

View File

@ -37,17 +37,17 @@ public class DialogUtils {
final Dialog dialog = new Dialog(context);
View view = View.inflate(context,
R.layout.search_history_delete_dialog, null);
R.layout.common_alertdialog, null);
TextView title = (TextView) view
.findViewById(R.id.delete_dialog_title);
.findViewById(R.id.alertdialog_title);
title.setText("警告");
TextView content = (TextView) view
.findViewById(R.id.delete_dialog_message);
.findViewById(R.id.alertdialog_content);
content.setText("您当前网络环境异常,下载地址已被替换(网络劫持),更换网络环境进行下载");
content.setText("您当前网络环境异常,下载地址可能被运营商恶意替换(网络劫持),强烈建议更换网络环境后再进行下载");
TextView cancel = (TextView) view
.findViewById(R.id.delete_dialog_cancel);
.findViewById(R.id.alertdialog_cannel);
cancel.setText("取消");
cancel.setOnClickListener(new OnClickListener() {
@Override
@ -56,7 +56,7 @@ public class DialogUtils {
}
});
TextView confirem = (TextView) view
.findViewById(R.id.delete_dialog_confirm);
.findViewById(R.id.alertdialog_confirm);
confirem.setText("确定");
confirem.setOnClickListener(new OnClickListener() {
@Override
@ -130,16 +130,16 @@ public class DialogUtils {
public static void showWarningDialog(Context context, final ConfiremListener listener) {
final Dialog dialog = new Dialog(context);
View view = View.inflate(context, R.layout.search_history_delete_dialog, null);
View view = View.inflate(context, R.layout.common_alertdialog, null);
TextView title = (TextView) view
.findViewById(R.id.delete_dialog_title);
title.setText("警告");
TextView content = (TextView) view.findViewById(R.id.delete_dialog_message);
.findViewById(R.id.alertdialog_title);
title.setText("下载提示");
TextView content = (TextView) view.findViewById(R.id.alertdialog_content);
content.setText("您当前的网络为2G/3G/4G下载将会消耗移动流量是否继续下载?");
content.setText("您当前使用的网络为2G/3G/4G开始下载将会消耗移动流量,确定下载?");
TextView cancel = (TextView) view
.findViewById(R.id.delete_dialog_cancel);
.findViewById(R.id.alertdialog_cannel);
cancel.setText("取消");
cancel.setOnClickListener(new OnClickListener() {
@Override
@ -148,7 +148,7 @@ public class DialogUtils {
}
});
TextView confirem = (TextView) view
.findViewById(R.id.delete_dialog_confirm);
.findViewById(R.id.alertdialog_confirm);
confirem.setText("继续");
confirem.setOnClickListener(new View.OnClickListener() {
@Override
@ -223,18 +223,18 @@ public class DialogUtils {
public static void showPluginDialog(Context context, final ConfiremListener cListener,
final DismissListener dListener) {
final Dialog dialog = new Dialog(context);
View view = View.inflate(context, R.layout.search_history_delete_dialog, null);
TextView title = (TextView) view.findViewById(R.id.delete_dialog_title);
View view = View.inflate(context, R.layout.common_alertdialog, null);
TextView title = (TextView) view.findViewById(R.id.alertdialog_title);
title.setText("插件化安装");
TextView content = (TextView) view
.findViewById(R.id.delete_dialog_message);
.findViewById(R.id.alertdialog_content);
Spanned spanned = Html.fromHtml("您将进行插件化安装以实现插件功能,此过程将"
+ "<font color=\"#ff0000\">卸载</font>" + "当前使用的版本并"
+ "<font color=\"#ff0000\">安装插件版本</font>" + "");
content.setText(spanned);
TextView cancel = (TextView) view
.findViewById(R.id.delete_dialog_cancel);
.findViewById(R.id.alertdialog_cannel);
cancel.setText("取消");
cancel.setOnClickListener(new OnClickListener() {
@Override
@ -243,7 +243,7 @@ public class DialogUtils {
}
});
TextView confirm = (TextView) view
.findViewById(R.id.delete_dialog_confirm);
.findViewById(R.id.alertdialog_confirm);
confirm.setText("确定");
confirm.setOnClickListener(new OnClickListener() {
@Override