android - PhoneGap - target-densitydpi on viewport -


i'm creating app android , ios using phonegap.

after creating "helloworld" app phonegap's template see target-densitydpi=device-dpi on viewport default. okay, that's fine decided run tests jquery mobile ui , do not use target-densitydpi on viewport (by way if do, website should small on high dpi devices).

since need images of app great @ low , high resolution devices, decided run tests on galaxy s4.


first, target-densitydpi=device-dpi removed:

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" /> 

the document.width 360px, created 360px image , blurry @ gs4 screen.

<img src="360img.jpg" style="width:360px;"> 

second, target-densitydpi=device-dpi enabled:

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> 

the document.width 1080px, created 1080px image , great @ gs4 screen.

<img src="1080img.jpg" style="width:1080px;"> 

third, target-densitydpi=device-dpi removed 1080px image:

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" /> 

the document.width 360px, used created 1080px image , looks great @ gs4 screen.

<img src="1080img.jpg" style="width:100%;"> 

image tests

i able same results on second , third tests, but, wich 1 best (or correct) way work phonegap apps?

thanks!


edit1:

i'm thinking provide these images via api, can tell size of window return correct sized image.

window.width 1080px @ tests, return correct sized image not problem.

for icons, i'm considering svg, don't need create sprites each resolution. can resize de image via css or javascript , should still looking good.

what made me think don't use target-densitydpi=device-dpi jquery mobile ui, library responsive , don't use it, why?


target-densitydpi not supported ios , deprecated android. suggest not use it.


Comments

  1. @admin
    how to create fashion app by using software or tools.
    Regards,
    Deepika Verma

    ReplyDelete
  2. @admin

    Our doctors or dentists are to facilitate their advance techniques and educational experience, which provide patients with the best alternatives for oral health. Our team and dentists maintain to prepare themselves to provide maximum satisfaction for patients.
    Regards,
    Dentist In New Britain, CT


    ReplyDelete

Post a Comment

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -