Richard Goh Active Member Licensed User Longtime User Mar 1, 2014 #1 Hi, I would like to create a switch On/Off type of button. eg. swap right to on and left to off. But don't really know how to do it. Is there any example or sample code available? Thank you.
Hi, I would like to create a switch On/Off type of button. eg. swap right to on and left to off. But don't really know how to do it. Is there any example or sample code available? Thank you.
Richard Goh Active Member Licensed User Longtime User Mar 1, 2014 #3 DonManfred said: Use a ToggleButton. Click to expand... Thanks ManFred. I found this http://www.b4x.com/android/forum/threads/custom-view-with-designer-support-java-library.28980/ But it's fixed to "O" and "l" for the display. But looking for how to change the O=ON and l=OFF with a slashed graphics . Something like attached image. Attachments images.jpg 971 bytes · Views: 479 Upvote 0
DonManfred said: Use a ToggleButton. Click to expand... Thanks ManFred. I found this http://www.b4x.com/android/forum/threads/custom-view-with-designer-support-java-library.28980/ But it's fixed to "O" and "l" for the display. But looking for how to change the O=ON and l=OFF with a slashed graphics . Something like attached image.
mangojack Well-Known Member Licensed User Longtime User Mar 1, 2014 #4 Something very basic ... 2 labels and LongClick .. food for thought anyway lol On a serious note regarding the O and | , would you not confuse users.. I thought it was "O" (Zero) for Off and "l" (One) for On ?? Attachments Toggle Button Sample.zip 7.2 KB · Views: 864 Toggle Button.PNG 2 KB · Views: 686 Upvote 0
Something very basic ... 2 labels and LongClick .. food for thought anyway lol On a serious note regarding the O and | , would you not confuse users.. I thought it was "O" (Zero) for Off and "l" (One) for On ??
Richard Goh Active Member Licensed User Longtime User Mar 1, 2014 #5 Thanks mangojack said: Something very basic ... 2 labels and LongClick .. food for thought anyway lol On a serious note regarding the O and | , would you not confuse users.. I thought it was "O" (Zero) for Off and "l" (One) for On ?? Click to expand... Hi mj. thanks. my wrong interpretation. Upvote 0
Thanks mangojack said: Something very basic ... 2 labels and LongClick .. food for thought anyway lol On a serious note regarding the O and | , would you not confuse users.. I thought it was "O" (Zero) for Off and "l" (One) for On ?? Click to expand... Hi mj. thanks. my wrong interpretation.