Discussion Forums  >  Uncategorized

Replies: 4    Views: 191

Rizon_Games
Android Fan
Profile
Posts: 52
Reg: Jan 19, 2012
location unknow...
520
01/28/12 09:01 AM (14 years ago)

Android HTML Page Scaling

I just wanted to share something with those that maybe having issues getting there webpages to scale properly on the screen. I made a page and much of it was cut off or hiding off page. If you are having these issues, use this in the <head> tags. <meta content=width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no; target-densitydpi=device-dpi; name=viewport /> This is read by the Android device and tells it to modify the page for the screen. Width forces the page to the device width, scale should be self explanatory, max scale and user scale disable zooming... DPI is very important as this is where my issues were stemming from. Once I set this last tag, it fit on the screen perfectly! Just wanted to share with you all!!!
 
KevinPerry
Android Fan
Profile
Posts: 199
Reg: Jan 10, 2012
Wisconsin, USA
12,890
like
01/28/12 09:27 AM (14 years ago)
HMMM, interesting, will have to try it out. I know I could see having this same capabilities with the customURL page (but doubt it is possible at this point). One app for our project would log into our OS on a machine and access its control panel. Its control panel can not be modified to use specifically for mobiles, so I can not modify it in this way. I could have the app open the native browser, but that would defeat the purpose of creating the app, not having it require the full webpage layout (frames and such) that is in the control panel programming.
 
Rizon_Games
Android Fan
Profile
Posts: 52
Reg: Jan 19, 2012
location unknow...
520
like
01/28/12 09:41 AM (14 years ago)
Yeah, I added this to my HTML page that is pulled by Custom URL. We are a game design company and only I access the Control Panel for BT, so I set up HTML files for the Devs to update with changes.
 
KevinPerry
Android Fan
Profile
Posts: 199
Reg: Jan 10, 2012
Wisconsin, USA
12,890
like
01/28/12 09:48 AM (14 years ago)
I wish I could do that also, but the control panel for our project is shell scripting and VERY limited on space (byte size). So having him rewrite it to be for me, is not an option :-( but is understandable on his end. Now thinking a bit, I wonder if making a customHTML , using that and programming this line into that html file, along with an <iframe> for the page to include, MAY work :-/ not sure YET ;-) BUT thanks for the info it gives me some possible ideas to try :-)
 
Rizon_Games
Android Fan
Profile
Posts: 52
Reg: Jan 19, 2012
location unknow...
520
like
01/28/12 09:51 AM (14 years ago)
No problem!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.