`

关于 radioButton和 checkBox 的样式

 
阅读更多
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="true" android:state_checked="true" android:drawable="@drawable/check" /> <item android:state_enabled="true" android:state_checked="false" android:drawable="@drawable/checknull" /> </selector>


check和checknull分别为选中和位选中的图片。


然后在你的布局文件中,RadioButton 布局
android:button 

设置android:button = "@drawable/radiobutton",就可以了!

 

 

不是 background

 

分享到:
评论

相关推荐

    RadioButton和CheckBox自定义样式

    Android自定义RadioButton和CheckBox样式,重写RadioButton的onDraw()方法,实现颜色选择器效果。

    自定义RadioButton&CheckBox样式的实现

    NULL 博文链接:https://gundumw100.iteye.com/blog/1025176

    android spinner 样式完全自定义[包括RadioButton和RatingBar效果自定义]

    最近抽了点时间,针对android一些控件的样式做了完整自定义,主要包括Spinner的样式完全自定义、RadioButton[CheckBox样式雷同]样式完全自定义、Rating样式自定义,代码已经经过测试,有需要的可以下载

    仿美团支付自定义radiobutton

    仿美团支付自定义radiobutton。样式可以自己修改。 仿美团支付自定义radiobutton。样式可以自己修改。 仿美团支付自定义radiobutton。样式可以自己修改。

    WPF控件主题样式,含21种不同风格漂亮主题

    WPF控件主题资源,包括TabControl、ListBox、ComboBox、Button、ToggleButton、RadioButton、CheckBox、Slider、ProgressBar、TreeView等多个控件的样式。

    WPF控件主题样式,含21种不同风格漂亮主题(2021修正版)

    WPF控件主题资源,包括TabControl、ListBox、ComboBox、Button、ToggleButton、RadioButton、CheckBox、Slider、ProgressBar、TreeView等多个控件的样式。 有样式图片,参见 ...

    一套蓝色的siverlight控件样式

    一套蓝色的siverlight控件样式包括button,textbox,ComboBox,RadioButton,-CheckBox等11个控件样式

    WPF Themes 主体风格 样式

    WCF的主体资源,整理了很多风格 项目描述: WPF Themes 是应用在WPF项目中的免费主题。...-RadioButton -CheckBox -TextBox -ComboBox -ListBox -ProgressBar -Slider -TreeView -Expander

    themetest:Android应用程式,可比较各种Android主题

    主题测试应用用于比较各种Android主题的Android应用。 它显示了具有不同主题的最常见的android... 例如,RadioButton和CheckBox具有材质样式,而SeekBar和ProgressBar使用Holo样式。 同样,按钮上的波纹效果不适用于App

    pixate.jar

    让我们使用css的形式来控制Android的控件的样式,支持的控件有View (generic attributes support for all views) ImageView TextView CheckedTextView Button CompoundButton ImageButton ToggleButton RadioButton ...

    云应用开发 ——Google App Engine & Google Web Toolkit入门指南

    10.2.15欢迎界面和样式文件修改 10.2.16总结 10.3 高级例子——号码管家(GAE+GWT+Android) 10.3.1样子与功能 10.3.2创建项目 10.3.4规定通讯协议 10.3.5实现服务端的功能 10.3.6注册提供服务 10.3.7帮助...

    MaterialSkin-master.7z

    Winform皮肤控件,包含TabControl、Button、Switch、FloatingActionButton、Checkbox、RadioButton、TextBox、ListView、ProgressBar、Card等控件,样式漂亮,拜托Winform开发界面美化烦恼。

    Android实例代码

    RadioButton、CheckBox; ToggleButton;AnalogClock、DigitalClock; ImageView; 2.4、高级界面组件:AutoCompleteTextView; Spinner; DatePicker、TimePicker; ProgressBar; SeekBar; RatingBar; TabHost; ...

    asp.net专家疑难解答200问源码

    54.如何使用CheckBox和CheckBoxList控件(CheckBoxList示例) 55.如何使用RadioButton和RadioButtonList控件(RadioButton示例) 55.如何使用RadioButton和RadioButtonList控件RadioButtonList示例) 56.如何使用Panel...

    PixateViewsDemo.zip

    让我们使用css的形式来控制Android的控件的样式,支持的控件有 1. View (generic attributes support for all views) 2. ImageView 3. TextView 4. CheckedTextView 5. Button 6. CompoundButton 7. ...

    疯狂Android讲义(第2版)源代码 第6章~第9章

    RadioButton、CheckBox; ToggleButton;AnalogClock、DigitalClock; ImageView; 2.4、高级界面组件:AutoCompleteTextView; Spinner; DatePicker、TimePicker; ProgressBar; SeekBar; RatingBar; TabHost; ...

    AndroidCheckableButton:各种样式的Android按钮

    行为类似于RadioButton的按钮和行为类似于RadioGroup布局将很快添加。 :) 演示版 用法 CheckableButton的用法与Button完全相同,但是为了获得演示的UI,您需要做更多的工作。 在默认和选定状态下为边框创建两个...

    asp.net专家疑难解答200问

    如何使用CheckBox和CheckBoxList控件(CheckBoxList示例) 55.如何使用RadioButton和RadioButtonList控件(RadioButton示例) 55.如何使用RadioButton和RadioButtonList控件RadioButtonList示例) 56.如何...

Global site tag (gtag.js) - Google Analytics