Cant untick radio button

20 views
Skip to first unread message

Gareth Murfin

unread,
Jul 19, 2018, 9:28:18 AM7/19/18
to CodenameOne Discussions
For some bizarre reason i cannot untick a radio button once ticked, is using addActionListener the proper approach ?

Gareth Murfin

unread,
Jul 19, 2018, 9:52:07 AM7/19/18
to CodenameOne Discussions
even on its own form with no logic it happens, but i realised checkbox and radiobutton are same ? so if this is a radiobutton bug i can just swap for a checkbox i guess.

Shai Almog

unread,
Jul 20, 2018, 12:43:15 AM7/20/18
to CodenameOne Discussions
You need to assign a radio button to a group. If you have one radio button in the group it can't be unselected (you need a checkbox for that). The radio button is unchecked when you select a different radio button.

Gareth Murfin

unread,
Jul 23, 2018, 7:15:26 AM7/23/18
to CodenameOne Discussions
ohhh yes how stupid of me! cheers mate.

Gareth Murfin

unread,
Jul 23, 2018, 7:38:05 AM7/23/18
to CodenameOne Discussions
works great, out of curiosity why are my radiobuttons square like checkboxes, shouldnt they be round ?

Shai Almog

unread,
Jul 24, 2018, 12:00:04 AM7/24/18
to CodenameOne Discussions
There is no concept of radio button on iOS. Usually iOS uses a tick mark for both check boxes and radio buttons or more commonly: toggle buttons.

Gareth Murfin

unread,
Aug 1, 2018, 6:56:34 PM8/1/18
to CodenameOne Discussions
still doesnt quite explain why they are not round on android. they look identical both radiobuttons and checkboxesare square, even a coder cannot tell them apart. Definitely not in swing, radios are round. 

Shai Almog

unread,
Aug 2, 2018, 1:39:42 AM8/2/18
to CodenameOne Discussions
We use the material icons by default in the blank theme. If you are using a theme make sure they aren't defined in the theme constants.
Reply all
Reply to author
Forward
0 new messages