V
V
Vladimir2018-06-22 10:16:06
Android
Vladimir, 2018-06-22 10:16:06

Following links inside an Android app (WebView), what am I doing wrong?

Good afternoon, I'm trying to write an application for Android, I need to open files from android_asset through WebView.
I load the first page, everything is fine here, styles, js everything works.

webBrow.loadUrl("file:///android_asset/index.html");

The problem is, when you go to another page inside android_asset, the application crashes, the link to go is relative Page .
Tell me what could be the reason.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2018-06-22
@Voffkam

figured out

private class myBrow extends WebViewClient {
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);
            return true;
        }
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question