From 6ae9f81d545f44a85c34dea1c11df8b70e3f940f Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 09 四月 2025 10:29:29 +0800 Subject: [PATCH] 2025-04-09 10:29:16 1.1.0 --- app/src/main/java/com/hdl/photovoltaic/ui/me/AsRegardsActivity.java | 71 ++++++++++++++++++++++++----------- 1 files changed, 49 insertions(+), 22 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 b65c318..b1a6ae1 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,13 +4,11 @@ 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; -import com.google.zxing.BarcodeFormat; -import com.google.zxing.MultiFormatWriter; -import com.google.zxing.WriterException; -import com.google.zxing.common.BitMatrix; import com.hdl.linkpm.sdk.core.exception.HDLException; import com.hdl.linkpm.sdk.user.bean.NewVersionBean; import com.hdl.photovoltaic.R; @@ -22,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; @@ -46,8 +45,8 @@ @Override public void onBindView(Bundle savedInstanceState) { - setNotificationBarBackgroundColor(CustomColor.white); - setStatusBarTextColor(); + setStatusBarTranslucent(); + getWindow().setNavigationBarColor(getColor(R.color.text_FF000000)); //鍒濆鍖� initView(); //鍒濆鍖栫晫闈㈢洃鍚櫒 @@ -65,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)); } } @@ -74,16 +73,20 @@ } }); - //todo 绛夋帴鍙� - String content = "https://spark.appc02.com/ksgd1"; - 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/HDLDebugerDownload.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.topBackBtn.setOnClickListener(new View.OnClickListener() { + viewBinding.toolbarTopRl.topBackLl.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); @@ -117,14 +120,23 @@ } }); + viewBinding.contactUsRl.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(); + intent.setClass(_mActivity, ContactUsActivity.class); + startActivity(intent); + + } + }); } private void initView() { - viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setText(R.string.me_regard); - viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setTextColor(getResources().getColor(R.color.text_030D1C, null)); - viewBinding.toolbarTopFragmentHouseListRl.topBackBtn.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); @@ -138,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(); @@ -154,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