开发者

Android WebView zoom controls are not moved after resize

I use a Webview to display an image with zooming and scrolling enabled. The WebView is set to wrap_content for the height and width and the zoomcontrols are enabled.

If the image is smaller then the screen the webview will show just the image and there is lots of space left on the screen. The moment the user zooms the WebView will grow to 开发者_如何学Pythonfit the new imagesize. The problem is that the zoomcontrols stay at the same spot and stop working after the webview is resized. If I let them fade out and touch the view again they will appear at the new bottom of the view and work again.

This seems like a bug in the webview to me. Is there a way to capture the resize of the webview and then disable and enable the zoomcontrols?


If You Will try webview.getSettings().setBuiltInZoomControls(false);

It will not display the zoomcontrols at the bottom of the screen.

And in android device it will zoom in and out your webview.

And for the white space in scrren for small size images , you should try

view.getSettings().setLoadWithOverviewMode(true);

view.getSettings().setUseWideViewPort(true);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜