返回 登录
0

Android监听键盘事件

阅读1712

et_search.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_SEARCH){
isSearch = true;
page = 1;
MyUtils.hideSoftKeyboard(EnterShopActivity.this,v);
getData();
return true;
}
return false;
}
});

评论