> However, it seems that every time I press the RIGHT button, the focus
> moves TWO views over... the RIGHT button gets registered by the first
> view's listener, AND by the second view's listener, and the focus
> shifts to the third image button.  Any idea why this might be?

Ummmm...full moon?

Hmmm...not for another week...guess that's not it...

Try this as a workaround: instead of calling
f_navBar.getChildAt(f_navSelection).requestFocus(); directly in your
OnKeyListener, post() it as a Runnable to some View (e.g., the
ImageButton, the LinearLayout).

This should cause your focus change to occur *after* the key event is
consumed, since the Runnable won't be run until after the onKey() callback
is completed.

If the source of your trouble is because the focus change takes effect
before the key event is fully consumed, then this workaround should clear
it up.

And if it doesn't get you past the problem, you always wanted to
experiment with posting Runnables to a View, right? ;-)

--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.2 Published!



--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to