Merge branch '2.0' of https://git.oschina.net/dreamhua/GH-ASSISTv1.45 into 2.0
Conflicts: app/src/main/java/com/gh/common/util/DialogUtils.java
This commit is contained in:
@ -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("您当前网络环境异常,下载地址已被替换(网络劫持),请更换网络环境进行下载。");
|
||||
|
||||
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,14 +130,16 @@ public class DialogUtils {
|
||||
|
||||
public static void showWarningDialog(Context context, String msg, final ConfiremListener listener) {
|
||||
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);
|
||||
title.setText("警告");
|
||||
TextView content = (TextView) view.findViewById(R.id.delete_dialog_message);
|
||||
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.alertdialog_content);
|
||||
|
||||
content.setText(msg);
|
||||
|
||||
TextView cancel = (TextView) view.findViewById(R.id.delete_dialog_cancel);
|
||||
TextView cancel = (TextView) view
|
||||
.findViewById(R.id.alertdialog_cannel);
|
||||
cancel.setText("取消");
|
||||
cancel.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
@ -145,7 +147,8 @@ public class DialogUtils {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
TextView confirem = (TextView) view.findViewById(R.id.delete_dialog_confirm);
|
||||
TextView confirem = (TextView) view
|
||||
.findViewById(R.id.alertdialog_confirm);
|
||||
confirem.setText("继续");
|
||||
confirem.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@ -162,7 +165,7 @@ public class DialogUtils {
|
||||
}
|
||||
|
||||
public static void showWarningDialog(Context context, ConfiremListener listener) {
|
||||
showWarningDialog(context, "您当前的网络为2G/3G/4G,下载将会消耗移动流量,是否继续下载?", listener);
|
||||
showWarningDialog(context, "您当前使用的网络为2G/3G/4G,开始下载将会消耗移动流量,确定下载?", listener);
|
||||
}
|
||||
|
||||
public static void showSuccessDialog(Context context) {
|
||||
@ -224,18 +227,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
|
||||
@ -244,7 +247,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
|
||||
|
||||
Reference in New Issue
Block a user