android EditText 对于焦点获取和失去 事件,和web不一样,所以处理起来也就不一样了
解决方法:
将EditText的包裹容器(LinearLayout等布局)的setOnTouchListener事件
loutSoft.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { loutSoft.setFocusable(true); loutSoft.setFocusableInTouchMode(true); loutSoft.requestFocus(); return false; } });