[android-developers] handling back button

2011-11-24 Thread karthik
Sir/madam, i am working on an application in which if i click(normal click) on the back button the moveTaskToBackgroud(true) must be called. else if it is a longpress then there id nothing to do. please help regards, karthik -- You received this message because you are subscribed to the Goo

[android-developers] handling back button

2011-11-24 Thread karthik
Sir/madam, i am working on an application in which if i click(normal click) on the back button the moveTaskToBackgroud(true) must be called. else if it is a longpress then there id nothing to do. please help regards, karthik -- You received this message because you are subscribed to the Goo

Re: [android-developers] handling back button

2011-11-24 Thread Uberall, Android
Dear Karthik, I would like to recommend you to use the following code snippet in your activity. @Override public boolean onKeyDown(int keyCode, KeyEvent event) { super.onKeyDown(keyCode, event); if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() >= 0) { *

Re: [android-developers] handling back button

2011-11-24 Thread Mark Murphy
On Thu, Nov 24, 2011 at 5:09 AM, karthik wrote: > i am working on an application in which if i click(normal click) on > the back button the moveTaskToBackgroud(true) must be called. Please do not do this. Please leave the BACK button alone. The user can press HOME to achieve your desired function

Re: [android-developers] handling back button

2011-11-24 Thread Jim Graham
On Thu, Nov 24, 2011 at 02:14:21AM -0800, karthik wrote: > > i am working on an application in which if i click(normal click) on > the back button the moveTaskToBackgroud(true) must be called. else if > it is a longpress then there id nothing to do. You already got your answer from Mark Murphy...

Re: [android-developers] handling back button

2011-11-24 Thread NaveenShrivastva
In case of activity life cycle when user pressing the back or home button then onPause method calls by process When i am trying to handle activitySwitchFlag and database on pause then app crash , please help me is any way for block home button for my on activity if no then how to handle separate

Re: [android-developers] Handling back button with Soft keypad

2009-11-10 Thread Dianne Hackborn
http://developer.android.com/reference/android/view/View.html#onKeyPreIme(int, android.view.KeyEvent) On Fri, Nov 6, 2009 at 10:07 AM, gshetty wrote: > Hi > > I have a simple edit control in my application and as expected the > soft keypad comes up on tapping it. > > Now what I want to do is tha