An extension of EditText with pin style written in Kotlin

Overview

pin-edittext

platform Kotlin jcenter API Android Arsenal License

An extension of EditText with pin style

Sceenshot

Usage

Include PinCodeEditText in your layout XML

<com.oakkub.android.PinEditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:maxLength="4"
    android:inputType="textNoSuggestions"
    app:pinHighlightStateDrawable="@drawable/your_pin_highlight_state"
    app:pinNormalStateDrawable="@drawable/your_pin_normal_state"
    app:pinSpace="16dp"
    app:pinHeight="24dp"
    app:pinWidth="24dp"/>
  • android:maxLength: The total pin (Required to make PinEditText limit its length)
  • android:inputType: Preferred "textNoSuggestions" (If you want text) or "number" (If you want only number)
  • app:pinSpace: Space between each pin (Default: 16dp)
  • app:pinHeight: Height of each pin (Default: 24dp)
  • app:pinWidth: Width of each pin (Default: 24dp)
  • app:pinHighlightStateDrawable: Drawable of each pin that already has text
  • app:pinNormalStateDrawable: Drawable of each empty pin

Requirement

Android API 15 or higher

Download

Add this to your app module's build.gradle file

dependencies {
    ...
    compile 'com.oakkub.android:pin-edittext:1.1.3'
}

License

Copyright 2017

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You might also like...
Ivy FRP is a Functional Reactive Programming framework for declarative-style programming for Android

FRP (Functional Reactive Programming) framework for declarative-style programming for Andorid. :rocket: (compatible with Jetpack Compose)

RoomJetpackCompose is an app written in Kotlin and shows a simple solution to perform CRUD operations in the Room database using Kotlin Flow in clean architecture.
RoomJetpackCompose is an app written in Kotlin and shows a simple solution to perform CRUD operations in the Room database using Kotlin Flow in clean architecture.

RoomJetpackCompose is an app written in Kotlin and shows a simple solution to perform CRUD operations in the Room database using Kotlin Flow in clean architecture.

Android To-Do MVVM Architecture App written in Kotlin.(ViewModel, ROOM, Livedata, Coroutines)

MVVM-To-Do-App A To-Do application written in kotlin using Android Architectural components What's new? Room + Coroutines - Upgraded Room to v2.1. Roo

🍼Debug Bottle is an Android runtime debug / develop tools written using kotlin language.
🍼Debug Bottle is an Android runtime debug / develop tools written using kotlin language.

🇨🇳 中文 / 🇯🇵 日本語 / 🇬🇧 English 🍼 Debug Bottle An Android debug / develop tools written using Kotlin language. All the features in Debug bottle are

A lightweight cache library written in Kotlin

[NEW] Released to Maven Central: 'com.github.yundom:kache:1.x.x' Kache A runtime in-memory cache. Installation Put this in your build.gradle implemen

Android AsyncTask wrapper library, written in Kotlin

KillerTask This is a Kotlin Android library to create async background tasks. Inspired by TinyTask, but more beautiful and easy to use for Kotlin Andr

Advancement Utils for Android Developer written in Kotlin
Advancement Utils for Android Developer written in Kotlin

RichUtils About Version: 2.0.0 :: Dreaming Bird (夢魅鳥, Yumemidori) :: Release Note (Eng) : https://blog.uzuki.live/richutils-2-0-0-dreaming-bird-releas

A simple 'Slide to Unlock' Material widget for Android, written in Kotlin 📱🎨🦄
A simple 'Slide to Unlock' Material widget for Android, written in Kotlin 📱🎨🦄

Slide To Act A simple Slide to Unlock Material widget for Android, written in Kotlin 🇰. Getting Started Example Features Attributes area_margin inner

Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project
Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project

Newsout Android and iOS mobile client for Nextcloud news App. The Android client is already available to download in the Play Store. F-Droid and Apple

Comments
  • Merged from Develop

    Merged from Develop

    • Fixed not be able to import it from gradle because of incorrect directory.

    • Rename prefix of customview from "PinCode" to "Pin"

    opened by oakkub 0
Owner
Metas Kerdwat
Metas Kerdwat
A simple library that can connect your autocomplete edittext to Google places api

Google Places AutoComplete EditText A simple library that can connect your autocomplete edittext to Google's places api Supporting Places AutoComplete

Mukesh Solanki 71 Dec 28, 2022
A collection of useful Kotlin extension for Android

karamba A collection of useful Kotlin extension for Android Install Add to gradle in allprojects maven { url 'https://jitpack.io' } then add this com

Matteo Crippa 48 Dec 15, 2022
A set of extension properties on Int, Long, Double, and Duration, that makes it easier to work with Kotlin Duration

Kotlin Duration Extensions Gradle Groovy repositories { mavenCentral() } implementation 'com.eygraber:kotlin-duration-extensions:1.0.1' Kotlin rep

Eliezer Graber 8 Nov 8, 2022
Most used extension methods for Kotlin

Extensify Most used extension methods for Kotlin Download Step 1. Add the JitPack repository to your build file allprojects { repositories {

Mobven 36 Aug 25, 2022
Extension functions over Android's callback-based APIs which allows writing them in a sequential way within coroutines or observe multiple callbacks through kotlin flow.

callback-ktx A lightweight Android library that wraps Android's callback-based APIs into suspending extension functions which allow writing them in a

Sagar Viradiya 171 Oct 31, 2022
A library provides some useful kotlin extension functions

ktext ?? A library provides some useful kotlin extension functions. Including in your project Gradle Add below codes to your root build.gradle file (n

热心市民苏苏仔 76 Oct 26, 2022
A collection of useful extension methods for Android

Kotlin Jetpack A collection of useful extension methods for Android Arguments Bindings Preferences Bindings Resources Bindings Arguments Bindings publ

Vladimir Mironov 187 Nov 10, 2022
Write a Ghidra Extension without using Java or Eclipse!

Ghidra Extension in Kotlin using IntelliJ IDEA Write a Ghidra Extension without using Java or Eclipse! Setup Hit Use this template at the top of the r

Florian Magin 7 Dec 15, 2022
A Burp extension to find stuff ¯\_(ツ)_/¯

FindStuffer FindStuffer, a Burp extension to find stuff, both for Community and Pro versions. You can use FindStuffer to aggregate as many text querie

Raphaël Akladios 8 Jun 11, 2022
Jackson extension for Mojang's NBT format

Jackson NBT Data Format Implements Mojang's NBT format in jackson. Usage Using this format works just like regular jackson, but with the ObjectMapper

Dyescape 3 Sep 10, 2022