I have a problem with the nextFocus...
attributes of EditText
. First, I have a really hard time understanding which one of the nextFocus...
parameters I'm supposed to use. When i press Next
on my softkeyboard its looking for a next EditText
, but how am i supposed to know if its looking down or up or wherever? I still have to specify the ID of the next View its going to focus, so why bother with directions at all?
Anyway, this is my layout: http://imgur.com/na1xn2s
And when I edit Stacks I want the next EditText
to be the Rest, but it doesn't work. This is my code:
stacks = (EditText) dialogView.findViewById(R.id.calc_stacks_edit);
rest = (EditText) dialogView.findViewById(R.id.calc_rest_edit);
stacks.setImeOptions(EditorInfo.IME_ACTION_NEXT);
stacks.setNextFocusDownId(R.id.calc_rest_edit);
rest.setImeOptions(EditorInfo.IME_ACTION_DONE);
It still goes to the Amount EditText
insead of Rest when Next button is pressed. What is the problem?
From XML set these attribs to stack.
android:nextFocusForward="@+id/rest"
android:inputType="textNoSuggestions"
android:imeOptions="actionNext"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With