I’ve had a look at the documentation, but I’m not sure what would be the best way to approach this.
This is what I’m doing:
mActionBar = getActionBar();
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
SpinnerAdapter mSpinnerAdapter = ArrayAdapter.createFromResource(this,
R.array.platform_list,
android.R.layout.simple_spinner_dropdown_item);
What I’m trying to do is give the dropdown list a default value – “Please Select a Type”, when the application loads up and nothing is selected yet. This is because the selection will trigger a change in the listview fragment displayed below, and without a selection (at startup) i would like to display a simple placeholder image or something.
Any ideas? Thanks a lot in advance!
You can set the selection of the Spinner to a particular position which can display this text
http://developer.android.com/reference/android/widget/AbsSpinner.html#setSelection(int)