Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 用于筛选适配器的快速搜索框_Android_Search_Filter - Fatal编程技术网

Android 用于筛选适配器的快速搜索框

Android 用于筛选适配器的快速搜索框,android,search,filter,Android,Search,Filter,现在我有一个列表活动,由游标适配器提供动力。 我有一个AutoCompleteTextView,允许用户过滤列表。 代码如下所示: filterText = (AutoCompleteTextView) findViewById(R.id.search_box); filterText.setAdapter(mAdapter); filterText.setDropDownHeight(0); // hide the drop down, just filter the listActivity

现在我有一个列表活动,由游标适配器提供动力。 我有一个AutoCompleteTextView,允许用户过滤列表。 代码如下所示:

filterText = (AutoCompleteTextView) findViewById(R.id.search_box);
filterText.setAdapter(mAdapter);
filterText.setDropDownHeight(0); // hide the drop down, just filter the listActivity
filterText.setThreshold(1);
它工作得很好。我想切换到快速搜索框,这样我就不会占用太多屏幕空间,我觉得快速搜索框更符合用户界面标准。
问题是快速搜索框并不能很好地过滤列表。它不会在键入的每封信上都广播意图(仅当您单击“搜索”按钮时)。有没有关于如何在某个地方执行此操作的好教程?

我决定继续使用筛选文本,现在担心快速搜索框。
android:windowSoftInputMode=“stateHidden”
在做出决定时非常有帮助