Hi Michael, you can certainly switch stylesheets based on screen density in phonegap!
Here's something to get your started. Searching for css media queries will also give you a wealth of information.
On Tuesday, 30 October 2012 05:27:46 UTC+11, Michael Crinnion wrote:
Hi,
I am just getting started with PhoneGap and App development in this way. I have what I think is probably a very newbie question...
I am trying to create an app that follows Google's guidelines strictly for a native app / pure android feel. All of their size guidelines are in dp, their density independent pixel unit which of course isn't supported in CSS. I know I can convert this to pixels based on the screen density of any given device but how do I accommodate for multiple screen densities? Is there a way to switch style sheets based on screen density? Does PhoneGap have a clever way of handling this that I haven't discovered?
A specific example would be the action bar that is at the top of most native android apps. This is 32dp which calculates as 24px@ldpi, 32px@mdpi, 48px@hdpi and 64px@xhdpi.
Any help would be greatly appreciated.
Michael