[android-developers] Re: How to handle the key events for HOME, MENU, BACK?
I don't think SDK cares whether it is a hard key or soft key. To your
program,
they are all KeyDown and KeyUp events.
On 5月10日, 上午11時13分, "manis.droid" <manis.dr...@gmail.com> wrote:
> Hi John Coryat
>
> Thanks a lot for ur reply.
>
> By pressing the Hard keys and for a single application, I can handle
> the BACK key using this key event(KeyEvent.KEYCODE_BACK) and for MENU
> key using onOptionsItemSelected in that particular Activity.
>
> But how to handle the key events for the soft keys for MENU, BACK
> (these keys should be common for all the application and visible to
> all, may be in status bar or in some overlay) and other keys like
> Power, Voulme up/down, navigation control (left, right, up, down),
> dial/call and end/hangup.
>
> Waiting for ur reply.
>
> Thanks & Regards
> Manikandan.D
>
> On May 10, 10:48 am, "Maps.Huge.Info (Maps API Guru)"
>
> <cor...@gmail.com> wrote:
> > Handling of the menu and back keys is very easy, you can't intercept
> > the home key. Search the examples provided with the SDK for code to
> > handle menu and back keys.
>
> > -John Coryat
>
> > --
> > 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
> > android-developers+unsubscribe@googlegroups.com
> > For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en
>
> --
> 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
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en
--
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
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home