Content-Length: 284675 | pFad | http://github.com/stslex/PhoneEditText-library

34 GitHub - stslex/PhoneEditText-library: Provide phone mask for InputEditText in your code
Skip to content

stslex/PhoneEditText-library

Repository files navigation

PhoneEditText-library

Provide phone mask for InputEditText in your code

Implementation:

Add it to your project build.gradle:

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

and in module build.gradle:

dependencies {
    implementation 'com.github.stslex:PhoneEditText-library:0.1.0'
}

How to use

<com.google.android.material.textfield.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <st.slex.library.PhoneTextInputEditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </com.google.android.material.textfield.TextInputLayout>

In the code

/*Set country code to your editText*/
editText.setCountryCode(countryCode)

/*Set region code to your editText*/
editText.setRegionCode(regionCode)

/*Return true if phone number is valid*/
editText.isTextValidInternationalPhoneNumber()

/*Set phone numver*/
editText.setInternationalPhoneNumber(phone number)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/stslex/PhoneEditText-library

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy