Spinner - Selection disappears when you change the elements? Bug?

Hi team,

This might be a bug, I’m not sure. Or maybe it’s just a limitation that needs working around.

If you change the elements on a spinner, the current spinner selection is no longer shown in the spinner - even though the spinner selection stays the same. The text in the spinner box just disappears.

Is this supposed to be like this?

I’ll attach a picture and an AIA file.

Test_Spinner.aia (1.6 KB)

1 Like

Yes, some things go wrong here

1 Like

no, it runs smoothly with AI2

1 Like

Yeah I imported my app from appybuilder and I can’t get the spinner working properly at all

Not sure how to solve this

Moved this to the bugs category

Will check into this

Okay, took a look at this and its not a bug, but maybe enhancement.
The issue is that screen background color is White AND the Spinner text item is also White (below). That’s why you don’t see the selected item because you get white on white. Possibly we should update the default text color to be back

image

The “Item text colour” only refers to the colour of the items in the dropdown box and not the current selection of the spinner

Ah! I’ve just had a play around with this. When you open the app, the colour of the text uses the “spinner colour” setting, but after choosing an item, it changes to white. I can’t find a way to change the text colour of the item that you select from white (I’m trying to get my spinner colour to match button text colour in my app).

It would be great if you could have a spinner colour AND a spinner text colour independently.

Updated AIA attached.

Test_Spinner.aia (1.8 KB)

There is item text color. Set that to black

I did this but the item you select on the spinner remains white. The “item text colour” just changes the ones in the dropdown menu, not the selected one.

You have coding issue.

For spinner property, you are setting its element as follows:
image

Then in blocks editor, as soon as a selection is made, you change its values (see below). You don’t really need to change the elements. Just get rid of that block

It has nothing to do with coding, it’s a theme issue and works after build

@justxelliot try to build and use Light Theme

@Boban take a look at blocks. Don’t you see issue in the blocks?

Surprisingly the code works, on first run he would choose item2 but it will show 2 and after that the elements will stay on 1-5

The biggest issue is that themes are messed up, try building with Light Theme and Dark Theme and you would see

I mentioned this in another thread that themes are wrong, Default Theme and Dark Theme have switched some colors etc

I correct myself:
Everything is going wrong here …


Test_Spinner.aia (4.9 KB)
Test_Spinner.apk (5.0 MB)

Thanks for the replies everyone.

The issue here for me is still that the text of the selected spinner item is always showing as white. The spinner dropdown V can be set by changing the spinner colour, but there isn’t an option for “selection text colour”. The “item text colour” only changes the colour of the items in the dropdown when you click the spinner. I want to be able to make the spinner text black, like the rest of the buttons in my app.

As long as you don’t execute set elements or elements from string after first run, spinner works as it should and it is using Spinner Color for both text and the arrow
bild
bild

After you execute set elements it falls back to default theme color (white) and text size (which in my opinion is a bug as it should return black)
bild

Second bug, 2 spinners different colors, if I choose one of them then the other one inherits the color from the first one and vice versa but only on the arrow
bild
bild

Default theme Test_Spinner.apk (5.0 MB)
Light theme Test_Spinner.apk (5.0 MB)

1 Like

Yeah that’s the problem, I do change the spinner elements (if someone changes the region in the app, certain websites don’t work, so I remove/add elements from the spinner dynamically).

I could do this with multiple spinners and changing the visibility of each, but I still think this issue with the colours is something that shouldn’t be there.

Currently I’ll just keep using it with it being the wrong colour until hopefully it gets fixed. Is there a way we can add this to a bug list to be fixed at some point?

Noted. Tracked and we’ll take care of this

4 Likes