I found a workaround. You have to override the onKeyUp method in your
controlling activity. Suppose you have two AutoCompleteTextViews,
autoComplete1 and autoComplete2:
public boolean onKeyUp (int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_ENTER) {
if (autoComplete1.hasFocus()) {
//sends focus to autoComplete2 (user pressed "Next")
autoComplete2.requestFocus();
return true;
}
else if (autoComplete2.hasFocus()) {
//closes soft keyboard (user pressed "Done")
InputMethodManager inputManager = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFromWindow(autoComplete2.getWindowToken
(), InputMethodManager.HIDE_NOT_ALWAYS);
return true;
}
}
return false;
}
On Nov 15, 12:57 am, "Armond Avanes" <[email protected]> wrote:
> Hi Guys,
>
> Has anyone noticed that AutoCompleteTextView doesn't pass the focus to the
> next field when you tap on "NEXT" button on soft keyboard? And it's all
> happening on Android 1.6. v1.5 works flawlessly! Is there any known solution
> for this?
>
> Thank you,
> Armond
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en