When defining a spinner in code, you can set the mode to 'dialog' or 'dropdown':
Spinner(Context context, int mode) Construct a new spinner with the given context's theme and the supplied mode of displaying choices.
But I can't find this option when defining my layout in XML. Did I just miss it, or is this not possible in XML?
As of API level 11, you can use
<Spinner style="@android:style/Widget.Spinner.DropDown" ... />
or
<Spinner android:spinnerMode="dropdown" ... />
No, according to the reference found here this is not possible. There is no corresponding XML attribute listed. Like other things as setting 24h mode for a timepicker, which is not possible in XML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With