wjc
2025-04-09 6ae9f81d545f44a85c34dea1c11df8b70e3f940f
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;