Code example for WebView

Methods: getContentHeightgetSettings, getHeight

0
   @Override 
   public void onPageFinished( WebView webView, String url ) {
 
      super.onPageFinished( webView, url );
 
      log.d( "webView.getHeight {0}", webView.getHeight() );
      log.d( "webView.getContentHeight {0}", webView.getContentHeight() );
 
      WebSettings webSettings = webView.getSettings();
      webSettings.setJavaScriptEnabled( true );
      webView.addJavascriptInterface( new JavaScriptInterface(), JS_BRIDGE );
      webView.loadUrl( JS_CONTENTSIZE );
   } 
 
   public static void loadData( WebView webView, String data ) {
 
      webView.setWebViewClient( new EmbeddedWebView2() );
 
      WebSettings webSettings = webView.getSettings();
      webSettings.setSavePassword( false );
      webSettings.setSaveFormData( false );