查了好几天都没有查到,最后翻看源码看到了可以直接设置alpha的值为0.87 0.54
<TextView
android:id="@+id/item_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="14sp"
android:alpha="0.87"
android:textColor="#000000"
/>
本文介绍如何在Android中通过XML布局文件直接设置TextView的透明度(alpha值)为0.87,实现文字显示的透明效果。

被折叠的 条评论
为什么被折叠?



