你可以自己设置focus变化并弹出出入框 void onFocusChange(View v, boolean hasFocus) { isFocus = hasFocus; (new Handler()).postDelayed(new Runnable() { public void run() { InputMethodManager imm = (InputMethodManager) editText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if(isFocus) { imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS); } else { imm.hideSoftInputFromWindow(editText.getWindowToken(),0); } } }, 500); } 延迟500ms弹出输入框,没有延迟的话输入框无法弹出 |
|
来自: dmw_zgl > 《EditText》