Code This

std::cout <<me.ramble() <<std::endl;

Archive for the ‘MultiSelectSpinner’ Category

A Spinner Control For Android With Multi-Select Support

with 21 comments

I recently had a feature request for Checkout Tracker to allow the user to select multiple order states and multiple items when filtering the order list. I thought to myself, no problem, I can probably bang that out in a half hour or less, right? All I need is to do is add support for multiple states & items in the filter restrictions, and turn on a setting that allows the user to select multiple items in the Spinner controls used in the interface. Wrong. The Android Spinner control does not support multiple selection. This seems like a fairly obvious, and fairly common, use case. Unfortunately many such use cases are not covered currently by the Android libraries. Such is the curse of working with a young framework. No matter, I set out to create my own version of this control.

This took me about a day, after which I was able to bang out the feature request in under a half hour. Here are some screens:


I have made this control available for all the world to use, on github. Hopefully I have saved you a day’s worth of work.

Feel free to leave feedback about the API or functionality, or request changes.

Written by Kris Wong

June 17, 2012 at 11:49 am