Correct usage of a Spinner, following material design guidelines
Asked Answered
P

2

33

After reading the new design guidelines of Google's material design, I didn't found any clear solution for designing/displaying a spinner (http://developer.android.com/design/building-blocks/spinners.html) in material design.

The nearest would be something like this: http://material-design.storage.googleapis.com/publish/v_1/quantumexternal/0Bx4BSt6jniD7anplVHR3QkdNUHc/components_menus_behavior2.png - but I'm quite sure, there will be some better solution. Especially if it comes to spinner popups. Even so, I didn't find any spinner/menu element out of the Box in Android studio - so I think this would be custom control.

The best example I found is the above linked menu which covers the functionality of an spinner element.

What would you recommend, to display such an control and being in the range of material design.

Peay answered 7/11, 2014 at 9:59 Comment(0)
O
18

A spinner will be automatically themed correctly for the Material Guidelines when your App Theme inherits from Material.Theme (or Appcompat). You can then declare and populate your spinner like described here: http://developer.android.com/guide/topics/ui/controls/spinner.html

In Android Studio you can find the Spinner in the section "Widgets" at the bottom.

Ornithic answered 24/1, 2015 at 15:42 Comment(2)
Is the one used on G+ also a spinner? Or is it just a simple button that changes its drawable on the right? Is it something else? I couldn't find about what it is.Unfortunate
The G+ spinner looks like it has bold text and, outside of the spinner, there's an ImageView whose icon is set based on the selected item of the spinner.Joyjoya
O
12

I wrote an article here:

There is No Material Design Spinner for Android

covering usage, styling, data-binding, etc. of the material design "spinner".

Obellia answered 19/2, 2020 at 17:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.