带有透明文字的Android按钮 [英] Android button with transparent text

查看:68
本文介绍了带有透明文字的Android按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在图像上有一个按钮.我希望此按钮具有纯色背景颜色和透明文本(以显示背面图像).是否可以使它只有透明文本?

I have a button on an image. I would like to have this button with a solid background color and transparent text (to display the back image). Is it possible to make it have only transparent text?

推荐答案

尝试将以下属性添加到您的Button中:

Try adding these attributes to your Button:

android:textColor="@android:color/transparent"
android:background="@android:color/black"

这篇关于带有透明文字的Android按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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