A library for otp view with gradient and lines

Overview

AndroidOtpView (With gradient color in lines)

License API

Preview

        

Otp View library for Android

Getting started

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 {
        implementation 'com.github.chaya222:AndroidOtpView:0.0.2'
}

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

  1. With Dash between lines
.....
  <com.poonam.androidotpview2.OtpView
            android:id="@+id/otpView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            custom:lineEndColor="@color/start_color_otp"
            custom:lineStartColor="@color/end_color_otp"
            custom:dashColor="@color/end_color_otp"
            custom:showDash="true"
            custom:lineCount="6" />
.....
  1. Without Dash between lines
.....
  <com.poonam.androidotpview2.OtpView
            android:id="@+id/otpView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            custom:lineEndColor="@color/start_color_otp"
            custom:lineStartColor="@color/end_color_otp"
            custom:showDash="false"
            custom:lineCount="6" />
.....
  1. Specific length of spaces (if not provided by default space will be equal to line length)
.....
  <com.poonam.androidotpview2.OtpView
            android:id="@+id/otpView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            custom:lineEndColor="@color/start_color_otp"
            custom:lineStartColor="@color/end_color_otp"
            custom:showDash="true"
	    custom:spaceLength="8"		      
            custom:lineCount="6" />
.....

Contribution

If you are interested to contribute, feel free to send pull requests or issues.

Note: All your pull requests should be written in kotlin

Questions?

Hit me on twitter Twitter

License

MIT License

Copyright (c) 2019 Poonam Parth

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...
ZoomHelper will make any view to be zoomable just like Instagram pinch-to-zoom
ZoomHelper will make any view to be zoomable just like Instagram pinch-to-zoom

ZoomHelper ZoomHelper will make any view to be zoomable just like the Instagram pinch-to-zoom. 😉 Installation ZoomHelper is available in the JCenter,

Arc Layout is a view group with which you can add a arc-shaped container in your layout.
Arc Layout is a view group with which you can add a arc-shaped container in your layout.

ArcLayout Arc Layout is a view group with which you can add a arc-shaped container in your layout. Two main variables are the direction and the curvat

Dots indicator that shows the current position on a View Pager. It does all the work for you with a few customisations.
Dots indicator that shows the current position on a View Pager. It does all the work for you with a few customisations.

Dots What is Dots? Dots is a library that helps in implementing a simple yet effective dots indicator for the View Pagers used in your android code. I

A fork of our clean architecture boilerplate using the Model-View-Intent pattern

Android Clean Architecture MVI Boilerplate Note: This is a fork of our original Clean Architecture Boilerplate, except in this repo we have switched o

🍞 The ultimate breadcrumbs view for Android!
🍞 The ultimate breadcrumbs view for Android!

KrumbsView The ultimate breadcrumbs view for Android! Inspired by JotterPad's breadcrumbs. Features: Custom typeface (from /assets and /res/font folde

:speedboat: Floating navigation view for displaying a list of items dynamically on Android.
:speedboat: Floating navigation view for displaying a list of items dynamically on Android.

Submarine Fully customizable floating navigation view for listing items dynamically on Android. Including in your project Gradle Add below codes to yo

Android View Lifecycle Extensions

Android View Lifecycle Extensions Extensions for Android View class that let you access a view lifecycle without having to create a custom view (exten

Location-history-viewer - Small compose-desktop app to view data from google's location history

Google Location History Takeout Viewer This application provides a minimalistic

Custom Sneaker view for Android.
Custom Sneaker view for Android.

SneakerView How to install ? You can add the library to your project using jitpack.io. Add the code below to your project's settings.gradle file. all

Releases(0.0.2)
Owner
Poonam Parth
Hello..Poonam this side.I am very energetic and hardworking.My work is my first and last love. My work is my best company to enjoy life to fullest ....;)
Poonam Parth
Blinking-image-view - A variant of Android View that blinks only the source image (not the background)

Blinker View for Android What is this? Blinker View is an Android View that blinks a given drawable. Yes, it's that simple. Place it in your layout an

Milos Marinkovic 4 Jul 29, 2020
View "injection" library for Android.

Kotter Knife Deprecated: This was a terrible idea because it allocates an object for every view reference. Do not use, and do not use anything like it

Jake Wharton 2.2k Dec 28, 2022
A library for creating dynamic skeleton view

Skeleton Placeholder View Overview A Library designed to draw a Skeleton by "skinning" the view from a provided layout. Skeleton is composed of Bone w

Ferry Irawan 25 Jul 20, 2021
A simple and easy adapter for RecyclerView. You don't have to make adapters and view holders anymore. Slush will help you.

한국어 No more boilerplate adapters and view holders. Slush will make using RecyclerView easy and fast. The goal of this project is to make RecyclerView,

SeungHyun 26 Sep 13, 2022
Clean MVVM with eliminating the usage of context from view models by introducing hilt for DI and sealed classes for displaying Errors in views using shared flows (one time event), and Stateflow for data

Clean ViewModel with Sealed Classes Following are the purposes of this repo Showing how you can remove the need of context in ViewModels. I. By using

Kashif Mehmood 22 Oct 26, 2022
A simple e-market application that allows users to view the store details and products, add products to the basket, and place an order.

E-Market Application Features : Store details & products screen Fetch the store detail from an endpoint and display this upper part of the screen. Fet

Amit Kumar guha 2 Jun 27, 2022
UserLoc - A API call using Retrofit to obtain list of users details and show on UI in recycler view and google map

UserLoc This uses a API call using Retrofit to obtain list of users details and

Rohit Kumar 0 Jun 22, 2022
A simple project that describes the relationship between the view and it's viewmodel in android development

View-ViewModel-Communication A simple project that describes the relationship between the view and it's viewmodel in android development In MVVM archi

Segun Francis 1 Nov 6, 2021
Modern Calendar View Supporting Both Hijri and Gregorian Calendars but in highly dynamic way

KCalendar-View Modern calendar view supporting both Hijri and Gregorian calendar

Ahmed Ibrahim 8 Oct 29, 2022
Android sliding panel that is part of the view hierarchy, not above it.

sliding-panel A ViewGroup that implements a sliding panel that is part of the view hierarchy, not above it. Difference from other libraries All other

Pierfrancesco Soffritti 441 Nov 12, 2022