| | |
| | | viewBinding.regionAccountNumberTv.setText("+964"); |
| | | } |
| | | switchPhoneOrEmailStyleView(); |
| | | |
| | | |
| | | new Thread( |
| | | new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | Country.load(this); |
| | | Country country = null; |
| | | if (TextUtils.isEmpty(GPSManagerUtils.getInstance().getCountryCode(this))) { |
| | | final Country[] country = new Country[1]; |
| | | Country.load(RegisterAccountActivity.this); |
| | | if (TextUtils.isEmpty(GPSManagerUtils.getInstance().getCountryCode(RegisterAccountActivity.this))) { |
| | | //再根据系统语言 |
| | | country = Country.getCountryInfo(); |
| | | country[0] = Country.getCountryInfo(); |
| | | } else { |
| | | //先根据定位 |
| | | country = Country.getLocationCountryInfo(GPSManagerUtils.getInstance().getCountryCode(this)); |
| | | country[0] = Country.getLocationCountryInfo(GPSManagerUtils.getInstance().getCountryCode(RegisterAccountActivity.this)); |
| | | } |
| | | runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if (country != null) { |
| | | viewBinding.regionAccountTv.setText(country.translate); |
| | | viewBinding.regionAccountNumberTv.setText("+" + country.code); |
| | | 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度 |
| | | } |
| | | |
| | | } |
| | | |