Equal to the "hint" option in Edittext, I need a default text in a Spinner. So far, I used the "prompt" to a string value, the text appears as a heading of the popping up dialogue, but not as a default one. her is the spinner in the xml:
<Spinner
android:id="@+id/..."
style="@style/spinner"
android:background="@drawable/..."
android:spinnerMode="dialog"
android:prompt="@string/..."/>
And in the .java:
Spinner categories = (Spinner) findViewById(R.id.spinnerCategories);
categories.setOnItemSelectedListener(this);
List<String> categoriesList = new ArrayList<String>();
categoriesList.add("....");
ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, categoriesList);
categories.setAdapter(dataAdapter);
dataAdapter.setDropDownViewResource
(android.R.layout.simple_spinner_dropdown_item);
categories.setPrompt("TEXT");