@android:颜色/透明不起作用
请注意 这不是活动/主题或清单的问题,而是@android:颜色/透明不起作用,android,transparency,Android,Transparency,请注意 这不是活动/主题或清单的问题,而是包含布局问题 问题 在我所有的版面中,我都包含了progress\u bar.xmllayout,其中包含以下内容 <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android
包含布局问题
问题
在我所有的版面中,我都包含了progress\u bar.xml
layout,其中包含以下内容
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#80ffffff"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:orientation="vertical">
<!--<ImageView-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--android:adjustViewBounds="true"-->
<!--android:background="#80ffffff"-->
<!--android:src="@drawable/splashscreen"-->
<!--android:visibility="visible" />-->
<ProgressBar
android:id="@+id/defaultBigProgressBar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="8dp"
android:indeterminate="false" />
<ProgressBar
android:id="@+id/defaultSmallProgressBar"
style="?android:attr/progressBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="8dp"
android:indeterminate="false"
android:visibility="gone" />
</FrameLayout>
当我将它包含在xml文件末尾的一些其他布局中时,如下所示
<include
android:id="@+id/progressBar"
layout="@layout/progress_bar"
android:background="#80ffffff"
android:visibility="gone" />
进度条
占据整个屏幕,完全覆盖在另一个视图上,没有任何透明度
我试过从其他SO问题中提出建议,没有工作
这些不起作用
- android:background=“@android:color/transparent”
- convertView.setBackgroundColor(Color.TRANSPARENT)李>
我注意到同样的东西也适用于drawer
layoutaddandroid:background=“@null”
我试过了,不起作用,谢谢这有帮助。。否则这个问题就不会引起任何注意。我花了很多努力来确保它不会重复。