Discussion Forums  >  WebViews and HTML for Mobile

Replies: 7    Views: 166

CodeMeNot
I hate code!
Profile
Posts: 92
Reg: Aug 02, 2012
Sydney
1,720
08/05/12 07:24 PM (13 years ago)

Custom HTML page rendering small on iPhone Simulator

Hi :) Just creating my first app. I have a few HTML pages but when I run the simulator the HTML pages are appearing correctly however very very small. I.e. taking up around 10% of the screen (in the top left). Im and not good at HTML and wondering if there is a fit to screen or equivalent as the current rendering is very very small. My HTML (Source) is as follows: ------------- <p> <title>HTML Online Editor Sample</title></p> <h1> New Zealand Wine</h1> <h1> <font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-weight: normal;">Brief text about the Country.</span></font></h1> <h1> <font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-weight: normal;"><img alt="" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/NZL_orthographic_NaturalEarth.svg/200px-NZL_orthographic_NaturalEarth.svg.png" style="width: 180px; height: 180px; " />&nbsp;</span></font></h1> <p> <u><strong>Heading Underlined and Bold</strong></u></p> <p> <strong>Cost</strong></p> <p> sample will cost 40$ US.</p> <p> <strong>Duration</strong></p> <p> 3 months</p> <p> <strong>Contact</strong></p> <p> Email John at <a href="mailto:[email protected]?subject=Visa%20Enquiry%20">[email protected]</a></p> --------------- All help appreciated :)
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/05/12 07:55 PM (13 years ago)
For use with HTML Doc screen, Try: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title></title> Fred
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/05/12 08:13 PM (13 years ago)
Buzztouch provides this by default for Custom HTML/TXT screens, and it works for both iPhone and iPad: <head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <meta content="width=device-width; initial-scale=1.0; maximum-scale=2.0; user-scalable=1;" name="viewport" /> Mark
 
CodeMeNot
I hate code!
Profile
Posts: 92
Reg: Aug 02, 2012
Sydney
1,720
like
08/05/12 08:18 PM (13 years ago)
Thanks so much! It worked. Mark I think you answer a question I was just about to ask. Basically when I put the text in the Fred said it worked but upon returning the the source code buzztouch seemed to have deleted it (must be because its already built in). Anyhow, problem solved. Thanks so much for very fast replies! Loving buzztouch!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/05/12 08:42 PM (13 years ago)
Glad it worked out! If you are using a v1.5 or v2.0 Custom HTML/Text screen, that code should be there by default (you can see it by hitting the Source button). There are some strange issues with the editor for that screen, where it doesn't save stuff, so that could be related to your problem. Anyway...glad you're good! Mark
 
pkdeveloper
Code is Art
Profile
Posts: 29
Reg: May 16, 2012
Washington, DC
4,640
like
08/07/12 09:05 AM (13 years ago)
Mark, thanks for this info. However, it is not working for me. I looked at my version of Custom HTML/Text screen and it is only v1.0. I'm assuming this is the issue. Where can I get the version 1.5 or 2.0 you reference here? Thanks.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/07/12 09:23 AM (13 years ago)
The version you reference is the HTML version. The v1.5 & v2.0 references BTv1.5 & BT_2.0 You have the latest version. You may wish to use the HTML Doc screen. You'll have more control. Fred
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/07/12 09:51 AM (13 years ago)
Hi @pkdeveloper, The code that I gave you should work regardless of what version of BT you are using. It's standard code that basically recognizes the type of device that its being run on, and formats accordingly. Are you using it in a standard HTML doc, or in the Custom HTML/Text screen? I would advise using the HTML Doc Screen like Fred suggests..much more control that way, and you don't have to worry about the buggy editor for the other screen. Mark
 

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.