I am trying to create a Dashed input field for numbers in android layout, such as " _ _ _ _ " where I can add 4 numbers and get them in my main activity. I have searched a lot but not getting any better solution.
Asked
Active
Viewed 2,558 times
2 Answers
4
Use this library to achieve your objective. https://github.com/glomadrian/material-code-input

Satyam Anand
- 377
- 1
- 8
-
1i tried using this library but it doesnt work when i get data from the input fields – Muhammad Usman Apr 06 '17 at 22:10
-
i was doing a mistake , it worked now . thanks for your help – Muhammad Usman Apr 11 '17 at 07:30
2
Create EditText for 4 dashes and implement OnTextChanged() for every EditText to quickly jump to other input. Make sure the EditText has input type as number and can only allow a single digit. You can create such with this concept.

Sanjog Shrestha
- 417
- 9
- 16