我有一个webview,它是scrollView的子视图。
我发现如果你滚动webview,滚动视图也会在Android中同时滚动,所以我想设置" scrollingEnabled" scrollView as" fasle"当我开始触摸滚动视图然后将其设置为" true"当我的触摸结束时。
但我发现' touchend'滚动时不会触发事件。
希望有人能帮助我解决这个问题,谢谢。
if(OS_ANDROID){
$.webview.addEventListener('touchstart', function(){
Ti.API.info("webview touchstart");
$.s_1.scrollingEnabled = false;
});
$.webview.addEventListener('touchend', function(){
Ti.API.info("webview touchend");
$.s_1.scrollingEnabled = true;
});
$.webview.addEventListener('touchcancel', function(){
Ti.API.info("webview touchcancel");
$.s_1.scrollingEnabled = true;
});
}