1. ImageButton inherits from ImageView. Both have very small, because ImageView can also click on the corresponding, also have a click on the shadow effect. In fact their difference is the default style. For example, the same background and a picture, you will find ImageButton image will be centered, but the size does not scale. But the picture in ImageView is centered and automatically scaled by the size of the control space. The difference is caused by a parameter of ImageView: Android:scaletype= "Fitcenter", which automatically scales. The ImageButton does not automatically scale to: android:scaletype= "center".
The style of ImageButton:
<stylename= "Widget.imagebutton"> <Itemname= "Android:focusable">True</Item> <Itemname= "Android:clickable">True</Item> <Itemname= "Android:scaletype">Center</Item> <Itemname= "Android:background">@android:d Rawable/btn_default</Item> </style>
2. What is the difference between them and the Button? This is bigger because the Button inherits from TextView. That is, Button can write text, can put a background. And Imageview/imagebutton can put a background and a picture. So if we want to make a button that requires the text to be using a button, and if you need a buttons that combine an image and a background effect, use Imageview/imagebutton.
Android Imageview,imagebutton with Button