From 0efa4dfdfad5647abb73d38deb3e8ab5f444e5cb Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期五, 20 三月 2026 17:29:33 +0800
Subject: [PATCH] 2026年03月20日17:29:31

---
 app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java |   78 +++++++++++++++++++++++----------------
 1 files changed, 46 insertions(+), 32 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java
index 414d4ea..ad3ec6a 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java
@@ -12,7 +12,6 @@
 import android.view.View;
 
 import androidx.appcompat.content.res.AppCompatResources;
-import androidx.constraintlayout.widget.ConstraintSet;
 
 import com.hdl.linkpm.sdk.core.exception.HDLException;
 import com.hdl.linkpm.sdk.user.HDLLinkPMUser;
@@ -22,6 +21,7 @@
 import com.hdl.photovoltaic.config.AppConfigManage;
 import com.hdl.photovoltaic.config.UserConfigManage;
 import com.hdl.photovoltaic.databinding.ActivityRegisterAccountBinding;
+import com.hdl.photovoltaic.enums.Languages;
 import com.hdl.photovoltaic.enums.VerifyType;
 import com.hdl.photovoltaic.listener.CloudCallBeak;
 import com.hdl.photovoltaic.other.HdlAccountLogic;
@@ -29,15 +29,12 @@
 import com.hdl.photovoltaic.other.HdlLogLogic;
 import com.hdl.photovoltaic.other.HdlThreadLogic;
 import com.hdl.photovoltaic.utils.GPSManagerUtils;
-import com.hdl.photovoltaic.utils.KeyboardStateObserverUtils;
 import com.hdl.photovoltaic.widget.ConfirmationCancelDialog;
 import com.hdl.photovoltaic.widget.ConfirmationTipDialog;
 import com.hdl.photovoltaic.widget.ListStaticDialog;
 import com.sahooz.library.countrypicker.Country;
 import com.sahooz.library.countrypicker.CountryPickerFragment;
 import com.sahooz.library.countrypicker.PickCountryCallback;
-
-import java.util.Locale;
 
 
 /**
@@ -102,7 +99,7 @@
 
     private void initView() {
         //鏍规嵁app璇█榛樿鏈嶅姟鍣ㄥ湴鍧�
-        if (UserConfigManage.getInstance().isZh()) {
+        if (UserConfigManage.getInstance().getCurrentAppLanguage().equals(Languages.zh)) {
             mUrl = "https://china-gateway.hdlcontrol.com";
             viewBinding.regionTv.setText("HDL China");
             viewBinding.regionAccountTv.setText(getText(R.string.home_chinese_mainland));
@@ -114,26 +111,44 @@
             viewBinding.regionAccountNumberTv.setText("+964");
         }
         switchPhoneOrEmailStyleView();
-        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.regionAccountTv.setText(country.translate);
-                viewBinding.regionAccountNumberTv.setText("+" + country.code);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+
+
+        new Thread(
+                new Runnable() {
+                    @Override
+                    public void run() {
+                        try {
+                            final Country[] country = new Country[1];
+                            Country.load(RegisterAccountActivity.this);
+                            if (TextUtils.isEmpty(GPSManagerUtils.getInstance().getCountryCode(RegisterAccountActivity.this))) {
+                                //鍐嶆牴鎹郴缁熻瑷�
+                                country[0] = Country.getCountryInfo();
+                            } else {
+                                //鍏堟牴鎹畾浣�
+                                country[0] = Country.getLocationCountryInfo(GPSManagerUtils.getInstance().getCountryCode(RegisterAccountActivity.this));
+                            }
+                            runOnUiThread(new Runnable() {
+                                @Override
+                                public void run() {
+                                    if (country != null) {
+                                        viewBinding.regionAccountTv.setText(country[0].translate);
+                                        viewBinding.regionAccountNumberTv.setText("+" + country[0].code);
+                                    }
+                                }
+                            });
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }
+        ).start();
+
+
         HdlCommonLogic.getInstance().setSpan(viewBinding.registerPhoneVerificationTv, viewBinding.registerPhoneVerificationTv.getText().toString(), true, null);
         HdlCommonLogic.getInstance().setSpan(viewBinding.registerMailVerificationTv, viewBinding.registerMailVerificationTv.getText().toString(), true, null);
-
+        if (UserConfigManage.getInstance().isArabicLanguage()) {
+            viewBinding.registerBackTv.setRotation(180); // 鏃嬭浆180搴�
+        }
 
     }
 
@@ -407,7 +422,7 @@
             String str = time + "s" + getString(R.string.home_login_psw_verification_repeater);
 
             viewBinding.registerMailVerificationTv.setText(str);
-//            viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF, null));
+//            viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_FFACACAC, null));
             viewBinding.registerMailVerificationTv.setEnabled(false);
 
         }
@@ -415,7 +430,7 @@
         @Override
         public void onFinish() {
             viewBinding.registerMailVerificationTv.setText(getString(R.string.home_login_verification_regain));
-//            viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF, null));
+//            viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_FFACACAC, null));
             viewBinding.registerMailVerificationTv.setEnabled(true);
 
         }
@@ -447,12 +462,12 @@
             //鎵嬫満鍙�
             viewBinding.registerPhoneTitleIc.accountTitleTv.setText(R.string.home_login_phone);
             viewBinding.registerPhoneTitleIc.accountTitleTv.setTextSize(18);
-            viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF, null));
+            viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_FFACACAC, null));
             viewBinding.registerPhoneTitleIc.lineV.setVisibility(View.VISIBLE);
 
             viewBinding.registerMailTitleIc.accountTitleTv.setText(R.string.home_login_email);
             viewBinding.registerMailTitleIc.accountTitleTv.setTextSize(14);
-            viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF, null));
+            viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B, null));
             viewBinding.registerMailTitleIc.lineV.setVisibility(View.GONE);
             //鏄剧ず鍖哄彿
             viewBinding.registerRegionAccountRl.setVisibility(View.VISIBLE);
@@ -478,14 +493,13 @@
             //閭
             viewBinding.registerPhoneTitleIc.accountTitleTv.setText(R.string.home_login_phone);
             viewBinding.registerPhoneTitleIc.accountTitleTv.setTextSize(16);
-            viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF, null));
+            viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B, null));
             viewBinding.registerPhoneTitleIc.lineV.setVisibility(View.GONE);
 
             viewBinding.registerMailTitleIc.accountTitleTv.setText(R.string.home_login_email);
             viewBinding.registerMailTitleIc.accountTitleTv.setTextSize(18);
-            viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF, null));
+            viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_FFACACAC, null));
             viewBinding.registerMailTitleIc.lineV.setVisibility(View.VISIBLE);
-
             //闅愯棌鍖哄彿
             viewBinding.registerRegionAccountRl.setVisibility(View.GONE);
             //杈撳叆閭
@@ -527,9 +541,9 @@
         }
         boolean isEnabled = account.length() > 0 && psw1.length() > 0 && psw2.length() > 0 && verification_code.length() > 0;
         if (isEnabled) {
-            viewBinding.registerCompleteTv.setTextColor(getColor(R.color.text_E6FFFFFF));
+            viewBinding.registerCompleteTv.setTextColor(getColor(R.color.text_FFACACAC));
         } else {
-            viewBinding.registerCompleteTv.setTextColor(getColor(R.color.text_66FFFFFF));
+            viewBinding.registerCompleteTv.setTextColor(getColor(R.color.text_FF5B5B5B));
         }
         viewBinding.registerCompleteTv.setEnabled(isEnabled);
     }

--
Gitblit v1.8.0