[android-developers] Re: How can I know when the home button has been pressed?

2011-06-09 Thread Andy Fung
 @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 rod...@gmail.com 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How do I remove the background of a image button?

2011-04-28 Thread Andy Fung
setBackground to null

or on xml file
Background=@null

On 4月26日, 下午5時02分, shyme shym...@gmail.com wrote:
 Dear :

     I use a d circle image button. I had set the picture with no
 backgrounf. But it will display a rectacle pricture with the white
 color around the circle button. How can I remove the white backgound?
 Thanks.

 Best Regards,
 shyme

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en