Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
428 views
in Technique[技术] by (71.8m points)

android - Correct usage of a Spinner, following material design guidelines

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...