如何设置EditText来显示键盘的搜索按钮或是输入按钮
展开全部
editText.setOnEditorActionListener(new TextView.OnEditorActionListener()
{ @Override public boolean onEditorAction(TextView v, int actionId,
KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_SEARCH) {
performSearch(); return true; } return false; }});
{ @Override public boolean onEditorAction(TextView v, int actionId,
KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_SEARCH) {
performSearch(); return true; } return false; }});
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询