Skip to content

Example phone number as edittext hint

Harsh Bhakta edited this page Jan 30, 2018 · 1 revision

Feature to show Country's example number as hint (placeholder text)

If you want the user to know expected number then you can enable this feature using app:ccp_hintExampleNumber="true". This will set example number as the hint (placeholder text) of registered carrier number edittext.

  <com.hbb20.CountryCodePicker
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   app:ccp_hintExampleNumber="true"/>

HintExampleNumberType:

Once you enable hint feature, by default, hints will be of MOBILE number type. You can change to FIXED_LINE or other using app:ccp_hintExampleNumberType="FIXED_LINE".

  <com.hbb20.CountryCodePicker
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   app:ccp_hintExampleNumber="true"
   app:ccp_hintExampleNumberType="FIXED_LINE"/>
Clone this wiki locally