PhoenGap app not detecting swipe

 ̄綄美尐妖づ 提交于 2019-12-11 19:34:38

问题


I have a PhoneGap 2.9 app running on Android 4.4 and it takes several tries to detect a swipe event from jQuery Mobile (v.1.10). This same code runs beautifully on Android 4.3.
I have tried changing the values for

$.event.special.swipe.durationThreshold
$.event.special.swipe.horizontalDistanceThreshold

but these do not seem to help at all. Any suggestions?

Below is how I am hooking up the swipe event:

$(document).on("swipe", '.collapsed', function (e) {
 // do something
});

回答1:


Set the target SDK to 18 instead of 19 to force the new webview in kitkat to operate in compatibility mode.



来源:https://stackoverflow.com/questions/22048007/phoengap-app-not-detecting-swipe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!