vendredi 24 juin 2016

How can I scale my Cordova/PhoneGap app? Should I use "cordova-anyscreen", or is it too hacky?


I'm having problems scaling my app on different devices that have the same proportions but with different -device-pixel-ratio factors.

Example: I have two 360x640 screens, and I make everything fit on one of them, but in the other the content is too big. It doesn't matter if I use em/rem units and change the font-size on html, or if I use media queries or px units. As long as the proportion is the same, they result is gonna be different.

My options are:

  1. Use viewport units and drop support for older devices (or use Crosswalk and add 20mb to my 500kb app), or
  2. Use cordova-anyscreen, which is the only thing I have found, but just seems wrong.

I might be missing something, but I have already spend two full days browsing Google and Stackoverflow, and I don't get how people do to make apps scale proportionally and density-independent. I really need help here. Thanks.


Aucun commentaire:

Enregistrer un commentaire