<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
</head>
<body>
<script>
var counter = 0; // will reset each time the page loads, so you may need a WebViewString value passed by the app to set this ? !!!
var pages = 20; // for example - also could be set by WebViewString value from app
</script>
<script>
$(document).on("pagecreate","#page1",function() {
$("body").on("swipeleft",function(){
$("span").text(window.AppInventor.getWebViewString());
});
});
if ( counter !== pages ) {
counter = counter + 1;
window.AppInventor.setWebViewString(counter);
}
</script>
<script>
$(document).on("pagecreate","#page1",function() {
$("body").on("swiperight",function() {
$("span").text(window.AppInventor.getWebViewString());
});
});
if ( counter !== 0 ) {
counter = counter - 1;
window.AppInventor.setWebViewString(counter);
}
</script>
</head>
<body>
<div data-role = "page" id = "page1">
<div data-role = "header">
</div>
<div data-role = "main" class = "ui-content">
<span style = "color:orange"></span>
</div>
</div>
</body>
</html>