Hi,

I have an activity which overrides the onKeyDown method. The documentation
states the following about onKeyDown:

"Called when a key was pressed down and not handled by any of the views
inside of the activity."

The problem I have is that this method is being called even when the views
inside the activity handle it. I have a button implementing a longPress
listener. What I see on debugger when long clicking on the button with the
center key is that first onKeyDown from the activity is called then the
longPress listener from the button gets triggered. Even for Textviews, when
long clicking on it with the center select, the activity onKeyDown gets
triggered before the TextView processes the longclick (and shows the Input
Method context menu).

Does anyone know how to avoid onKeyDown to be triggered on these situations?
Is the documentation wrong?
I also considered retrieving the longpress information from the KeyEvent,
but sometimes it does not arrive with the longPress flag set.

I am using Eclair by the way.

Thanks a lot!

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