使按钮的背景透明 [英] Make a Button's background transparent
问题描述
我对Android Studio和创建应用程序非常陌生.我创建了一个图像按钮并上传了一个图像,问题是我想使按钮的背景透明.这就是我的意思:
单击小图标图像(位于ic_android_black_24dp下方)
搜索任何图标,然后将其添加到您的可绘制对象中.您正在使用的图标出现在搜索结果中.使用此列表图标.
I am very new to Android Studio and creating apps in general. I have created an Image Button and uploaded an Image, problem is that I want to make the background of the Button transparent. This is what I mean:See Example
The background of the left button is black and I want to make it transparent, like the Right Button.
Just put this property inside ImageButton
tag:
android:background="@android:color/transparent"
----------OR--------------
You can also user vector image for this:
Click on Vector Asset
Click on small icon image(just below ic_android_black_24dp)
Search any icon and add to your drawable. The icon you are using is appeared in search result. use this list icon.
这篇关于使按钮的背景透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!