PhoneGap - Android - swipe navigation in phonegap
android, cordova, html, jquery-mobile
Solution
If you are using jquery mobile then it is easy to do that because jquery support swipe,swipeleft and swiperight touch event.
swipe
A swipe event, triggered when the user swipes either vertically (20 or fewer pixels) or horizontally (30 or more pixels)
swipeleft
A left-directed swipe, triggered when the user swipes to the left 30 or more pixels
swiperight
A right-directed swipe, triggered when the user swipes to the right 30 or more pixels
use this:
<script>
$("ul").delegate("li", "swipe", function() {
// The user has swiped to the right on a list view item. Show an edit menu.
$(this).find(".menu-edit").show();
})
</script>
Problem
I'm making an phonegap app for the android platform. In this app i want swipe navigation within multiple html pages. Please tell me how i can do this. Either it is done in single html page or i've to create multiple html page for this swipe navigation. Thanks In Advance. preet