单选平按钮? [英] RadioButton as flat button?

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

问题描述

有没有一种办法风格单选按钮为平面按钮?我有四个选项:

Is there a way to style a RadioButton as a flat button? I have four options:

| btn1 | btn2 | btn3 | btn4 |

而不必紧挨着的小收音机圆

,我想显示每个作为只是一个普通的平板按钮。这是可能的,而无需提请他们自己?

instead of having the little radio circle next to each, I'd like to show each as just a plain flat button. Is that possible without having to draw them myself?

感谢

推荐答案

是的,它是可能的。

在XML集, 安卓按钮=@空

而如果你要动态地做到这一点, setButtonDrawable(新StateListDrawable());

And in case you want to do it dynamically, setButtonDrawable(new StateListDrawable());

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

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