Set alpha on ImageView without setAlpha

joynes picture joynes · Mar 13, 2012 · Viewed 21.3k times · Source

Can I programatically set the alpha of an ImageView without the need for being dependent on API level 11 where setAlpha was introduced?

Answer

Muhammad Nabeel Arif picture Muhammad Nabeel Arif · Apr 7, 2012

ImageView has a method setAlpha(int) since API leve 1. So you can use it in any API level.
It is the setAlpha(float) method of View which is introduced in API level 11.