There are two ways you can use spinner:
static way
android:spinnerMode="dialog"
and then set:
android:prompt="@string/hint_resource"
dynamic way
spinner.setPrompt("Gender");
Note: It will work like a Hint but not actually it is.
May it help!