diff --git a/app/src/main/java/com/gh/gamecenter/MainActivity.java b/app/src/main/java/com/gh/gamecenter/MainActivity.java
index 76dd2594ba..a2b13e133f 100644
--- a/app/src/main/java/com/gh/gamecenter/MainActivity.java
+++ b/app/src/main/java/com/gh/gamecenter/MainActivity.java
@@ -16,8 +16,6 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.NotificationCompat;
import android.support.v4.util.ArrayMap;
-import android.text.Html;
-import android.text.Spanned;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
@@ -785,33 +783,23 @@ public class MainActivity extends BaseFragmentActivity implements
private void showUpdateDialog(final String md5) {
dialog = new Dialog(this);
- View view = View.inflate(this, R.layout.search_history_delete_dialog,
+ View view = View.inflate(this, R.layout.app_update_hint_dialog,
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.updeta_content);
+ TextView size = (TextView) view
+ .findViewById(R.id.update_app_size);
+ TextView versison = (TextView) view.findViewById(R.id.update_app_version);
- Spanned dialogContent = Html
- .fromHtml("
发现新版本!
"
- + "更新不会影响用户信息!
"
- + "最新版本:V"
- + appEntity.getVersion()
- + "
"
- + "更新包大小:"
- + appEntity.getSize()
- + "
"
- + "更新内容:
"
- + appEntity.getContent() + "
"
- + "
确定更新吗?");
-
- content.setText(dialogContent);
+ versison.setText("光环助手V"+appEntity.getVersion()+"更新内容:");
+ size.setText("大小:"+appEntity.getSize());
+ content.setText(appEntity.getContent()+"");
if (appEntity.isIs_force()) {
dialog.setCanceledOnTouchOutside(false);
dialog.setCancelable(false);
}
- view.findViewById(R.id.delete_dialog_cancel).setOnClickListener(
+ view.findViewById(R.id.update_cannel).setOnClickListener(
new OnClickListener() {
@Override
public void onClick(View v) {
@@ -822,7 +810,7 @@ public class MainActivity extends BaseFragmentActivity implements
}
}
});
- view.findViewById(R.id.delete_dialog_confirm).setOnClickListener(
+ view.findViewById(R.id.updeta_confirm).setOnClickListener(
new OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/app/src/main/java/com/gh/gamecenter/SettingActivity.java b/app/src/main/java/com/gh/gamecenter/SettingActivity.java
index 54c165e4c9..181557260f 100644
--- a/app/src/main/java/com/gh/gamecenter/SettingActivity.java
+++ b/app/src/main/java/com/gh/gamecenter/SettingActivity.java
@@ -7,8 +7,6 @@ import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.os.Handler;
-import android.text.Html;
-import android.text.Spanned;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
@@ -419,33 +417,23 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
private void showUpdateDialog(final String md5) {
dialog = new Dialog(this);
- View view = View.inflate(this, R.layout.search_history_delete_dialog,
+ View view = View.inflate(this, R.layout.app_update_hint_dialog,
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.updeta_content);
+ TextView size = (TextView) view
+ .findViewById(R.id.update_app_size);
+ TextView versison = (TextView) view.findViewById(R.id.update_app_version);
- Spanned dialogContent = Html
- .fromHtml("发现新版本!
"
- + "更新不会影响用户信息!
"
- + "最新版本:V"
- + appEntity.getVersion()
- + "
"
- + "更新包大小:"
- + appEntity.getSize()
- + "
"
- + "更新内容:
"
- + appEntity.getContent() + "
"
- + "
确定更新吗?");
-
- content.setText(dialogContent);
+ versison.setText("光环助手V"+appEntity.getVersion()+"更新内容:");
+ size.setText("大小:"+appEntity.getSize());
+ content.setText(appEntity.getContent()+"");
if (appEntity.isIs_force()) {
dialog.setCanceledOnTouchOutside(false);
dialog.setCancelable(false);
}
- view.findViewById(R.id.delete_dialog_cancel).setOnClickListener(
+ view.findViewById(R.id.update_cannel).setOnClickListener(
new OnClickListener() {
@Override
public void onClick(View v) {
@@ -461,7 +449,7 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
}
}
});
- view.findViewById(R.id.delete_dialog_confirm).setOnClickListener(
+ view.findViewById(R.id.updeta_confirm).setOnClickListener(
new OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/app/src/main/res/drawable-hdpi/app_update_top.png b/app/src/main/res/drawable-hdpi/app_update_top.png
new file mode 100644
index 0000000000..16a881109f
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/app_update_top.png differ
diff --git a/app/src/main/res/drawable-hdpi/news_details_more.png b/app/src/main/res/drawable-hdpi/news_details_more.png
new file mode 100644
index 0000000000..764e589b22
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/news_details_more.png differ
diff --git a/app/src/main/res/layout/activity_setting.xml b/app/src/main/res/layout/activity_setting.xml
index f42aed98c1..c27fc266a8 100644
--- a/app/src/main/res/layout/activity_setting.xml
+++ b/app/src/main/res/layout/activity_setting.xml
@@ -16,246 +16,328 @@
android:layout_height="match_parent"
android:orientation="vertical">
-
+ android:layout_marginLeft="@dimen/cardview_mar_left"
+ android:layout_marginRight="@dimen/cardview_mar_left"
+ android:clickable="true"
+ android:foreground="?android:attr/selectableItemBackground"
+ app:cardCornerRadius="0dp"
+ app:cardElevation="2dp"
+ app:cardUseCompatPadding="true"
+ android:layout_marginTop="10dp"
+ android:layout_marginBottom="5dp">
-
+
+
+
+
+
+
+
+
+ android:layout_marginLeft="@dimen/cardview_mar_left"
+ android:layout_marginRight="@dimen/cardview_mar_left"
+ android:clickable="true"
+ android:foreground="?android:attr/selectableItemBackground"
+ app:cardCornerRadius="0dp"
+ app:cardElevation="2dp"
+ app:cardUseCompatPadding="true">
-
+ android:orientation="vertical">
-
+
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginLeft="@dimen/cardview_mar_left"
+ android:layout_marginRight="@dimen/cardview_mar_left"
+ android:clickable="true"
+ android:foreground="?android:attr/selectableItemBackground"
+ app:cardCornerRadius="0dp"
+ app:cardElevation="2dp"
+ app:cardUseCompatPadding="true"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp">
-
+ android:orientation="vertical">
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginLeft="@dimen/cardview_mar_left"
+ android:layout_marginRight="@dimen/cardview_mar_left"
+ android:clickable="true"
+ android:foreground="?android:attr/selectableItemBackground"
+ app:cardCornerRadius="0dp"
+ app:cardElevation="2dp"
+ app:cardUseCompatPadding="true">
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:background="@drawable/reuse_listview_item_style"
+ android:padding="10dp"
+ android:text="免责声明"
+ android:textSize="16sp"
+ android:visibility="gone" />
+
diff --git a/app/src/main/res/layout/app_update_hint_dialog.xml b/app/src/main/res/layout/app_update_hint_dialog.xml
new file mode 100644
index 0000000000..aed42d4e51
--- /dev/null
+++ b/app/src/main/res/layout/app_update_hint_dialog.xml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file