-
-
Notifications
You must be signed in to change notification settings - Fork 507
Custom Dialog Title | Search Hint | Empty result ACK
Harsh B. Bhakta edited this page Mar 18, 2019
·
2 revisions
To change the title / Search Hint / Empty result acknowledgement message, a CustomDialogTextProvider
must be provided.
-
@param language
is the currently applied language. -
@param default<Value>
is the library default message text for given language.
If you are not planning to change the message for only specific message or specific language, it is suggested to return defaultValue for other message/language.
This code will do following:
- Title : For English and Japanese language, it will return custom title and default for other.
- Hint : Custom hint message for Hindi and default for other.
- No Result ACK : No customization. Only library defaults.
ccp.setCustomDialogTextProvider(new CountryCodePicker.CustomDialogTextProvider() {
@Override
public String getCCPDialogTitle(CountryCodePicker.Language language, String defaultTitle) {
switch (language) {
case ENGLISH:
return "<Custom English Title>";
case JAPANESE:
return "<Custom Japanese Title>";
default:
return defaultTitle;
}
}
@Override
public String getCCPDialogSearchHintText(CountryCodePicker.Language language, String defaultSearchHintText) {
switch (language) {
case HINDI:
return "<Custom Hindi Hint>";
default:
return defaultSearchHintText;
}
}
@Override
public String getCCPDialogNoResultACK(CountryCodePicker.Language language, String defaultNoResultACK) {
return defaultNoResultACK;
}
});
- 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