RadioButtons not working as expected - default selection error

Let me search for the "Designer palette" - I don't know what this is... give me a second to find please.

image

Shall I set the intervall to 200 here?

Snap8

The Properties Palette.

If the Radio button settings still do not work, increase the time interval in the Blocks. It is set to 200, increase it to 400.

No - only set the value in the Blocks :upside_down_face:

Chris,

I can now "see" the 400ms delay when the "Realys" screen is opening.

Still, at the first screen opening, the radio buttons are odd.

I should maybe make my own radio buttons with a set of checkboxes; I think I should be able to achieve this.

I'll give it a last try by removing the RadioButton2 just to see if the RadioButton1 works.

Anyway, thank you very much for helping me :+1:

Okay, doesn't work either.

When I open the Relay screen for the first time with only 1 radio button (..containing 3 choices..), the default one is correct BUT when I select another one, the default one stays selected too meanig I have 2 choices active at the same time.

Weird...

PS: How could I share my code to allow someone else to try it too?

To make your own "radio" buttons with checkboxes, see here

https://gallery.appinventor.mit.edu/?galleryid=8e013d34-93e3-4eb8-a5b8-73434f9b349d

I'll give it a try tomorrow.

Thanks a lot to All :slightly_smiling_face:

List Pickers make easy radio buttons, no extensions needed.

If you like buttons, here is a general purpose setup you can use ...

radio_buttons.aia (3.5 KB) sample run

Dictionaries and Generic events make this customizable per your taste.

This, IMHO, is less complicated (from my gallery link):

4 Likes

Hi Roger

It seems as though the Radio Buttons extension has a fault - can you identify which extension you have? The extension developer should take a look at the issue.

When you are testing the App, what are you using? The Emulator on your PC or the Companion on your phone?

Hello Chris,

I really trust what I see on my phone so I always "build" an apk to install on the mobile (I have currently a HUAWEI P20) :wink:

Is there a way to identify the extension I use? Any version or info about it to find somewhere?

image
...doesn't help that much I guess.

Thanks a lot TIMAI2 and ABG for your examples :+1: :+1: :+1:

You will no longer find support for this extension. Appy Builder doesn't exist anymore.

Where did you find the extension?

Maybe on @Taifun's Extension Directory

Yes - looks like it's the only Radio Buttons extension and it was defined with the Appybuilder platform by Hossein Amerkashi himself. It's also looking out of date.

Hi Roger

Just noticed something in your Radio Buttons Blocks - which I think may not be correct. Both Radio 1 and Radio 2 are set to 'Checked'. The principle of Radio Buttons, however many there are, is that only one of them can be 'on'. If you need an option gadget that permits more than one to be 'on', that's what Check Buttons are for. I have not seen the extension in action so I don't know if it has both types of options.

...well in fact I misunderstood the logic of the Blocks from your example - I have now installed the extension and tested it here. You can in fact trip-up a single set of Radio Buttons just by picking too fast:

Snap9

Also, I think it's a pity that the buttons have a fixed colour - if it has to be a fixed colour for Android reasons that pale blueish-green would not have been my choice :slightly_smiling_face:

What I have found though is that everything works if the "SetSelected" Blocks are not used.

RadioBtns.aia (12.5 KB)

I think it is probably safer to simply DIY your own Radio Buttons using Standard App Inventor Components:

  1. Reliability
  2. You can use your own Radio images, so not bound by any restrictions in terms of size, shape or colour.

Free code snippet download on my site:
https://www.professorcad.co.uk/appinventorsnippets#DiyRadioBtns
Movie:
https://www.professorcad.co.uk/appinventorcomponents#ComponentsRadio