Android监听键盘事件

版权声明:转载注明出处,谢谢合作。 https://blog.csdn.net/mr_dsw/article/details/80132587

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;
}
});

猜你喜欢

转载自blog.csdn.net/Mr_dsw/article/details/80132587