Code example for SearchView

0
    @Override 
    public boolean onCreateOptionsMenu(Menu menu) {
    	MenuItem searchItem = menu.add("Search");
    	searchItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
    	searchItem.setIcon(android.R.drawable.ic_menu_search);
    	SearchView search = new SearchView(this);
    	searchItem.setActionView(search);
    	 
    	return true; 
    } 
     
    @Override 
    public boolean onOptionsItemSelected(MenuItem item) {
    	return true; 
    } 
     
    private TabSpec newTab(String tag) {
    	 
    	TabSpec spec = tabhost.newTabSpec(tag);
    	Intent intent = null;
    	if(tag=="Teams")