Android: OnClickEvent on disabled Spinner
I have a disabled Spinner and want it to enable and open the selection menu when I touch/click it -开发者_开发百科 is there any way to do this?
I thought about an invisible overlay of some kind so I could catch OnClickEvents, but I don't know if Android supports this.
Regards, jellyfish
Edit: It's pretty much similar to this, but I encountered some difficulties when the selection of one Spinner already shows what the user wants. (see comments)
You might want to take a step back and rethink your strategy. I get what you're trying to do and I can appreciate minimizing the number of user interactions to get the desired result. If you're populating Spinner1 with some value be it the default or from a user saved state then you should consider populating Spinner2 and Spinner3 based on those same assumptions.
You can also leave the Spinner2 active, but empty until it is clicked. It can read the state of Spinner1 to populate itself when it's needed.
Another thing you could do is present Spinner1 with a default or user value. Leave Spinner2 active, but populate it on click and Spinner3 is not activated until Spinner2 has a selection.
All just suggestions. Sometimes fresh ideas help.
No matter what you decide it will have to be intuitive to the user. Good luck!
精彩评论