Dave's Brain

Browse - Programming Tips - Can you set the Spinner mode in layout xml?

Date: 2018mar9
OS: Android
Language: xml

Q.  Can you set the Spinner mode in layout xml?

A.  This was added in API level 11.

<Spinner android:spinnerMode="dropdown" ... /> <Spinner android:spinnerMode="dialog" ... />
or
<Spinner style="@android:style/Widget.Spinner.DropDown" ... /> <Spinner style="@android:style/Widget.Spinner.Dialog" ... />

Add a comment

Sign in to add a comment
Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.