From 589d1dff2ce8554ee53b818a98db000df7fdf4e7 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 22 七月 2025 10:19:17 +0800
Subject: [PATCH] 2025年07月22日10:19:08
---
app/src/main/java/com/hdl/photovoltaic/ui/me/AsRegardsActivity.java | 58 ++++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 40 insertions(+), 18 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/me/AsRegardsActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/me/AsRegardsActivity.java
index 3dbdeaf..abccc93 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/me/AsRegardsActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/me/AsRegardsActivity.java
@@ -4,6 +4,8 @@
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
import android.os.Bundle;
import android.view.View;
@@ -18,7 +20,8 @@
import com.hdl.photovoltaic.other.HdlAppUpdateLogic;
import com.hdl.photovoltaic.other.HdlCommonLogic;
import com.hdl.photovoltaic.other.HdlThreadLogic;
-import com.hdl.photovoltaic.widget.apkwgtupload.ApkDownLoadService;
+import com.hdl.photovoltaic.widget.FlashingBoxDialog;
+import com.hdl.photovoltaic.widget.FlashingIconBoxDialog;
import com.hdl.photovoltaic.widget.ConfirmationCancelDialog;
import com.hdl.photovoltaic.widget.UpdateConfirmationCancelDialog;
@@ -42,8 +45,8 @@
@Override
public void onBindView(Bundle savedInstanceState) {
- setNotificationBarBackgroundColor(CustomColor.white);
- setStatusBarTextColor();
+ setStatusBarTranslucent();
+ getWindow().setNavigationBarColor(getColor(R.color.text_FF000000));
//鍒濆鍖�
initView();
//鍒濆鍖栫晫闈㈢洃鍚櫒
@@ -61,7 +64,7 @@
if (newVersionBean != null) {
//todo 鍙戠幇鏂扮増鏈�,鏀瑰彉UI鏍峰紡
viewBinding.asRegardsRlRightContentTv.setText(R.string.app_discover_new_version);
- viewBinding.asRegardsRlRightContentTv.setTextColor(getResources().getColor(R.color.text_245EC3, null));
+ viewBinding.asRegardsRlRightContentTv.setTextColor(getResources().getColor(R.color.text_FFACACAC, null));
}
}
@@ -70,16 +73,20 @@
}
});
- //todo 绛夋帴鍙�
- String content = "https://developer.hdlcontrol.com/AppDownload/HDLDebugerDownload.html";
- Bitmap bitmap = HdlCommonLogic.getInstance().createQRCodeBitmap(content, 168, 168, "UTF-8", "H", "1", Color.BLACK, Color.WHITE);
+ //姝e紡鐜
+ String content = "https://developer.hdlcontrol.com/AppDownload/HDLPhotovoltaicDownload.html";
+ if (!AppConfigManage.getOnlineServer()) {
+ //娴嬭瘯鐜
+ content = "https://developer.hdlcontrol.com/AppDownload/HDLPhotovoltaicDebugDownload.html";
+ }
+ Bitmap bitmap = HdlCommonLogic.getInstance().createQRCodeBitmap(content, 168, 168, "UTF-8", "H", "0", getColor(R.color.text_00000000), Color.WHITE);
viewBinding.asRegardsQrCodeIv.setImageBitmap(bitmap);
}
private void initEvent() {
- viewBinding.toolbarTopFragmentHouseListRl.topBackLl.setOnClickListener(new View.OnClickListener() {
+ viewBinding.toolbarTopRl.topBackLl.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
@@ -126,10 +133,10 @@
}
private void initView() {
- viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setText(R.string.me_regard);
- viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setTextColor(getResources().getColor(R.color.text_030D1C, null));
- viewBinding.toolbarTopFragmentHouseListRl.topBackLl.setVisibility(View.VISIBLE);
- viewBinding.toolbarTopFragmentHouseListRl.topBarView.setBackgroundColor(getResources().getColor(R.color.text_FFFFFFFF, null));
+ viewBinding.toolbarTopRl.topBarView.setBackgroundColor(getColor(R.color.text_00000000));
+ viewBinding.asRegardsVersionUpdatingRl.setVisibility(View.GONE);
+ viewBinding.toolbarTopRl.topTitleTv.setText(R.string.me_regard);
+ viewBinding.toolbarTopRl.topBackLl.setVisibility(View.VISIBLE);
String versionsStr = _mActivity.getResources().getString(R.string.app_version_number) + " " + AppConfigManage.getVersionName();
viewBinding.asRegardsIconVersionsTv.setText(versionsStr);
@@ -143,7 +150,9 @@
@Override
public void run() {
if (mNewVersionBean == null) {
- HdlThreadLogic.toast(_mActivity, R.string.app_new_version);
+ FlashingBoxDialog flashingBoxDialog = new FlashingBoxDialog(_mActivity, 1500);
+ flashingBoxDialog.setContent(getString(R.string.app_new_version));
+ flashingBoxDialog.show();
return;
}
String app_version = getString(R.string.app_version) + ":" + mNewVersionBean.getVersion();
@@ -159,11 +168,24 @@
updateConfirmationCancelDialog.setYesOnclickListener(new ConfirmationCancelDialog.onYesOnclickListener() {
@Override
public void Confirm() {
- Intent intent = new Intent(_mActivity, ApkDownLoadService.class);
- intent.putExtra("updateUrl", mNewVersionBean.getPackageUrl());
- intent.putExtra("downLoadName", HdlAppUpdateLogic.getInstance().getApkFileName());
- intent.putExtra("downLoadType", "0");
- _mActivity.startService(intent);
+ FlashingBoxDialog flashingBoxDialog = new FlashingBoxDialog(_mActivity, 1500);
+ flashingBoxDialog.setContent(getString(R.string.loading_not_supported));
+ flashingBoxDialog.show();
+// try {
+// PackageManager packageManager = getPackageManager();
+// PackageInfo packageInfo = packageManager.getPackageInfo("com.android.vending", 0);
+// String versionName = packageInfo.versionName; // 鑾峰彇鐗堟湰鍙�
+// int versionCode = packageInfo.versionCode; // 鑾峰彇鐗堟湰浠g爜
+// // 鍦ㄦ澶勫鐞嗙増鏈俊鎭�
+// } catch (PackageManager.NameNotFoundException e) {
+// e.printStackTrace();
+// // 澶勭悊寮傚父锛屼緥濡傝胺姝孭lay鍟嗗簵搴旂敤鏈畨瑁�
+// }
+//
+// String packageName = "com.hdl.photovoltaic"; // 鏇挎崲涓轰綘鎯宠烦杞埌鐨勫簲鐢ㄧ殑鍖呭悕
+// Intent intent = new Intent(Intent.ACTION_VIEW);
+// intent.setData(Uri.parse("market://details?id=" + packageName));
+// startActivity(intent);
updateConfirmationCancelDialog.dismiss();
}
--
Gitblit v1.8.0