android - 如何去除 ImageButton 的标准背景图片?

ImageButton 我想删除标准按钮背景图像。在 http://developer.android.com据说,必须定义自己的背景图像或将背景颜色设置为透明。我尝试设置黑色背景,但没有任何效果...

最佳答案

您可以将 android:background="@null" 用于您的ImageButton .

另见:
Android Developers official guide on Buttons

https://stackoverflow.com/questions/5457138/

相关文章:

android - 以编程方式设置 EditText 数字

android - FrameLayout边距不起作用

android - eclipse 不显示 Avd 管理器窗口和 android 项目

android - 在 Lollipop 崩溃前使用 android vector Drawable

android - 不同构建风格的不同应用名称?

android - 进行动态但方形布局的简单方法

android - 通过代码将 TextView 的宽度设置为 wrap_content

android - 检查设备是否有摄像头?

android - 使用 picasso 将图像大小调整为全宽和可变高度

android - 使用 Glide 库设置完成图像加载后进度条的可见性