1. mainScreen.setOnKeyListener(mainScreenKeyListener);
2.
3. OnKeyListener mainScreenKeyListener = new OnKeyListener() {
4.
5. @Override
6. public boolean onKey(DialogInterface dialog, int keyCode,
KeyEvent event) {
7.
8. boolean disableEvent = false;
9.
10. if (event.getKeyCode()==KeyEvent.KEYCODE_BACK) {
11.
12. disableEvent = true;
13.
14. }
15.
16. return disableEvent;
17. }
18. };
On 21 September 2012 16:54, Jim Graham <[email protected]> wrote:
> On Wed, Sep 19, 2012 at 11:10:52AM -0700, Wajiha Kanwal wrote:
> > Can anybody tell me how can i disable BACK button on android?
>
> Remind me not to get any of your apps..... That's a sure way to piss off
> a lot of would-be users.
>
> Later,
> --jim
>
> --
> THE SCORE: ME: 2 CANCER: 0
> 73 DE N5IAL (/4) MiSTie #49997 < Running Mac OS X Lion >
> [email protected] ICBM/Hurricane: 30.44406N 86.59909W
>
> "'Wrong' is one of those concepts that depends on witnesses."
> --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09)
>
> Android Apps Listing at http://www.jstrack.org/barcodes.html
>
> --
> 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