Using this answer as a reference, I understand that a View's
setAlpha(float)
basically draws the view normally on a buffer, then uses a 2nd pass to draw the view with the alpha value on the scene, and because of this, setting a View's
alpha usually involves harming the performance of the app.
However, ImageViews
have another method called setImageAlpha(int)
which, from what I've gathered, applies the alpha value on the ImageView's
colour filter - removing the need for a 2nd pass all together and is therefore much more efficient.
My question is - since using setImageAlpha
on an ImageView
is much more efficient, is there any reason to ever use setAlpha(float)
on an ImageView
? Or should this be avoided in general in favour for setImageAlpha(int)?