Code example for WebView

Methods: getSettingssetScrollBarStylesetWebChromeClientsetWebViewClient, setFocusable, setFocusableInTouchMode

0
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
             
      mWebView = (WebView)findViewById(R.id.wvMain);
       
      mWebView.setWebViewClient(new WebViewClient());
      mWebView.setWebChromeClient(new WebChromeClient());
       
      mWebView.setFocusable(true);
      mWebView.setFocusableInTouchMode(true);
      mWebView.getSettings().setJavaScriptEnabled(true);
      mWebView.getSettings().setPluginsEnabled(true);
      mWebView.getSettings().setRenderPriority(RenderPriority.HIGH);
      mWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
      mWebView.getSettings().setDomStorageEnabled(true);
      mWebView.getSettings().setDatabaseEnabled(true);
      mWebView.getSettings().setAppCacheEnabled(true);
      mWebView.getSettings().setBuiltInZoomControls(true);
      mWebView.getSettings().setSupportZoom(true);
       
      mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
      //mWebView.getSettings().setDatabaseEnabled(true); 
      //mWebView.getSettings().setDatabasePath("/data/data/" + getApplicationContext().getPackageName() + "/databases/"); 
       
   } 
 
Connect your IDE to all the code out there  Get Codota for Java