OnOffSwitch Problems

49 views
Skip to first unread message

mcw

unread,
Sep 21, 2018, 12:34:52 PM9/21/18
to CodenameOne Discussions
I decided to switch my app preferences from CheckBox to OnOffSwitch for a more current look and feel. I am running on Android, several different devices.

With the default implementation I get these ugly On Off boxes which don't look anything like the on/off implementation in modern Android versions. Any plans to update this component?

I tried setting the onOffIOSModeBool theme constant as mentioned in the developer guide. I get absolutely nothing.

Images attached.

Thanks.


default.png
iOS.png

Shai Almog

unread,
Sep 22, 2018, 12:09:58 AM9/22/18
to CodenameOne Discussions
Yes it's on our top list of components to rewrite. Feel free to file an issue as I don't think we have an open issue on that.

mcw

unread,
Sep 23, 2018, 6:05:57 PM9/23/18
to CodenameOne Discussions


I could not find an issue, so I added one here

Thomas

unread,
Sep 24, 2018, 10:45:46 PM9/24/18
to CodenameOne Discussions
I have the code for an OnOffSwitch component with a material design style by default. It is not polished yet (It is part of a larger components collection that I still regularly modify when I need a new functionnality or find a bug) but I can share the code as a starting point for your rewrite if you want to.

Shai Almog

unread,
Sep 25, 2018, 1:40:31 AM9/25/18
to CodenameOne Discussions
Thanks!
You can attach it to the issue or submit a PR so we have the log of where the code came from.

Thomas

unread,
Sep 27, 2018, 7:43:00 PM9/27/18
to CodenameOne Discussions
As I am not sure you saw it, just wanted to inform you that I attached the code to the Github issue 2 days ago.

Shai Almog

unread,
Sep 28, 2018, 12:44:28 AM9/28/18
to CodenameOne Discussions
Yes. It's assigned to Steve right now as I have a few things on my plate. He'll decide the best strategy for this.
Reply all
Reply to author
Forward
0 new messages