-
-
Notifications
You must be signed in to change notification settings - Fork 507
Remember last selection
Harsh B. Bhakta edited this page May 5, 2019
·
2 revisions
For some use-cases it is required that selection of country remains unchanged when app is restarted or activity is relaunched.
- To enable this, add
app:ccp_rememberLastSelection="true"
in XML of your CCP. - First time when there is no history of country selection, it will set default country or auto-detected country (if autoDetectCountry is enabled) in CCP.
- Now whenever user will select some country from a CCP dialog, that will be recorded on shared preferences.
- From next run, this will load last selected country and override default country or autodetected country.
- If you are working with multiple CCP views, you might want to save different selections for each.
- Simply by providing different memory tags, different selections will be maintained for each CCP.
- To specify tag, add
app:ccp_selectionMemoryTag="anyDifferentString"
to CCP along withapp:ccp_rememberLastSelection="true"
in XML of CCP.
- How to Integrate into your project
- Full Number Support
- Use as a Country Selector
- Auto detect country
- Auto detect language
- Remember last selection
- Country Preference
- Custom Mater List
- Exclude Countries
- Example phonenumber as hint
- Multi Language Support
- Default Country
- Country Selection Listener
- Dialog events listener
- CCP Theme Customization
- CCP Dialog Theme Customization
- Custom TypeFace
- Read Selected Country
- XML Properties
- Update Guide to v2
- Guide to Add New Language Support
- Guide to add New Country
- Change contry names for local project
- Handle CCP ClickListener Manually
- Custom Dialog Title/Hint/Empty Result ACK
- Flag Emoji Support (BETA)
- Change Log