我有这个代码:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
MenuItem searchItem = menu.findItem(R.id.action_search);
SearchView searchView = (SearchView) MenuItemCompat
.getActionView(searchItem);
searchView.setQueryHint("Search");
searchView.setOnQueryTextListener(this);
return true;
}
它有搜索视图。为了打开那个 SearchView,应该点击循环图标。如何让它在启动时自动打开?