我希望在点击包含以前搜索列表的搜索视图下方显示下拉列表
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getSupportMenuInflater().inflate(R.menu.categories, menu);
// Get the SearchView and set the searchable configuration
SearchView searchView = (SearchView) menu.findItem(R.id.menu_search)
.getActionView();
searchView.setQueryHint("Search All Categories");
final AppListAdapter adapterAllApps = new AppListAdapter(
CategoryListActivity.this, R.layout.app_row, catList);
searchView.setOnQueryTextListener(new OnQueryTextListener() {
@Override
public boolean onQueryTextChange(String newText) {
....
答案 0 :(得分:0)
您可能想要使用
AutoCompleteTextView
执行此操作,然后添加可搜索的内容提供商。
看看这个:
Turn AutoCompleteTextView into a SearchView in ActionBar instead