ICS has a Switch component. It does what we need. Is there anything out there backward compatible to (about) 2.2? Couldn’t find anything obvious.
Looks like somebody built this:
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Switch is only on 4.0+
If you want to make an app that uses switch on 4.0+ devices what you need to do is declare two layouts. The first in layout-v14 which will be what’s used on ICS devices. In your layout folder make use of CheckBox.
In your code make use of the CompoundButton class when getting/setting data from the switch or checkbox. You’ll find that CompoundButton works well for this.