android5.0程序开发之RadioButton控件

2024-10-15 15:59:11

1、启动eclipse程序,新建一android5.0工程文件RadioButtonDemo。

android5.0程序开发之RadioButton控件

3、在activity_main.xml文件中加入一个TextView控件、一个Rad坡纠课柩ioGroup组件和两个RadioButton控件。

android5.0程序开发之RadioButton控件

5、在程序中加入文本控件和两个RadioButton控件的引用代码。

android5.0程序开发之RadioButton控件

7、运行程序,分别点击RadioButton1和RadioButton2,可见如下效果:

android5.0程序开发之RadioButton控件
猜你喜欢