hi Mark ,
Thanks for your reply ,
but still I'm not aware why, only when the "press()" is commented out
from "onKeyDown()" method
(i can say from logcat) ,the onKeyDown is invoked for every hit of the
appropriate key .When I run the program without commenting press()
from onKeyDown ,the call back method onKeyDown is called only once for
the very first-time hit on the key.why is this varied behavior.




On Apr 22, 5:42 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> gganesh wrote:
> > I wrote a simple program using SimpleAdapter to populate list view .To
> > do this i modified the existing notepad example and try using
> > onKeyDown instead of onCreateOptionMenu .Here i can activate the
> > onKeyDown method for first time only,for the second press, on the
> > appropriate key, the onKeyDown is not called ,I can say this from
> > logcat output.I could not guess the reason .
>
> If I had to guess, I would say that the ListView is intercepting your
> KEYCODE_DPAD_CENTER events.
>
> To prove this, try switching to some other key that ListView does not
> handle itself. If you then get both events, that means my guess is correct.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to