问题:WebView加载html,输入框无法输入英文或者数字
解决方法:
// 解决输入框不能输入的bug
webView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_UP:
v.requestFocusFromTouch();
break;
case MotionEvent.ACTION_MOVE:
break;
case MotionEvent.ACTION_CANCEL:
break;
}
return false;
}
});