改变键盘上的回车变为搜索按钮
有的事一个放大镜有的会显示成搜索两个字
etSearch.setImeOptions(EditorInfo.IME_ACTION_SEARCH);//设置搜索属性
//监听按下的操作
etSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId==EditorInfo.IME_ACTION_SEARCH){
if (TextUtils.isEmpty(v.getText().toString())){
UITipDialog.showFall(ExhibitionCenterActivity.this,”请输入要搜索内容”);
return true;
}
mRefreshHelper.onDefaluteMRefresh(true);
}
return true;
}
});