遵循材料设计指南正确使用 Spinner [英] Correct usage of a Spinner, following material design guidelines

查看:37
本文介绍了遵循材料设计指南正确使用 Spinner的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在阅读了谷歌材料设计的新设计指南后,我没有找到任何明确的设计/显示微调器的解决方案(http://developer.android.com/design/building-blocks/spinners.html) 在材料设计中.

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.

最近的应该是这样的:http://material-design.storage.googleapis.com/publish/v_1/quantumexternal/0Bx4BSt6jniD7anplVHR3QkdNUHc/components_menus_behavior2.png - 但我很确定,会有一些更好的解决方案.特别是如果涉及到微调弹出窗口.即便如此,我没有在 Android Studio 中找到任何开箱即用的微调器/菜单元素 - 所以我认为这将是自定义控件.

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.

推荐答案

当您的 App 主题从 Material.Theme(或 Appcompat)继承时,Spinner 将自动为 Material Guidelines 正确主题.然后你可以像这里描述的那样声明和填充你的微调器:http://developer.android.com/指南/主题/ui/controls/spinner.html

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

在 Android Studio 中,您可以在底部的小部件"部分找到 Spinner.

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

这篇关于遵循材料设计指南正确使用 Spinner的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆