I'm using a navigation control in the ActionBar to provide a drop-down list. I would like to disable selection of the drop down list under certain circumstances.
My layout for the closed view of the spinner adapter has a TextView
wrapped in a LinearLayout
. The best I've come up with is overriding getView
in my spinner's adapter and making both the LinearLayout
and TextView
non-clickable and disabled. This has the effect of greying out the text but it can still be selected.
Edit I appreciate that I can hide the list but this is not what I want to do. Furthermore I have returned false in the methods which check if one or all items are enabled but this does not work.
Trying to get this working with Honeycomb on a Xoom. Thanks in advance. Peter.