 
                        
如何 我想实现,字体下面的半透明背景, 不会遮住图片。 请问怎么处理呢?
我已经设置了如下的值( android:background="#e0000000"),但实现的效果, 确实黑色的背景,遮住了图片。
<TextView
        android:id="@+id/itemName"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/app_name"
        android:textColor="@color/defaultWhite"
        android:textSize="16sp"
        android:background="#e0000000"
        android:layout_gravity="bottom" />
        
        Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
参考 View.html#attr_android:alpha
请善用developer.android.com
<TextView
...
background="#99000000"
style="@style/Transparent"
...
</TextView>
<style name="Transparent" parent="AppTheme">
</style>