I'm trying to get a Spinner to load up with no selected value. Once the user selects a value it then takes them to another page.
This is proving to be a problem because at present, the page just loads straight away before the user gets a choice to choose.
My spinner class is set up the same way as Google's: http://developer.android.com/resources/tutorials/views/hello-spinner.html
So basically, is it possible have a spinner that loads with nothing selected because at present, it loads the first item in my string array.
is it possible have a spinner that loads with nothing selected
Only if there is no data. If you have 1+ items in the
Spinner will always have a selection.
Spinners are not designed to be command widgets. Users will not expect a selection in a
Spinner to start an activity. Please consider using something else, like a
GridView, instead of a
BTW, I forgot to mention -- you can always put an extra entry in your adapter that represents "no selection", and make it the initial selected item in the
Alternatively, you could override your spinner adapter, and provide an empty view for position 0 in your getView method, and a view with 0dp height in the
This way, you have an initial text such as "Select an Option..." that shows up when the spinner is first loaded, but it is not an option for the user to choose (technically it is, but because the height is 0, they can't see it).