No

When my elements contain English and / or numeric characters, it shows the radio selection next to the element, but when it does not contain any English and / or numeric characters (contains only Hebrew in my example), it does not show the radio of choice next to the item.

To create adapters (array adapter) I used the layout "android.R.layout.simple_spinner_item"

And before installing the Spinner adapter I did

adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); 

The solution I found now sets the layout for "simple_dropdown_item_1line"; this solves the problem without showing the radio button.

Any ideas on how to always see the radio button?


Correction

- the solution does not work. for a few of my spinners, it shows white text on a white background.

+4
source share
2 answers

Hi, below code works for me in Hebrew

For the adapter, use android.R.layout.simple_spinner_item

and myAdapter.setDropDownViewResource(android.R.layout.select_dialog_singlechoice);

Regards, Yaron

+7
source

Any ideas on how to always see the radio button?

Use the appropriate layout for the drop-down view resource. android.R.layout.simple_spinner_dropdown_item should always work. If you create your own layout and it doesn’t work, indicate where you changed things from android.R.layout.simple_spinner_dropdown_item that will affect the questions (e.g. text color, background color).

0
source

All Articles