Android PinView/ OtpView
A custom control to enter a four digit code usually in cases of authentication.
How to integrate into your app?
Integrating the project is simple a refined all you need to do is follow the below steps
Step 1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven {
url "https://jitpack.io"
}
}
}
Step 2. Add the dependency
dependencies {
compile 'com.github.mukeshsolanki:android-otpview-pinview:<latest-version>'
}
How to use the library?
Okay seems like you integrated the library in your project but how do you use it? Well its really easy just add the following to your xml design to show the otpview
..... <com.mukesh.OtpView
android:id="@+id/otp_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#cccccc"
android:inputType="number"
android:textColor="#FFFFFF"
app:otp="1234"
app:text_background_color="@color/colorAccent"
> </com.mukesh.OtpView> .....
That's pretty much it and your all wrapped up.