SK9 SK9 - 20 days ago 5
Android Question

Android and setting alpha for (image) view alpha

Is there really no XML attribute counterpart to

setAlpha(int)
?

If not, what alternatives are there?

Answer

No, there is not, see how the "Related XML Attributes" section is missing in the ImageView.setAlpha(int) documentation. The alternative is to use View.setAlpha(float) whose XML counterpart is android:alpha. However, the latter in available only since API level 11.