A simple JAVA class that can create multiple PIN views in a layout and auto executes code on entering PIN
- Copy files from res folder to your specific folders in your project
- In your XML file, create a LinearLayout or RelativeLayout where you want to insert PIN view and keep note of the ID
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
pinClass.getText();
pinClass.clearPin();
pinClass.getFocus();
This project is based on Tonia Tkachuk's Blog
https://github.com/Parveshdhull
https://twitter.com/ParveshMonu
https://youtube.com/right2trick