3

I'm developing an Android app for reading epub books and I use WebView to display the chapter of the book. Inside the book there are internal links with an anchor. (file://some_path/some_file.html#some_hash). When the user clicks on this internal link the WebView goes to the required anchor on all phones except all Samsung devices.

Veronica
  • 39
  • 2

1 Answers1

1

Have you tried to provide some custom webviewclient, try this, it may help:

myWebView.setWebViewClient(new MyCustomWebViewClient());

... ...

public class MyCusomWebViewClient extends WebViewClient {
    public HelloWebViewClient() {}

    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }

    @Override
    public void onPageFinished(WebView view, String url) {
        super.onPageFinished(view, url);
    }
}
Sadegh
  • 2,669
  • 1
  • 23
  • 26