install android studio

WebView in Android Studio


Web view is the view available in Android Studio for use in Android apps.It acts like a browser on which you can pass the url and get the result page within the app.

Implementation :

To implement webview in Android Studio .Put the code in

public class Webview extends AppCompatActivity {
Button btnBack;
WebView webView;
private class MyWebViewClient extends WebViewClient {
private MyWebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return true;
protected void onCreate(Bundle savedInstanceState) {
this.webView = (WebView) findViewById(;
this.webView.setWebViewClient(new MyWebViewClient());
private void openURL() {

Problem will be discussed in Comment section.

About the author

Generic Bytes

Hi! we are from Generic Bytes an aspiring bloggers with an obsession of things tech.This blog is dedicated to people who want to learn the technology.

View all posts

Leave a Reply

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