我在android中的framelayout中添加了一个innerimage.But事情是我得到一个白色的背景。我需要删除那个白色的Background.Any帮助将不胜感激.......
截图见下文
xml文件在下面给出
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="center"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:background="@null"
android:maxWidth="-5dp"
android:maxHeight="-5dp"
android:src="@drawable/driveimg"
/>
</FrameLayout>
答案 0 :(得分:2)
您可以将背景设置为null(android:background="@null"
)或使用透明色(android:background="@android:color/transparent"
)