Android and setting alpha for (image) view alpha

SK9 picture SK9 · Feb 8, 2011 · Viewed 217.5k times · Source

Is there really no XML attribute counterpart to setAlpha(int)?

If not, what alternatives are there?

Answer

jfcogato picture jfcogato · May 7, 2013

It's easier than the other response. There is an xml value alpha that takes double values.

android:alpha="0.0" thats invisible

android:alpha="0.5" see-through

android:alpha="1.0" full visible

That's how it works.