From 59340c0b9107c813d6b3a5c953d693212485ad11 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 20 八月 2025 13:31:22 +0800
Subject: [PATCH] 2025年08月20日13:31:14
---
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