Discussion Forums  >  WebViews and HTML for Mobile

Replies: 17    Views: 155

Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
08/18/12 06:07 PM (13 years ago)

Custom html in 2.0 font-size

I am working on a project that will be both on iOS and Android. I need to have text legible for both Android and iOS. The Android seems to interpret the font size correctly, but the iPhone does not. Of course, I could just make the font bigger, but then it would be three times the size on Android. There are several other posts on this topic suggesting that the following language needs to go into the head. Here is one example of the language to include: <meta content="yes" name="apple-mobile-web-app-capable" /> <meta content="width=device-width"; initial-scale=1.0; user-scalable=no;" name="viewport" /> In the past, I have used this with success. But I can't seem to make it work on 2.0. Any ideas?
 
ALFREA
Aspiring developer
Profile
Posts: 89
Reg: Jul 24, 2011
San Antonio, TX
3,640
like
08/18/12 06:43 PM (13 years ago)
Hi, Susan. I heard your interview on the podcast. Very inspirational! :-). I'm sill trying to complete the Android, and I got it trough my head that Andriod users and iPhone users will not compare apps. "One is a Mac and one is a PC." If font sizes are different and it still looks great on both devices, then keep it that way... and don't look back. Also, test the Android font size on different phones. The size might look different than the emulator. I haven't tried changing the size of fonts, yet. However, if I start to tinker with it. I'll let you know. Best of luck! :-)
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
08/18/12 06:49 PM (13 years ago)
Hi, Alfrea! I'm not the only one working on a Saturday night, I see. :) Thanks for responding! The problem is that to make the font size readable on the iPhone, it has to be of monstrous size on the Android. In the past, I have been able to use the code above to make it work, but it doesn't seem to work anymore. I was playing around with other html elements like font color, and I am not sure they are working either in 2.0. David just did an update to the Custom html screen, but it was for a different problem.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
08/18/12 07:57 PM (13 years ago)
Would it be possible to use HTML doc screens, and just have a different document included in your Android build vs xCode build?
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
08/18/12 08:12 PM (13 years ago)
Hi, @Stobe! No wonder you get so much done....you work on Saturday night too! Say, nice job on the business topic! You had some really great ideas to share. I brought some iPhone templates to a meeting with a client the next day, and it made me look much more professional. HTML Docs is my backup plan. The reason I wanted to try the custom HTML is because I could see the client maintaining this app, but that may not be practical anyway. HTML docs do not have this problem so no need for separate files. I think something is wrong with the Custom HTML plugin, since I have had this problem before in 1.5 and never had a problem fixing it with the meta data text.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
08/18/12 08:16 PM (13 years ago)
I think David has always said that the Custom HTML screens should be used as a last-chance effort. Good for mocking stuff up quickly, but not a recommended end-use screen. I would think setting up a Google Doc, or Dropbox file that the client could maintain would be better than making them login to a BT server and using a quirky (sorry) WYSIWYG editor. Just my 2 cents. And thanks for the kind words about the podcast.
 
Marko
buzztouch Evangelist
Profile
Posts: 558
Reg: May 04, 2011
UK, Alcester
8,880
like
08/18/12 08:42 PM (13 years ago)
Can I get info on the podcast I fell like a kid at school who is not getting invited to the party :) Ps its giving me psychological trauma and flashback to my real school day only a couple a years ago (pinocchio) where ther were of so many parties but to few invites
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
08/18/12 08:48 PM (13 years ago)
Marko... Everyone was invited :) David posted a link icon in the forums for a while, but you may have missed it. He moved it to the "How To's" section now. Or you can search iTunes Podcasts (or zune, or blackberry) for Buzzcast. -Stobe
 
Marko
buzztouch Evangelist
Profile
Posts: 558
Reg: May 04, 2011
UK, Alcester
8,880
like
08/18/12 08:50 PM (13 years ago)
Thanks stobe I will search this up, by the way my money is on the green one winning in the laser sword fight.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
08/18/12 08:55 PM (13 years ago)
Ya, I've been meaning to change my avatar for a while. But was afraid no one would recognize me anymore, lol.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/18/12 09:01 PM (13 years ago)
Have the HTML change the font according to the device. The HTML Doc screen via URL is essentially the same as as the Custom HTML Text screen except you bring your own editor. Fred
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
08/19/12 07:19 AM (13 years ago)
Thanks, everyone. I still think there are problems with the Custom HTML plugin, but I will change over to the HTML doc for this app. Fred, do you know where I can learn more about changing the font based on the device?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/19/12 07:44 AM (13 years ago)
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
08/19/12 09:22 AM (13 years ago)
Way cool, Fred!
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
08/20/12 11:36 AM (13 years ago)
Hi Susan, I have some html that should help if you are still looking, just let me know. Btw, I have updated the html/text plugin too and whilst I do not rely on it to generate my html, I think I am seeing something strange whjen editing existing pages sometimes. If I make an edit, something seems to go wrong, mqybe some html is lost; I suspect something is not quite right still. Alan
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
08/20/12 02:56 PM (13 years ago)
Thanks, Alan! I am going to give up on the custom html screen...I don't think it is quite ready for prime time, and the HTML doc is the better option anyway. I would love to know what HTML you have that would help, because I have been studying HTML,CSS and JavaScript in order to increase my options.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
08/20/12 03:11 PM (13 years ago)
Hello Susan I will send you a message with an example of some html that I use for my apps that I use for displaying html on iPhone and iPad. I am no coding guru, but it just about does what I need. Alan
 
rossideas
Aspiring developer
Profile
Posts: 145
Reg: Jul 24, 2011
Albuquerque
1,450
like
11/20/12 04:07 PM (13 years ago)
FYI... this is still an issue with the Custom HTML plugin in 2.0. It also has a mind of its own. Put in text... then disappears. Put back in... gone again. HTML docs the best for now
 

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.