Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebView cut off


I have a WebView that is supposed to show what my webcam films.
When I go to my webcam from my mobile's browser it works fine, but when I try to do it from my application it looks like this:
https://i.sstatic.net/aGOse.jpg

For some reason it zooms in, and the part of the screen thats "outside" is unreachable, even when trying to drag, scroll or zoom out (as can be seen in the picture, I'm trying to drag the screen to the right).

What I was able to find regarding my problem was this:
Android - webview cuts off
I've tried the solutions there, but to no avail.

Would appreciate some help. Thanks!

like image 693
Idra Avatar asked Jun 14 '26 18:06

Idra


1 Answers

Managed to find an answer.

x.getSettings().setLoadWithOverviewMode(true); x.getSettings().setUseWideViewPort(true);

(When x is my WebView)

Fitting webpage contents inside a webview (Android)

like image 102
Idra Avatar answered Jun 17 '26 09:06

Idra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!