1.在webview的父布局中设置android:focusable="true"  android:focusableInTouchMode="true"属性。

2.监听webview的ontouch事件:

web.setOnTouchListener(new OnTouchListener() {@Overridepublic boolean onTouch(View v, MotionEvent event) {// TODO Auto-generated method stubint action = event.getAction();switch (action) {case MotionEvent.ACTION_MOVE:v.setFocusable(false);v.setFocusableInTouchMode(false);break;case MotionEvent.ACTION_UP:v.setFocusable(true);v.setFocusableInTouchMode(true);break;default:break;}return false;}});


更多相关文章

  1. Android(安卓)M新控件知识整理
  2. Android(安卓)中与 Touch 事件详解
  3. Android(安卓)属性动画备忘 nineold
  4. android:documentLaunchMode
  5. Android(安卓)多点触控屏蔽
  6. Android(安卓)Studio 配置应用自动签名
  7. android fragment show hide回调
  8. android scrollview的所有touchevent的顺序
  9. Android优秀开源库1000+,你值得拥有

随机推荐

  1. 在Windows下搭建Android开发环境
  2. Android(安卓)高通代码预制apk可卸载,恢复
  3. Android(安卓)timer
  4. listView 中relativeLayout 布局的 andro
  5. Android(安卓)Activity 切屏处理
  6. android五种布局模式
  7. 【Android学习笔记】AutoCompleteTextVie
  8. android通过httpClient请求获取JSON数据
  9. Android(安卓)Studio的.gitignore以及git
  10. 如何在Android平板电脑POWER按钮菜单中添