修改设置页面,更改提示更新app弹窗(ps:还有新闻详情页面分享按钮图片)
This commit is contained in:
@ -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("<p>发现新版本!</p>"
|
||||
+ "<font color='#1ba4fc' style='line-height:1.5'>更新不会影响用户信息!</font><br>"
|
||||
+ "<font style='line-height:1.5'>最新版本:</font><font color='#3D3D3D' style='line-height:1.5'><b>V"
|
||||
+ appEntity.getVersion()
|
||||
+ "</b></font><br>"
|
||||
+ "<font style='line-height:1.5'>更新包大小:</font><font color='#3D3D3D' style='line-height:1.5'><b>"
|
||||
+ appEntity.getSize()
|
||||
+ "</b></font><br>"
|
||||
+ "更新内容:<br><font color='#2E2E2E' style='line-height:1.5'><b>"
|
||||
+ appEntity.getContent() + "</b></font><br>"
|
||||
+ "<br> 确定更新吗?");
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user