javascript - Mobile Phone innerWidth,innerHeight vs Resolution -
one of test phones galaxy s3 mini. specs of phone 800x480 resolution.
however, when following in html game:
window.innerwidth window.innerheight
it gives 533 width , 295 height.
now i've read window.devicepixelratio, , phone 1.5 how can me make design good?
the problem game designed 800x480, , looks stretched because of this.
use this, width & height:
windowmanager wm = getwindowmanager(); display d = wm.getdefaultdisplay(); d.getwidth() , d.getheight()
Comments
Post a Comment