问题
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