A simple custom view class to enter otp

Overview

otpview

API Android Arsenal

A custom view class to enter a four digit code which is used often these days for authentication.

How to integrate the library in your app?

Gradle Dependecy
dependencies {
        compile 'com.an.otpview:otpview:0.1.0'
}

Maven Dependecy

<dependency>
  <groupId>com.an.otpview</groupId>
  <artifactId>otpview</artifactId>
  <version>0.1.0</version>
  <type>pom</type>
</dependency>

How to use the library

Add the below line to the root layout of your xml file:

xmlns:app="http://schemas.android.com/apk/res-auto"
.....
       <com.an.otpview
            android:id="@+id/otp_view"
            app:background_color="@android/color/black"
            android:inputType="number"
            app:otp_maxLength="1"
            app:otp_gravity="center"
            app:otp_textColor="@android:color/white"
            app:otp_textSize="@dimen/font_large"
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
.....

Attributes includes:

Value Type
inputType android:inputType
otp_maxLength app:otp_maxLength
otp_gravity app:otp_gravity
otp_textColor app:otp_textColor
otp_textSize app:otp_textSize
background_color app:background_color
background_color app:background_color

That's pretty much it.

You might also like...
A collection of custom Android/Kotlin lint checks we use in our Android and Kotlin code bases at Slack.

slack-lints This repository contains a collection of custom Android/Kotlin lint checks we use in our Android and Kotlin code bases at Slack. This repo

Custom MediaPicker for Android. support targetSdk 30 & scoped storage. And use registerForActivityResult rather than onActivityResult.
Custom MediaPicker for Android. support targetSdk 30 & scoped storage. And use registerForActivityResult rather than onActivityResult.

MoongchiPicker What is MoongchiPicker? MoongchiPicker is custom media gallery base on Google's Material Design Bottom Sheets. You can fetch image or v

Repository ini berguna untuk menyimpan kode yang dibutuhkan untuk membuat sebuah Aplikasi Android yang memiliki ListView yang menggunakan Custom Adapter dan Mengambil data dari Database secara CRUD.

AndroidListView Repository ini berguna untuk menyimpan kode yang dibutuhkan untuk membuat sebuah Aplikasi Android yang memiliki ListView yang mengguna

Launchy - A custom launcher for our server that installs recommended mods

Launchy Our custom launcher which makes it easier to set up optional mods and in

Loco-strings-sync - A custom Gradle Plugin useful to sync loco string resources to local projects

loco-strings-sync A custom Gradle Plugin useful to sync loco string resources to

Added more features to app's crash dialog, fixed custom rom deleted dialog, the best experience to Android developer.

AppErrorsTracking 应用异常跟踪 Added more features to app's crash dialog, fixed custom rom deleted dialog, the best experience to Android developer. 为原生 FC

A curated list of great Android lint custom rules and resources

Awesome Android Lint A curated list of great Android lint custom rules and resources Contents Rules Articles Other Contribute Rules Google Sample Cust

An application to create custom QR codes to specify waste types and waste disposal procedures for products.

wasteqr An application to create custom QR codes to specify waste types and waste disposal procedures for products. What is WasteQR? WasteQR is an app

An Android app that gives you a password generated by a given phrase with a custom algorithm, it also has password and biometric security.

An Android app that gives you a password generated by a given phrase with a custom algorithm, it also has password and biometric security.

Owner
Anitaa Murthy
Android Developer/iOS Developer
Anitaa Murthy
This service provides first-class custom ROM integration for my Repainter app, which offers customizable dynamic theming for Android 12.

Repainter ROM integration This service provides first-class custom ROM integration for my Repainter app, which offers customizable dynamic theming for

Danny Lin 42 Jan 7, 2023
Simple custom view that draws an n-point star for Android

StarView ?? Simple custom view that draws an n-point star for Android. Features

Paul T 9 Dec 21, 2022
second submission in Belajar Fundamental Aplikasi Android Class from Dicoding Indonesia

GithubUserApp2 Before I explain how this application works and submission checklist, I want to say thank you to Dicoding Indonesia for providing "Bela

Achmad Alfiansyah 1 Dec 20, 2022
An Android app built with Kotlin, to help students at Kibabii University make monthly class welfare contributions

An Android app built with Kotlin, to help students at Kibabii University make monthly class welfare contributions. It is built with the MVVM pattern and the latest Jetpack components. Firebase as the backend

Joel Kanyi 21 Sep 24, 2022
Patter Lock using Hilt, Coroutines, Flow and Custom View Components based on MVVM architecture.

Pattern Lock App Sample project for created Pattern Lock View using custom view. Preview Usage Step 1 Add the PatterLockView in your XML layout file.

Furkan Özcan 5 Aug 22, 2021
Show worldwide headline. API/Glide library/recycler view/volley library/kotlin/xml/ chrome custom tabs

Show worldwide headline. API/Glide library/recycler view/volley library/kotlin/xml/ chrome custom tabs. -> you can click on headline and it will open an article of that news in the app(no need to go to chrome or any browser)

SUMIT KUMAR 5 Nov 28, 2022
Simple Android web-view-based application. The primary purpose is to show the website in Kiosk mode.

Kiosk mode app Simple Android web-view-based application. The primary purpose is to show the website in Kiosk mode. By default, the app works in Scree

Mykola Kichatov 1 Oct 25, 2022
A project which demonstrate how to develop a custom client on android for dribbble.com

##What is this? This is a project with custom client app on android for https://dribbble.com, which you can browse the popular icon and animation, lik

ZhangLei 599 Nov 14, 2022
Proof of concept of custom widgets and apps running on the Z Flip3 cover screen. Adds a widget to Z Flip3 cover screen that lets you launch a web browser-like app on the cover.

SubUI-browser Proof of concept of custom widgets and apps running on the Z Flip3 cover screen. Adds a widget to Z Flip3 cover screen that lets you lau

null 35 Dec 24, 2022
Azure B2C Custom Policy Designer

Azure B2C Custom Policy Designer Why has Microsoft never built a UI to deal with Custom Policy so far? I don't know, but I'll do it for free because i

Willian Antunes 7 Feb 11, 2022