Skip to content

Country Change Listener

Harsh Bhakta edited this page Aug 26, 2017 · 1 revision

To get a call back when the selected country is changed, you need to add OnCountryChangeListener from java file.

    ccp.setOnCountryChangeListener(new CountryCodePicker.OnCountryChangeListener() {
 	            @Override 
 	            public void onCountrySelected() {
 		                    Toast.makeText(getContext(), "Updated " + ccp.getSelectedCountryName(), Toast.LENGTH_SHORT).show();
        	    }
    	});
Clone this wiki locally