Home > Mobile >  Android WebView to load some url cannot slide page cannot slide up and down
Android WebView to load some url cannot slide page cannot slide up and down

Time:01-12

If use the Webview to http://m.cnr.cn web page will not be able to slide up and down how to deal with this problem?

@ Override
Protected void onCreate (@ Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

The WebView WebView=new WebView (this);
The setContentView (webView);
WebView. GetSettings (.) setJavaScriptEnabled (true);
WebView. LoadUrl (" http://m.cnr.cn ");

}

CodePudding user response:

The building Lord solved?

CodePudding user response:

reference 1st floor PeOS response:
the building Lord solved?

No, don't know how to solve, you have what method

CodePudding user response:

The building Lord solved

CodePudding user response:



 WebSettings WebSettings=webView. GetSettings (); 
//set the webView attributes, can perform Javascript
WebSettings. SetJavaScriptEnabled (true);
WebSettings. SetDefaultTextEncodingName (" utf-8 ");//set the coding format
WebSettings. SetCacheMode (webSettings. LOAD_DEFAULT);//close webView cache

//set the adaptive screen, both share
WebSettings. SetUseWideViewPort (true);//adjust the images to fit the size of the webView
WebSettings. SetLoadWithOverviewMode (true);//resized to the size of the screen
WebSettings. SetLoadsImagesAutomatically (true);//support automatic loading images
  • Related