Component given ability to choose phone code from list.
To open country selector screen, call
CountryCodeChooserActivity.start(this, country, REQUEST_CODE);
where this
is activity or fragment. country
can be nullable.
Also override onActivityResult
CountryCode code = CountryCodeIntent.get(data);
where data
is output intent.
Maven
<dependency>
<groupId>io.github.dmitrikudrenko</groupId>
<artifactId>countryphonecodechooser</artifactId>
<version>$latestVersion</version>
<type>pom</type>
</dependency>
Gradle
compile 'io.github.dmitrikudrenko:countryphonecodechooser:$latestVersion'
Copyright 2016 Dmitri Kudrenko.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.