I'm just wondering if there is any significant difference between an ImageView
that's set to be clickable, compared with an ImageButton
?
Is there any reason for using one over the other? Is there any restriction on the drawable for an ImageButton
that leaves ImageView
as the only possible option?
Will I possibly lose any functionality of a button if I opt for a clickable ImageView
over ImageButton
?
Best Answer
There's no differences, except default style.
ImageButton
has a non-null background by default.EDIT: Also,
ImageButton.onSetAlpha()
method always returns false,scaleType
is set tocenter
and it's always inflated as focusable.Here's
ImageButton
's default style: