A View can certainly receive key events, that is how most key
processing (center pressing in buttons, navigating in lists, entering
text in text views) works.  To receive key events, a view does need to
have focus.  This will happen for you through the normal focus
navigation, or you can explicitly request focus with
View.requestFocus().

See the "Focus Handling" and other sections of the view doc for more
info:

http://code.google.com/android/reference/android/view/View.html

On Aug 15, 1:03 am, "Wlliam.Zhang" <[EMAIL PROTECTED]> wrote:
> hi,
>   I overrided the onKeyDown method of a class inherited form View, but
> it seems the key event cant posted to the view object at all, I have
> tried to focuse/selecte the view but all failed. Only the activity can
> get the key, is that to say we have to recieve key event in activity
> and forward it to view manually ?
>
> anyone has idea?  thanks.
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to