Webview zoom not focussed and child view ovelaps

366 Views Asked by At

I am trying a view similar to conversation view in Inbox app for gmail android app.

They have used RecyclerView for multiple webviews. So I added multiple webviews inside recycler view. The click events are passed to the webview. But I cannot zoom the webview.

Previously I added multiple webviews inside scrollview. I used NonLockingScrollView from here [https://zi.is/p/browser/k-9/src/com/fsck/k9/view/NonLockingScrollView.java?rev=e4d26b8c752f03dc8a40bcb59a0e601835205083] . I was able to zoom correctly, but the adjacent child views are not adjusted according to the zoom.

How can we achieve this effect? Any hint would be greatly helpful. Thanks

1

There are 1 best solutions below

4
On

I suppose you are looking for built-in zoom support, this would solve that:

WebView web = (WebView) findViewById(R.id.webview);
web.getSettings().setBuiltInZoomControls(true);
web.getSettings().setSupportZoom(true);

Good luck,'.