借鉴http://blog.csdn.net/xiangzhihong8/article/details/52125539
最近用到ScrollView中嵌套WebView,然后ScrollView可以滑动,但是Webview滑动不了,偶尔滑动上了,不流畅,就滑动一点点。解决方法:
wv.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent ev) { ((WebView)v).requestDisallowInterceptTouchEvent(true); return false; } });
本文介绍了解决ScrollView中嵌套WebView时出现的滑动冲突问题。通过设置WebView的OnTouchListener,并在其中调用requestDisallowInterceptTouchEvent方法,可以有效避免ScrollView与WebView之间的滑动干扰。

3425

被折叠的 条评论
为什么被折叠?



