wjc
2025-05-07 5d3efa4c93dde0cde474951e5310bb72ebbf4184
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;
@@ -28,7 +27,7 @@
import com.hdl.photovoltaic.other.HdlCommonLogic;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlThreadLogic;
import com.hdl.photovoltaic.utils.KeyboardStateObserverUtils;
import com.hdl.photovoltaic.utils.GPSManagerUtils;
import com.hdl.photovoltaic.widget.ConfirmationCancelDialog;
import com.hdl.photovoltaic.widget.ConfirmationTipDialog;
import com.hdl.photovoltaic.widget.ListStaticDialog;
@@ -113,6 +112,18 @@
        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();
        }
@@ -392,7 +403,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);
        }
@@ -400,7 +411,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);
        }
@@ -421,6 +432,7 @@
        dialog.setDialogSize();
    }
    /**
     * 切换手机号或者邮箱的样式
     */
@@ -431,12 +443,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);
@@ -462,12 +474,12 @@
            //邮箱
            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);
            //隐藏区号
@@ -511,9 +523,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);
    }