Android WebView is used to display web page in android. The web page can be loaded from same application or URL. It is used to display online content in android activity.
Android WebView uses webkit engine to display web page.
The android.webkit.WebView is the subclass of AbsoluteLayout class.
Android WebView Example
Let’s see the simple code to display javatpoint.com web page using web view.
Fast AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
WebView mywebview = (WebView) findViewById(R.id.webView1); mywebview.loadUrl("http://www.javatpoint.com/");
Let’s see the simple code to display HTML web page using web view. In this case, html file must be located inside the asset directory.