Reputation: 1329
I'm trying to figure out how to set up a WebView that displays a defined array of local HTML pages using Android's WebView. I also want to be able to swipe between each page in the array using a flick left or right. Any thoughts on how to implement this?
The code below should give you an idea of what I'm going for:
private class HelloWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("file:///Android_Assets/HTML/page1.html, file:///Android_Assets/HTML/page2.html, file:///Android_Assets/HTML/page3.html");
view.loadUrl(url);
return true;
}
}
Upvotes: 1
Views: 2227