I have a main page (main.html) in the assets folder that I am displaying with:
webview.setWebChromeClient(new MyWebChromeClient());
webview.getSettings().setJavaScriptEnabled(true);
webview.addJavascriptInterface(new VersionCallbackScript(), "demo");
webview.loadUrl("file:///android_asset/main.html");
and I want to put a link in the document to another html file in assets folder. When I similiarly put in the tag:
<a href="file:///android_asset/secondpage.html">Touch here for page 2</a></font></h4>
and touch it in the client, the screen loads a blank page.
likewise, I want to have a table of contents that isA ListView and uses loadUrl with an html page suffixed with an anchor. I tried and it is not working
String anchor = "subsection1";
webview.loadUrl("file:///android_asset/main.html" + "#" + anchor);
this construct is not working either.