kopia lustrzana https://github.com/ryukoposting/Signal-Android
Sort country codes as strings rather than ints.
rodzic
a20d5fd6cf
commit
5f0035b2d0
|
@ -30,7 +30,7 @@ class RegistrationNumberInputController(
|
||||||
private val spinnerView: MaterialAutoCompleteTextView = countryCodeInputLayout.editText as MaterialAutoCompleteTextView
|
private val spinnerView: MaterialAutoCompleteTextView = countryCodeInputLayout.editText as MaterialAutoCompleteTextView
|
||||||
private val supportedCountryPrefixes: List<CountryPrefix> = PhoneNumberUtil.getInstance().supportedCallingCodes
|
private val supportedCountryPrefixes: List<CountryPrefix> = PhoneNumberUtil.getInstance().supportedCallingCodes
|
||||||
.map { CountryPrefix(it, PhoneNumberUtil.getInstance().getRegionCodeForCountryCode(it)) }
|
.map { CountryPrefix(it, PhoneNumberUtil.getInstance().getRegionCodeForCountryCode(it)) }
|
||||||
.sortedBy { it.digits }
|
.sortedBy { it.digits.toString() }
|
||||||
private val spinnerAdapter: ArrayAdapter<CountryPrefix> = ArrayAdapter<CountryPrefix>(context, R.layout.registration_country_code_dropdown_item, supportedCountryPrefixes)
|
private val spinnerAdapter: ArrayAdapter<CountryPrefix> = ArrayAdapter<CountryPrefix>(context, R.layout.registration_country_code_dropdown_item, supportedCountryPrefixes)
|
||||||
private val countryCodeEntryListener = CountryCodeEntryListener()
|
private val countryCodeEntryListener = CountryCodeEntryListener()
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue