如何有一个透明的ImageButton:安卓 [英] How to have a transparent ImageButton: Android

查看:101
本文介绍了如何有一个透明的ImageButton:安卓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<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"

这篇关于如何有一个透明的ImageButton:安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆