If I have 2 spinners and one is open, if I try to open the other it doesn't open on first click. Is there a way to fix that?

77 views Asked by At

I have few spinners in a Linearlayout. When I click first one to open it, I'd like to be able to click another one and have that click close the first one and open the second one.

But that's not what happens now. I have to click the second one twice to get it to open.

I've tried googling but couldn't find anything relevant. Here is the below image reference

enter image description here

2

There are 2 answers

0
Davit Hovhannisyan On

It is hard to answer your question without specific code snippets, but I will suggest you check whether you have implemented the click listeners for your spinners correctly, and when a spinner is clicked, it should toggle its open/close state.

2
V-master On

you can't have two spinners open at the same time. First time you click you are selecting/dismissing opened spinner, and only then you are able to open next one.

It is standard Android platform behavior.