How to enable fast scroll (thumb) in Android Spinner's drop-down menu?
In an application I have a Spi开发者_JAVA百科nner that has tens of items.
When the user taps on the spinner, a popup dialog appears that shows the list of possible selections. However, since there are (sorted) tens of items, I want the user to be able to use the fast-scroll thumb (like fastScrollEnabled
attribute on ListView), similar to the one enabled in Contacts application.
I tried to get the ListView that is used in that popup dialog, but I didn't find any methods to do that.
It's bad UI design having a spinner lots of items. When you reach in design the point that you need fast scroll or filter on a Spinner, you need to consider creating a separate pick item activity and put all the records in a ListView, and there you can have also the fast scroll and also the filter implemented easily.
Also you need to consider if you have a lot of items, to provide different orders. The recommended way is to put the most recent items in the beginning, maybe categorize it too, and then you can use expandable listview to enhance more the pick item process per category.
精彩评论