The correct solution is simply to let the framework handle this. To wrap the 
focus from right to left, just use android:nextFocusRight.

On Sep 10, 2008 3:09 PM, "Mark Murphy" <[EMAIL PROTECTED]> wrote:

> However, it seems that every time I press the RIGHT button, the focus > 
moves TWO views over... t...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 s...


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to