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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -