1

I want to create a toggle button with 3 options. I don't want to use radio button or check box.

I want to create like this....

toggle button

How to create this...?

Thanks in advance...!

Noby
  • 6,562
  • 9
  • 40
  • 63
  • You can use RadioButton. It is duplicate to http://stackoverflow.com/questions/3576507/is-it-possible-to-change-the-radio-button-icon-in-an-android-radio-button-group – logcat Sep 23 '11 at 15:01

1 Answers1

2

Create the artwork for the left/middle/right buttons and create three separate buttons next to each other in a horizontal linear layout

Then in code get all three references to the buttons. When a button is clicked set a boolean e.g _button1Clicked = true (or use an array?) and set the image to a downstate, check the other buttons, set their images to upstate and reset their booleans to false!

Easy!

Micky
  • 514
  • 3
  • 19