I have a couple of edit text boxes on a single line. After the user types in a specific number of characters in the first I want to automatically move to the next edit text. How do I achieve this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can achieve this by using the
Text Watcherclass and then set the focus on the nextEditTextin theOnTextChanged()method of the TextWatcher.In your case, since you have two Edit Texts, say
et1andet2. You can try out the following code:-I have not checked out the code myself, but I hope this will help you solve your problem.