Thanks Mark Murphy for your answer. Can i ask some help
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
switch(keyCode){
case KeyEvent.KEYCODE_DPAD_DOWN:
* // Do you mean like this... Now it catch down button event when
it pressed
// What code so that down button not work? Like something for
cancel action button down*.
break;
}
return false;
}
thanks
On Sat, Oct 15, 2011 at 6:14 PM, Mark Murphy <[email protected]>wrote:
> In your activity, override onKeyDown() and consume the events. For up
> and down, this should work.
>
> Note, though:
>
> -- not all button events get to onKeyDown() (notably, HOME does not)
>
> -- many users will not like you very much, particularly blind users
> and users of Google TV, where the pointing device is rather important
>
> -- this only works within your own activities where you implement the
> onKeyDown() method; you cannot do this for the whole device
>
> On Fri, Oct 14, 2011 at 12:45 PM, Javlearner <[email protected]> wrote:
> > Hello android developers google group,
> > Does anyone know how to override the physical button on the screen, so
> > the down button, up button will not work if it is pressed and so the
> > focus will never change and unless the user presses the touch screen.?
> > Please the help
> > thanks im looking foward the answer,
> >
> > --
> > 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
> >
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
> Available!
>
> --
> 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
>
--
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