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
- Host: GitHub
- URL: https://github.com/parveshdhull/android-pin
- Owner: Parveshdhull
- License: apache-2.0
- Created: 2021-05-07T12:19:43.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-07T15:27:38.000Z (almost 5 years ago)
- Last Synced: 2024-10-28T22:00:55.161Z (over 1 year ago)
- Topics: android, android-application, android-development, android-studio, pin
- Language: Java
- Homepage:
- Size: 12.7 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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