An open API service indexing awesome lists of open source software.

https://github.com/parveshdhull/android-pin

A simple JAVA class that can create multiple PIN views in a layout and auto executes code on entering PIN
https://github.com/parveshdhull/android-pin

android android-application android-development android-studio pin

Last synced: 6 months ago
JSON representation

A simple JAVA class that can create multiple PIN views in a layout and auto executes code on entering PIN

Awesome Lists containing this project

README

          

# android-pin - Easily create multiple PIN views

A simple JAVA class that can create multiple PIN views in a layout and auto executes code on entering PIN



## Prerequisite
1. Copy files from res folder to your specific folders in your project
2. In your XML file, create a LinearLayout or RelativeLayout where you want to insert PIN view and keep note of the ID

## Usage
### 1. Creating PIN

```
PINClass pinClass = new PINClass(this, R.id.linear_layout_insert_id, new Callable() {
@Override
public Object call() {
submitPIN();
return null;
}
});
```
**NOTE:** You can keep the last argument as null, if you don't want any code to be auto executed

### 2. Other Functions

- `pinClass.getText();`
- `pinClass.clearPin();`
- `pinClass.getFocus();`

## Credits
This project is based on Tonia Tkachuk's [Blog](http://lomza.totem-soft.com/pin-input-view-in-android/)

## Websites
https://github.com/Parveshdhull

https://twitter.com/ParveshMonu

https://youtube.com/right2trick