Possible Duplicate:
Android: How to create slide (on/off) button
I want to create sliding button in my Android application such that it will look like the following:
How can I do that?
Possible Duplicate:
Android: How to create slide (on/off) button
I want to create sliding button in my Android application such that it will look like the following:
How can I do that?
Use ToggleButton for creating this sliding button
see this tutorial for Creating Custom ToggleButton in Android
Sexily Styled Toggle Buttons for Android (archive.org mirror)
EDIT : if you are using Android API LEVEL 14 or above then you can also use Switch Widget for creating sliding button see this example :