I have 6 Edittexts grouped in 6 differents layouts, all in the same view. My problem is that my app is forced to landscape mode, and by pressing the 'next' button i want to automatically start to edit another editText rather than the one android set me by default. Example: i'm writing on EditText1, press next, and focus is taken by the EditText that is UNDER the 1st one. I want to edit the one that is RIGHT to it.
Sorry for my bad english :( The device is a galaxy tab, with Google API8/Android 2.2 Thanks
Haven't tested it, but this should work
some_edittext.setOnEditorActionListener(new OnEditorActionListener() {
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_NEXT) {
some_button.performClick();
return true;
}
return false;
}
});
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