如何有一个透明的ImageButton:安卓有一个、透明、ImageButton

2023-09-12 03:47:20 作者:萌哒哒的小二货°

<ImageButton android:id="@+id/previous"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/media_skip_backward"
android:background="@drawable/transparent"></ImageButton>

这就是我试图得到一个透明的ImageButton,以便放置在一个SurfaceView这些按钮。但是Eclipse的,只要我包括XML的透明线让我在项目中的错误。

This is what I tried to get a transparent ImageButton so as to place those buttons on a SurfaceView. But Eclipse, gives me an error in the project as soon as I include the transparent line in xml.

请帮忙。

推荐答案

尝试使用空的背景...

Try using null for the background ...

android:background="@null"