| | |
| | | viewBinding.regionAccountNumberTv.setText("+964"); |
| | | } |
| | | switchPhoneOrMailView(); |
| | | // 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 { |
| | | Country.load(this); |
| | | Country country = null; |
| | | if (TextUtils.isEmpty(GPSManagerUtils.getInstance().getCountryCode(this))) { |
| | | final Country[] country = new Country[1]; |
| | | Country.load(_mActivity); |
| | | if (TextUtils.isEmpty(GPSManagerUtils.getInstance().getCountryCode(_mActivity))) { |
| | | //再根据系统语言 |
| | | country = Country.getCountryInfo(); |
| | | country[0] = Country.getCountryInfo(); |
| | | } else { |
| | | //先根据定位 |
| | | country = Country.getLocationCountryInfo(GPSManagerUtils.getInstance().getCountryCode(this)); |
| | | country[0] = Country.getLocationCountryInfo(GPSManagerUtils.getInstance().getCountryCode(_mActivity)); |
| | | } |
| | | 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.changePhoneVerificationTv, viewBinding.changePhoneVerificationTv.getText().toString(), true, null); |
| | | HdlCommonLogic.getInstance().setSpan(viewBinding.changeMailVerificationTv, viewBinding.changeMailVerificationTv.getText().toString(), true, null); |
| | | if (UserConfigManage.getInstance().isArabicLanguage()) { |
| | | viewBinding.changeBackTv.setRotation(180); // 旋转180度 |
| | | } |
| | | } |
| | | |
| | | |