Android Searchable Dropdown微调器? [英] Android Searchable Dropdown spinner?

查看:93
本文介绍了Android Searchable Dropdown微调器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有249个条目的一些数据(国家列表).我想强迫用户选择这些选项之一.

I have some data (list of countries) with 249 entries. I want to force the user to choose one of these options.

通常,我会使用微调器,但是我觉得249个条目太多了,无法滚动浏览,特别是对于手机较小的人.

Usually I would use a spinner, however I feel like 249 entries would be too many to scroll through, particularly for people with smaller phones.

无论如何,android中都存在以下两种情况之一:
a)可搜索的下拉微调框(因此通常会显示所选内容的面板可用于输入搜索字词)
b)AutoCompleteTextView强制用户从自动完成"建议中选择选项之一.

Is there anyway in android to have either:
a) a dropdown spinner that is searchable (so the panel where the chosen selection is usually displayed can be used to enter a search term)
b) an AutoCompleteTextView that forces the user to select one of the options from the AutoComplete suggestions.

谢谢.

推荐答案

从Android 3.0开始,将SearchView小部件用作操作栏中的一项是在应用中提供搜索的首选方式.

Beginning in Android 3.0, using the SearchView widget as an item in the action bar is the preferred way to provide search in your app.

http://developer.android.com/training/search/setup.html

这篇关于Android Searchable Dropdown微调器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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