C
C
Chesterfield252021-12-23 00:07:29
Java
Chesterfield25, 2021-12-23 00:07:29

Why does the link to the app open in the browser?

I created a webView application, but the link opens in the browser at startup, how to fix it?

webView = findViewById(R.id.webView);
        // включаем поддержку JavaScript
        WebSettings webSettings = webView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        // указываем страницу загрузки
        webView.loadUrl("https://site.com/");

        webView.setWebViewClient(webViewClient);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question