How to create a WebView app in android studio | Part 1

How to create a WebView app in android studio | Part 1

Hi. Today i'm goint show you How to create a WebView app in android studio. I show you how to or which codes you have place on android sudio and where.

Step 1
  • Creat a new project in Android Studio, Add your project name and other details and also select Empty template for create the app.

Now you can find java files or pages on your Android Studio.

Step 2

  • First go to layout/activity_main.xml and add the following code bellow the layout and before the < / >  tag.
Step 3
  • Now goto and add following code

import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends AppCompatActivity {
   private WebView webView;
   protected void onCreate(Bundle savedInstanceState) {
      WebView webView = (WebView)findViewById(;
      webView.setWebViewClient(new WebViewClient());
      WebSettings webSettings = webView.getSettings();
   public void onBackPressed(){
      if (webView.canGoBack()){
    } else {
Step 4
  • Now you have to add internet permission code in androidManifest.xml for work your app on internnet.

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

Now all done. Now run your android application with your android emulator. ( Click Run )

* This is simple way. And next lessons i will show you how to improve your webview app for super perfomance and how to add another features for your app. is an International Multi-platform Media and Entertainment website developed by ALL in ONE Team. Fun , Quiz , Quotes , Memes , News , Gossips , Events , Food , Gif , Photoraphy , Travel , Videos , Music , Sport , Game , Movie , TV Shoes , Gossips , News , Education , Life Style , and all the things what you want you can find here. And also you can use our SinduLanthaya Forum to learn, share ideas and chat with worldwide members.

We know all people love to be happy but sadness also come with us. on we share every posts to help you to smile and get some fun. And also you can read and watch everything on for free. Every day we update . If you want to listen music or Download, You can use

Share posts on with your friends!!