Web-view allows you to view website’s within the app through this web-view in your app.

In this tutorial i will be showing you the basic web-view through which we can easily navigate through the website using our app.

A Web-view can be adjusted within our app so that website can be fit into it , some time sliders are also made using this type of web-view.

 

MainActivity.java

 

 

 

Adding Web-view to layout and button to search.

Also specifying a edit-text to input website url to search just as any browser our web-view also gets website and gives within app.

 

activity_main.xml

 

imp:

To get Web-view we need to add internet permission to Android Manifest file by which our app can access internet.

 

AndroidManifest.xml

 

Output:

 

webview1

Show Buttons
Hide Buttons
Read previous post:
Android Tutorial on Custom ListView

Close