Phreemann
unread,Jul 12, 2010, 1:24:23 PM7/12/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to phonegap
Hi,
I'm just starting out with PhoneGap, so apologies in advance if this
is the sort of noob question that drives everyone insane, but it's
giving me no end of a headache.
I'm using a Nexus One and an Xperia X10 for my test devices, which
have screen resolutions of 480x800 and 480x854 respectively. I set up
my html and css working on a width of 480px and automatic height. It
displays fine in the PhoneGap simulator, but when I build it and
install it on my phone or run it with the Android emulator, everything
gets scaled up so that it doesn't fit the screen properly.
From searching and reading it seems the issue is caused by Android
assuming a default screen resolution of 160dpi. With the Nexus One and
X10 having screens of 240dpi, everything is scaled up by a factor of
1.5, since Android thinks this is necessary for the app to display
properly. Because of this, my app doesn't fit on the screen, and all
my images are horribly blurry.
Is there any way to prevent this automatic scaling? I've tried
changing the android:resizeable and android:anyDensity settings in the
manifest, to no avail. I tried changing my image dpi - no difference.
I'm at a bit of a loss. Obviously I can build my app to take account
of this, using a width of 320px, but that seems a poor solution to
what should be a trivial issue.
Is there any way to get round this issue, or are all my Android apps
destined to be scaled and blurry? Thanks in advance.