新增通过后端获取国家地区信息接口在注册时自动填写号码编号
This commit is contained in:
@@ -194,10 +194,9 @@ public class RegisterActivity extends AbsActivity {
|
||||
|
||||
//String ct = Locale.getDefault().getCountry();
|
||||
String ct = IMLoginManager.get(mContext).getString("sys_user_area");
|
||||
ToastUtil.show("地区:"+ct);
|
||||
ct = TextUtils.equals("CN", ct) ? "HK" : ct;
|
||||
ct = TextUtils.equals("中国", ct) ? "HK" : ct;
|
||||
for (int i = 0; i < allCountries.size(); i++) {
|
||||
if (allCountries.get(i).locale.equals(ct)) {
|
||||
if (allCountries.get(i).chs.equals(ct)) {
|
||||
String countryName = allCountries.get(i).name;
|
||||
countryName = countryName.length() > 4 ? countryName.substring(0, 4) : countryName;
|
||||
mTvCountryCode.setText("+" + allCountries.get(i).code + " " + countryName);
|
||||
|
||||
Reference in New Issue
Block a user