Search code examples
androidwebviewer

Android Web Viewer to load external URL on start


Can anyone help me with the line that loads an URL directly in my web viewer? I have the viewer with no address bar and I want to display an external html from an URL. I would be very grateful!


Solution

  • WebView wv = (WebView)findViewById(R.id.website);
    WebViewClient client = new WebViewClient();
    wv.setWebViewClient(client);
    wv.getSettings().setJavaScriptEnabled(true);
    wv.loadUrl(url);