Get the internal window width and android height embedded in a web browser at all zoom levels

I am trying to use javascript to get the width and height of the build window in the webbrowser, but I can not find the correct method, at the moment the DOM is not aware of changes in the zoom level.

thanks

+4
source share
1 answer

you can try:

DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); 

metrics.width - wide screen metrics.height - screen height

+1
source

Source: https://habr.com/ru/post/1299423/


All Articles