android ImageView不显示透明度
问题描述:
我得到一个png图像作为透明颜色,我想在一个ImageView中使用一个白色的android应用程序。 You can check that the image has a transparency colorandroid ImageView不显示透明度
我添加图片到每个文件夹(可拉伸-MDPI,抽拉-LDPI ..) 和链接与所述图像的ImageView的。 而不是获得透明度的颜色,我得到了一个白色的如下所示 The result 蓝色屏幕是一个带背景的RelativeLayout。 这里的XML代码:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/barre_puissance"
android:layout_toRightOf="@+id/barre_angle"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:background="@drawable/bg_mr">
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_mr_projectile"
android:layout_centerInParent="true"
/>
</RelativeLayout>
图片右下角有一个黄色警示三角形。那来自哪里? –
它说“图像上缺少contentDescription属性” – Mouley
我的意思是,你的布局中有什么可绘制的三角形? –