我有RelativeLayout
ProgressBar
我想设置RelativeLayout透明,使用android:background="@null"
。它运行良好,但不适用于android 5.1.0及更高版本。Android RelativeLayout设置透明
这里的file.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null">
<ProgressBar style="@style/progress_bar_style"/>
</RelativeLayout>
所以,我已经试过像
android:background="#00000000"
android:background="#77000000"
android:background="#AARRGGBB"
e.t.c我在计算器已经找到了一些方法。 那么,如何解决这个问题呢?
UPDATE:
,'RelativeLayout'的颜色是什么? –
这是完全不同的布局吗? –
你为什么不使用alpha? –