6

What is the difference between Button and ImageButton, where if we use any image in button's background its also work like image button. So why we use image button?

Thanks in advance :)

RPB
  • 16,006
  • 16
  • 55
  • 79
MBMJ
  • 5,323
  • 8
  • 32
  • 51

1 Answers1

9

Button extends TextView, allowing you to create clickable text with a background image. http://developer.android.com/reference/android/widget/TextView.html

ImageButton extends Image view, which has more methods relevant to the manipulation of images. http://developer.android.com/reference/android/widget/ImageView.html

Aelexe
  • 1,216
  • 3
  • 18
  • 27
  • 5
    To expand on this answer a bit more you in Button you can set the label and the background image. For ImageButton you can set a foreground image and a background image. http://stackoverflow.com/questions/2283444/android-image-button/2283993#2283993 – CaseyB Jul 04 '12 at 04:21