From 87cd5df70918e6ba1af849c5f026d3719bfdb1ac Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 09 四月 2025 09:06:29 +0800
Subject: [PATCH] Merge branch '1.5.2' into dev

---
 app/src/main/java/com/hdl/photovoltaic/ui/me/BindPhoneActivity.java |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/me/BindPhoneActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/me/BindPhoneActivity.java
index 22a5341..cb5864d 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/me/BindPhoneActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/me/BindPhoneActivity.java
@@ -19,6 +19,7 @@
 import com.hdl.photovoltaic.other.HdlCommonLogic;
 import com.hdl.photovoltaic.other.HdlLogLogic;
 import com.hdl.photovoltaic.other.HdlThreadLogic;
+import com.hdl.photovoltaic.utils.GPSManagerUtils;
 import com.sahooz.library.countrypicker.Country;
 import com.sahooz.library.countrypicker.CountryPickerFragment;
 import com.sahooz.library.countrypicker.PickCountryCallback;
@@ -117,10 +118,21 @@
         }
         viewBinding.toolbarTopRl.topTitleTv.setText(R.string.set_change_bind_phone_number);
         viewBinding.toolbarTopRl.topBackLl.setVisibility(View.VISIBLE);
-
         checkClearIconShowOrNot(viewBinding.bindPhoneEt.getText().toString());
         try {
             Country.load(this);
+            Country country = null;
+            if (TextUtils.isEmpty(GPSManagerUtils.getInstance().getCountryCode(this))) {
+                //鍐嶆牴鎹郴缁熻瑷�
+                country = Country.getCountryInfo();
+            } else {
+                //鍏堟牴鎹畾浣�
+                country = Country.getLocationCountryInfo(GPSManagerUtils.getInstance().getCountryCode(this));
+            }
+            if (country != null) {
+                viewBinding.bindAreaTv.setText(country.translate);
+                viewBinding.bindAreaNumberTv.setText("+" + country.code);
+            }
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -214,9 +226,9 @@
         String verificationCode = viewBinding.changePhoneVerificationEt.getText().toString().replace(" ", "");
         boolean isEnabled = account.length() > 0 && verificationCode.length() > 0;
         if (isEnabled) {
-            viewBinding.bindPhoneTv.setTextColor(getColor(R.color.text_E6FFFFFF));
+            viewBinding.bindPhoneTv.setTextColor(getColor(R.color.text_FFACACAC));
         } else {
-            viewBinding.bindPhoneTv.setTextColor(getColor(R.color.text_66FFFFFF));
+            viewBinding.bindPhoneTv.setTextColor(getColor(R.color.text_FF5B5B5B));
         }
         viewBinding.bindPhoneTv.setEnabled(isEnabled);
         return isEnabled;

--
Gitblit v1.8.0