Adding the WebView to activity_main.xml in Android Studio (Creating HTML5 Android WebApp)



The next step is to add WebView to your layout file in Android Studio.

Delete everything in your layout before adding WebView. Then after you drag and drop the WebView, you need to make it full screen.

Make sure you set the constraint correctly and set the layout-width and layout-height to match constraint.

Give it an id: “webview”

Now we are done with layout. Next is to edit MainActivity.java file.

loading...

Leave a Reply

Your email address will not be published. Required fields are marked *