Search code examples
androidandroid-edittextlibphonenumber

Android, library-com.hbb20:ccp:2.2.0 shows duplicate hint in android api versions below 21


enter image description here

I am facing this problem while using "library-com.hbb20:ccp:2.2.0" for phone number validation, in Android API version below 20 the Edittext shows the double hint. here is my build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
    applicationId "com.test"
    minSdkVersion 18
    targetSdkVersion 26
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.hbb20:ccp:2.2.2'                        // phone number validator
}

}

Solution

  • This was a bug which is fixed. Please upgrade to newer version. As of today it's 2.2.7.

    dependencies {
          implementation 'com.hbb20:ccp:2.2.7'
        }