Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想让我的微调器像 web 表单一样下拉。我不希望选项在模态样式窗口中弹出。这可能吗?如果可以,怎么做?
您正在寻找的功能是 spinnerMode 属性,它具有“弹出”和“下拉”模式,您应该将其设置为“下拉”以获得所需的内容。只需添加
android:spinnerMode="dropdown"
到您的布局 XML 中的声明。
看起来您可以将 MODE_DROPDOWN 与微调器一起使用。
据我所知,SDK 不支持此功能,因此我想您必须编写自己的 Spinner 才能获得此功能。不过会很好:)