@Mark Murphy,
I think by right soft key, he meant the BACK button.

You can disable the BACK button, but I too think that you can't do the
same for the HOME button.

With the code you have posted, you disable default key handling for
all buttons, except HOME (not possible, AFAIK) and BACK (because you
use the default behavior, by calling super.onKeyDown(keyCode, event))

Android has received some criticism about its platform consistency and
lack of Google-recommended interface guidelines (in the spirit of
Apple's HIG). Whether that's justified is another topic, but keep in
mind that it's not advisable to change the default behavior of system-
used buttons for something more than sample/tutorial applications.

Dimitar

On Aug 22, 2:03 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> Shang Hao wrote:
> > Hi,
> > dis
> > I m making a test application and want to able all keys excluding the
> > back button...... Using below code i am not able to disable HOME key
> > and right soft key..... Please suggest what to do.
>
> >   �...@override
> >    public boolean onKeyDown(int keyCode, KeyEvent event) {
> >            if(keyCode == KeyEvent.KEYCODE_BACK){
> >                    return super.onKeyDown(keyCode, event);
> >            }
> >        else   {
> >                    return true;
> >            }
>
> >    }
>
> You cannot disable the home key, and Android does not have soft keys.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Beginning Android_ from Apress Now Available!

--~--~---------~--~----~------------~-------~--~----~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to