标签:
按照惯例,先获取控件,再加监听。。。
1 searchView = (SearchView) view3.findViewById(R.id.search); 2 searchView.setOnQueryTextListener(new OnQueryTextListener() { 3 4 @Override 5 public boolean onQueryTextSubmit(String query) { 6 Log.d("MainActivity", "onQueryTextSubmit(), query=" + query); 7 8 return false; 9 } 10 11 @Override 12 public boolean onQueryTextChange(String newText) { 13 Log.d("MainActivity", "onQueryTextChange(), newText=" + newText); 14 return false; 15 } 16 17 });
标签:
原文地址:http://www.cnblogs.com/fashare/p/4504575.html