android webview settings and encountered pit

= WebSettings the WebSettings webView.getSettings (); 
webSettings.setCacheMode (webSettings.LOAD_NO_CACHE); // not set cache 
webSettings.setJavaScriptEnabled ( to true ); // support the JS 
IF (Build.VERSION.SDK_INT> = Build.VERSION_CODES.LOLLIPOP) { 
    webView.getSettings () setMixedContentMode (WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);. 
} 
 webView.setInitialScale ( 50 ); // set the zoom ratio display 
// String = the URL of " http://192.168.3.23 :? 8082 / # / BigScreen mac = 123456 "; // the URL of the keyword can not bring mac, remember! = The URL of String "http://192.168.3.23:8082/#/bigScreen?id=123456" ; webView.loadUrl (the URL of);
// Load the page you need to set up Google browser kernel webView.setWebChromeClient (
new new WebChromeClient () { @Override public void onReceivedTitle (WebView View, String title) { Super .onReceivedTitle (View, title); } @Override public void onProgressChanged (WebView View , int newProgress) { Super .onProgressChanged (View, newProgress); IF (newProgress == 100 ) { } } });

 

Guess you like

Origin www.cnblogs.com/cxf1992/p/11598695.html