Difference between Button with image, ImageButton, and clickable ImageView?

This probably only covers part of the differences, it would be helpful to actually look at the Android Source tree to see exactly what’s going on.

ImageButtons has push states, where as a clickable image does not.
You also can’t call setText for ImageButton, you can with a regular button.

They all derive from view, but looking at the following extends chain may help a little.

java.lang.Object
↳ android.view.View
   ↳ android.widget.ImageView
       ↳ android.widget.ImageButton

versus

java.lang.Object
↳ android.view.View
   ↳ android.widget.TextView
       ↳ android.widget.Button

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)