开发者

I'm having trouble loading a webpage neatly in webview

开发者 https://www.devze.com 2023-03-03 07:19 出处:网络
Everytime I load a page in the webview, the webview tries to squash the web page into a small frame. However, in the standard android browser, it loads the p开发者_StackOverflow中文版age at the full s

Everytime I load a page in the webview, the webview tries to squash the web page into a small frame. However, in the standard android browser, it loads the p开发者_StackOverflow中文版age at the full size and allows the user to zoom in however much they decide.

Is there anyway to make a webview load a page like the default web browser?


Something like this:

WebView wv;
WebSettings webSettings = wv.getSettings();

webSettings.setBuiltInZoomControls(true); //when you define webview settings just add this to enable zoom
wv.setInitialScale(1); //lets set initial zoom to 1% to see whole page when it loads
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号