I am trying to make a lock screen, the lock screen basically has four edit text fields, these fields basically take numerical input, no problem in providing the numerical part.
Now the problem I am having is that, the text fields should take only one numerical value,and the edit text fields should change focus, right after one field is provided with a value, how can achieve this?
For only allowing numerical input (and also showing the “number”-keyboard), use the
inputType-attribute of the EditText class. To only allow entering one digit into the field, you can use theandroid:maxLength-attibute.Use a
TextWatcherto check if the one digit has been entered into the text field and change the focus to the next field.