@Override
     public boolean onKeyDown(int keyCode, KeyEvent event)
     {
          if(keyCode == KeyEvent.KEYCODE_BACK)
          {
               onBackPressed();
               return true;
          }

          if(keyCode == KeyEvent.KEYCODE_HOME)
          {
               onHomeKeyPressed();
               return true;
          }

          return super.onKeyDown(keyCode, event);
     }

     protected void onBackPressed();
     protected void onHomeKeyPressed();


On Jun 8, 2:34 pm, Droid <[email protected]> wrote:
> I have a thread that needs specifically to be cancelled when the home
> button is pressed.
> But, nothing reliable gives me that information. (I have over 10
> activities all in the stack)

-- 
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

Reply via email to