如何在android studio中创建透明的png ImageView
我想让我的图像看起来透明,所以我决定把破碎的图像变成png。然后我试了一下。但它失败了 而不是这个 破损的png xml 看起来像这样 破png黑 这是我的xml如何在android studio中创建透明的png ImageView,android,imageview,transparent,Android,Imageview,Transparent,我想让我的图像看起来透明,所以我决定把破碎的图像变成png。然后我试了一下。但它失败了 而不是这个 破损的png xml 看起来像这样 破png黑 这是我的xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/broken"
android:alpha=".75">
试试这个不确定这是你想要的
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@android:color/white"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/broken"/>
</RelativeLayout>
如果不能满足您的需要,请告诉我添加白色背景的家长 e、 g
你能将png作为文件发布吗?你的主题使用黑色背景吗?很可能是因为你使用的是黑色主题。谢谢你的回答,但它不起作用。现在全黑了。我想这是因为我的黑暗主题。
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fab="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/broken"
android:alpha=".75">
<YOUR CODE>
</FrameLayout>