[android-developers] onBackPressed backwards compatibility

2011-06-17 Thread Veeti Paananen
Hi! Is there any way to get the example in "Story 3" at http://android-developers.blogspot.com/2009/12/back-and-other-hard-keys-three-stories.html actually working? Having onBackPressed in an activity will cause a java.lang.VerifyError to be thrown when running on an 1.6 device. I really want to

Re: [android-developers] onBackPressed

2011-05-23 Thread Miguel Morales
http://stackoverflow.com/questions/6077141/android-webview-how-to-code-the-back-button On Mon, May 23, 2011 at 6:41 AM, a23456 wrote: > @override > public void onBackPressed(){ > nWebView.goBack(); > return; > } > > I am using code above in Activity (from tutorial) and it does not > work :-( > A

[android-developers] onBackPressed

2011-05-23 Thread a23456
@override public void onBackPressed(){ nWebView.goBack(); return; } I am using code above in Activity (from tutorial) and it does not work :-( Api level 8 It was working couple days ago but I did play with some settings and now it does not work :-( How can I fix it? When I click Back button - deb

Re: [android-developers] onBackPressed to hide Not destroy activity

2011-05-06 Thread Mark Murphy
On Fri, May 6, 2011 at 12:07 PM, Cel wrote: > i know how to cancel back keypress, so that the activity / main window > stays visible: > >    public void onBackPressed() { >        return; >    } > > my aim is to hide the activity, however, without finishing it Why not let it finish? And what doe

[android-developers] onBackPressed to hide Not destroy activity

2011-05-06 Thread Cel
i know how to cancel back keypress, so that the activity / main window stays visible: public void onBackPressed() { return; } my aim is to hide the activity, however, without finishing it, how do you do that in the onBackPressed event? i.e. I would like to get as far as onPause()

Re: [android-developers] onBackPressed() not working

2010-08-25 Thread Donal Rafferty
Thanks Dianne, Adding this line solved my problem return super.onKeyDown(keyCode, event); And I have changed the code to use moveTaskToBack(true); instead. Thanks On Tue, Aug 24, 2010 at 6:02 PM, Dianne Hackborn wrote: > Starting an activity in onBackPressed is... questionable. You really

Re: [android-developers] onBackPressed() not working

2010-08-24 Thread Dianne Hackborn
Starting an activity in onBackPressed is... questionable. You really should use moveTaskToBack(). Sorry I know this doesn't answer your actual question... I'll look and see if it is working on my devices. On Tue, Aug 24, 2010 at 8:56 AM, draf...@gmail.com wrote: > I have an application buildi

[android-developers] onBackPressed() not working

2010-08-24 Thread draf...@gmail.com
I have an application building against Android 2.1 and I want to override the back button. I have followed the example here: http://android-developers.blogspot.com/2009_12_01_archive.html And my code is as follows: --- @Override public boolean onKeyDown(int keyC