| | |
| | | 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; |
| | |
| | | } |
| | | 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(); |
| | | } |
| | |
| | | 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; |