简体   繁体   English

Android在pre ICS中使用switch选项

[英]Android using of switch option in pre ICS

I have a question in form which asks the user 我有一个询问用户的问题

Will you attend event? 你会参加活动吗?

with the options of 有选项

Yes/No 是/否

I am using Switch widget for android 4.0 and above,which is the best way for pre 4.0 versions. 我正在使用用于Android 4.0及更高版本的Switch小部件,这是4.0之前版本的最佳方式。

在此输入图像描述

There can be Multiple Options 可以有多个选项

  1. ToggleButton 切换按钮
  2. 2 RadioButton as @Ascorbin suggested 2 RadioButton为@Ascorbin建议
  3. A single CheckBox 单个CheckBox

The best thing is dependant on your design 最好的事情取决于您的设计

使用2个单选按钮, 本教程几乎涵盖了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM