Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap Application text and layout too small

I recently build an android app using html, css, javascript and running them through phonegap to create the actual app. One of the problems I encountered in one phone is that the text looks too small. Also some images are a little small as well. I added a viewport meta tag but it doesnt seem to work either. Here are the meta tags:

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />     <meta name="format-detection" content="telephone=no" />     <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" />` 

This is how it looks
This happens in a particular phone(Samsung Galaxy)

This is how its supposed to look:
This is how it looks in htc wildfire s

like image 833
lomas09 Avatar asked Mar 04 '13 05:03

lomas09


1 Answers

I had the same problem and solved it changing the viewport. I also thought the problem was phonegap, but it really was that the devices used for testing had different dpi.

My solution was to change the target-densitydpi on the viewport to:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, target-densitydpi=medium-dpi, user-scalable=0" /> 

Hope it helps

like image 87
MazarD Avatar answered Oct 02 '22 21:10

MazarD