Request to focus on text editing

I have another problem in an Android app. I did 3 EditTexts in order. My intention is that I set OnClick to the 1st text edit appearing on the virtual keyboard. When I clicked further on the virtual keyboard, the cursor will appear in the second EditText. But I should not get the cursor in the second editText so that shoulod focuses on the third EditText. How can I concentrate in the 3rd editor?

Please, help.

Thanks in advance.

+4
source share
2 answers

You can specify

Android: nextFocusDown

in your layout.xml. For example (for edittext1):

android:nextFocusDown="@+id/edittext3" 
+6
source

Call requestFocus() on your third editText.

+1
source

Source: https://habr.com/ru/post/1345676/


All Articles