views:

42

answers:

2

I have a button that says "Sort" and when a user normal/short presses the button, I want a menu to appear with the various sort options. Looking around online there doesn't seem to be a straight forward answer to which route is considered best practice. I'm looking to have a menu that looks similar to this: http://farm3.static.flickr.com/2770/4439466826_d3ecfdae5c_z.jpg with icons and text.

For an example, click the Layers button in the Google Maps app. It opens a list of options on a single short click. It has a title at the top and icons for each option. (The icons aren't super crucial)

Should I use a Context Menu? If so, how do I do it without a long press. Should it be a Spinner? If so how do I change the appearance to use a button instead of the normal drop down box.

Thanks

A: 

Spinners are for stateful selection, which sounds like what you want here. The user will select one sort option from a list, and there is a concept of a "current" sort that stays visible to the user.

For something like the activity picker in your screenshot, Falmarri's suggestion of an AlertDialog is reasonable. The difference between choosing a sort and the activity picker is the "stateful selection" distinction. Spinners have a concept of a currently selected item already provided for you, dialogs are more general.

adamp