I am curious, why would I ever use Button or ImageButton, when TextViews, ImageViews, and everything else all can have onclicklisteners, all can have src's and background attributes, states and everything else that a Button or ImageButton offers
I might be missing something, so please reveal what it is
There's no differences, except default style. ImageButton has a non-null background by default.
Also, ImageButton.onSetAlpha() method always returns false, scaleType is set to center and it's always inflated as focusable.
Here's ImageButton's default style:
<style name="Widget.ImageButton">
<item name="android:focusable">true</item>
<item name="android:clickable">true</item>
<item name="android:scaleType">center</item>
<item name="android:background">@android:drawable/btn_default</item>
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With