难道真的没有XML属性对应于 setAlpha(INT)
?
Is there really no XML attribute counterpart to setAlpha(int)
?
如果不是,有什么替代品呢?
If not, what alternatives are there?
没有,没有,怎么看相关的XML属性部分的丢失的的ImageView.setAlpha(int)文档。另一种方法是使用View.setAlpha(float) /安卓:阿尔法代替。然而,只因为后者在可用的API级别11。
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) / android:alpha instead. However, the latter in available only since API level 11.