修改注册页面选择国家区号功能,添加国家名称
This commit is contained in:
@@ -190,9 +190,12 @@ public class RegisterActivity extends AbsActivity {
|
||||
allCountries.addAll(Country.getAll(mContext, null));
|
||||
|
||||
String ct = Locale.getDefault().getCountry();
|
||||
ct = TextUtils.equals("CN", ct) ? "HK" : ct;
|
||||
for (int i = 0; i < allCountries.size(); i++) {
|
||||
if (allCountries.get(i).locale.equals(ct)) {
|
||||
mTvCountryCode.setText("+" + allCountries.get(i).code);
|
||||
String countryName = allCountries.get(i).name;
|
||||
countryName = countryName.length() > 4 ? countryName.substring(0, 4) : countryName;
|
||||
mTvCountryCode.setText("+" + allCountries.get(i).code + " " + countryName);
|
||||
mCountryCode = allCountries.get(i).code;
|
||||
return;
|
||||
}
|
||||
@@ -260,7 +263,9 @@ public class RegisterActivity extends AbsActivity {
|
||||
CountryPicker.newInstance(null, new OnPick() {
|
||||
@Override
|
||||
public void onPick(Country country) {
|
||||
mTvCountryCode.setText("+" + country.code);
|
||||
String countryName = country.name;
|
||||
countryName = countryName.length() > 4 ? countryName.substring(0, 4) + "..." : countryName;
|
||||
mTvCountryCode.setText(" +" + country.code + " " + countryName);
|
||||
mCountryCode = country.code;
|
||||
}
|
||||
}).show(getSupportFragmentManager(), "country");
|
||||
@@ -506,7 +511,7 @@ public class RegisterActivity extends AbsActivity {
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
|
||||
NoviceInstructorManager.get(mContext).setFrist(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:background="@null"
|
||||
android:hint="@string/reg_input_phone"
|
||||
android:hint="@string/phone_number"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:textColor="@color/textColor"
|
||||
|
||||
Reference in New Issue
Block a user