[android-developers] Re: AutoCompleteTextView, passing the focus and Android 1.6

2009-11-17 Thread Jason
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 armond...@yahoo.com 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: AutoCompleteTextView, passing the focus and Android 1.6

2009-11-16 Thread Jason
I have also noticed this problem in 2.0.  I'm currently playing around
with it to try to find a solution.

On Nov 15, 12:57 am, Armond Avanes armond...@yahoo.com 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en