diff --git a/app/src/main/java/com/gh/common/util/DialogUtils.java b/app/src/main/java/com/gh/common/util/DialogUtils.java
index 240b863abd..13b217332b 100644
--- a/app/src/main/java/com/gh/common/util/DialogUtils.java
+++ b/app/src/main/java/com/gh/common/util/DialogUtils.java
@@ -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("您将进行插件化安装以实现插件功能,此过程将"
+ "卸载" + "当前使用的版本并"
+ "安装插件版本" + "。");
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
diff --git a/app/src/main/java/com/gh/gamecenter/SettingActivity.java b/app/src/main/java/com/gh/gamecenter/SettingActivity.java
index 181557260f..e829ca2966 100644
--- a/app/src/main/java/com/gh/gamecenter/SettingActivity.java
+++ b/app/src/main/java/com/gh/gamecenter/SettingActivity.java
@@ -2,6 +2,7 @@ package com.gh.gamecenter;
import android.app.Activity;
import android.app.Dialog;
+import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
@@ -73,6 +74,8 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
private int checkSizeIndex;
+ private Context context = this;
+
private DataWatcher dataWatcher = new DataWatcher() {
@Override
@@ -231,8 +234,31 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
checkUpdate();
break;
case R.id.setting_rl_cache:
- dialog = DialogUtils.showWaitDialog(this, "清除缓存中...");
- claerCache();
+ final Dialog dialog_hint = new Dialog(this);
+ View view = View.inflate(this, R.layout.common_alertdialog, null);
+ TextView dialog_title = (TextView) view.findViewById(R.id.alertdialog_title);
+ TextView dialog_content = (TextView) view.findViewById(R.id.alertdialog_content);
+ dialog_content.setText("清空缓存后未安装的游戏可能需要重新下载,确定清空?");
+ dialog_title.setText("清除缓存");
+ view.findViewById(R.id.alertdialog_cannel)
+ .setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ dialog_hint.dismiss();
+ }
+ });
+ view.findViewById(R.id.alertdialog_confirm)
+ .setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ dialog_hint.dismiss();
+ dialog = DialogUtils.showWaitDialog(context, "清除缓存中...");
+ claerCache();
+ }
+ });
+ dialog_hint.requestWindowFeature(Window.FEATURE_NO_TITLE);
+ dialog_hint.setContentView(view);
+ dialog_hint.show();
break;
case R.id.setting_rl_feedback:
startActivity(new Intent(SettingActivity.this,
diff --git a/app/src/main/java/com/gh/gamecenter/SuggestionActivity.java b/app/src/main/java/com/gh/gamecenter/SuggestionActivity.java
index 6bac7525fc..8fb2ce9589 100644
--- a/app/src/main/java/com/gh/gamecenter/SuggestionActivity.java
+++ b/app/src/main/java/com/gh/gamecenter/SuggestionActivity.java
@@ -140,18 +140,18 @@ public class SuggestionActivity extends BaseActivity implements OnClickListener
// 弹出确认对话框
private void showConfirmDialog(final String email) {
final Dialog confirmDialog = new Dialog(this);
- View view = View.inflate(this, R.layout.search_history_delete_dialog,
+ View view = View.inflate(this, R.layout.common_alertdialog,
null);
- TextView title = (TextView) view.findViewById(R.id.delete_dialog_title);
+ 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);
content.setText("填写联系方式有助于我们更好的一对一地解决您的问题,确定不填写吗?");
TextView cancel = (TextView) view
- .findViewById(R.id.delete_dialog_cancel);
- cancel.setText("填写");
+ .findViewById(R.id.alertdialog_cannel);
+ cancel.setText("我要填写");
cancel.setTextColor(0xffFFFFFF);
cancel.setBackgroundResource(R.drawable.textview_blue_style);
cancel.setOnClickListener(new OnClickListener() {
@@ -176,8 +176,8 @@ public class SuggestionActivity extends BaseActivity implements OnClickListener
}
});
TextView confirm = (TextView) view
- .findViewById(R.id.delete_dialog_confirm);
- confirm.setText("提交");
+ .findViewById(R.id.alertdialog_confirm);
+ confirm.setText("直接提交");
confirm.setTextColor(0xff999999);
confirm.setBackgroundResource(R.drawable.textview_cancel_style);
confirm.setOnClickListener(new OnClickListener() {
diff --git a/app/src/main/res/layout/common_alertdialog.xml b/app/src/main/res/layout/common_alertdialog.xml
new file mode 100644
index 0000000000..17cc2b94bf
--- /dev/null
+++ b/app/src/main/res/layout/common_alertdialog.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/dialog_font_size.xml b/app/src/main/res/layout/dialog_font_size.xml
index 8101bd9667..10ddc39b93 100644
--- a/app/src/main/res/layout/dialog_font_size.xml
+++ b/app/src/main/res/layout/dialog_font_size.xml
@@ -3,83 +3,100 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:background="@drawable/border_white_bg"
- android:padding="10dp">
+ android:background="#fff">
+ android:textSize="18sp"
+ android:textStyle="bold"
+ android:gravity="center_vertical"
+ android:paddingLeft="20dp"
+ android:textColor="#3a3a3a"/>
+
+ android:paddingLeft="15dp"
+ android:layout_marginTop="10dp"
+ android:layout_marginBottom="20dp">
+ android:text="小字号"
+ android:textSize="12sp"/>
+ android:text="中字号"
+ android:textSize="15sp"
+ android:layout_marginTop="3dp"/>
+ android:text="大字号"
+ android:textSize="18sp"
+ android:layout_marginTop="5dp"/>
+ android:text="特大字号"
+ android:textSize="21sp"
+ android:layout_marginTop="7dp"/>
-
-
+
+
+ android:orientation="horizontal">
+
-
+
+
\ No newline at end of file