Discussion Forums  >  Images, Documents, File Locations

Replies: 6    Views: 243

bioninja
Lost but trying
Profile
Posts: 71
Reg: Jul 08, 2012
Melbourne
2,860
10/03/12 04:43 PM (13 years ago)

Android won't show images

Hi. So I've used buzztouch to build an app for iPhones using Xcode and it all works fine. Am now trying to port the same app for Androids using Eclipse and am having some problems. 1. None of my images have appeared. I have added the BT_Docs, BT_Images and BT_Plugins files. The app runs, all the docs seem to work (they are HTML docs), but none of the images contained within the docs are appearing. Nor are any of the images for my menu buttons appearing, even though they are all included in the BT_Images folder under assets. I don't understand why it worked for Xcode but not for Eclipse. 2. The other issue I am having is to do with presentation. While everything looked lovely with Xcode, under android all my HTML docs are too big (32 font size was perfect for iphones but appears way too large on Androids, plus all my images are huge and require side scrolling to view it all (even though they are just a box with a cross at the moment). Is there an easy way to fix this or am I going to have to manually reformat all of my HTML docs with smaller fonts and smaller image sizes?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/03/12 04:53 PM (13 years ago)
Hi @bioninja, For Android, images go in the res > drawable folder. Also, make sure they conform to the a-z0-9 (no caps, spaces, special characters) naming convention, or they won't work. Mark
 
bioninja
Lost but trying
Profile
Posts: 71
Reg: Jul 08, 2012
Melbourne
2,860
like
10/03/12 07:20 PM (13 years ago)
Thanks Mark, that did the trick. Turns out only the menu button images went into the res > drawable folder, the rest went into the BT-Docs folder with the HTMLs. Now can anyone illuminate me as to how I can easily adjust screen dimensions (or alternatively adjust font size and image size) without reformatting all my HTMLs? I don't understand why the same HTML looks so different with Eclipse as opposed to Xcode, but I need to fix it somehow :(
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/03/12 11:37 PM (13 years ago)
Yeah, I meant to add the part about images associated with HTML docs being placed in the BT_Docs folder, but I was in a rush. Glad you figured it out! As for the screen dimensions, I know this code works in iOS, but I'm not entirely sure it works in Android. It goes in the <head> section: <meta content="width=device-width; initial-scale=1.0; maximum-scale=2.0; user-scalable=1;" name="viewport" /> I think it's pretty self explanatory, but you can Google the components to get more details. Mark
 
bioninja
Lost but trying
Profile
Posts: 71
Reg: Jul 08, 2012
Melbourne
2,860
like
10/04/12 03:22 AM (13 years ago)
I found this code after the <head> worked a treat for the images <style type="text/css"> img { max-width: 95%; height: auto; } </style> You can set the width to any size and it automatically rescales! One more question, does anyone know why I can't change the font size of quiz answers? I change the size in the buzztouch control panel, but the android phone won't alter the default size, and I can't find the file with the actual code to make adjustments. Can anyone help?
 
bioninja
Lost but trying
Profile
Posts: 71
Reg: Jul 08, 2012
Melbourne
2,860
like
10/04/12 03:29 AM (13 years ago)
I found this code after the <head> worked a treat for the images <style type="text/css"> img { max-width: 95%; height: auto; } </style> You can set the width to any size and it automatically rescales! One more question, does anyone know why I can't change the font size of quiz answers? I change the size in the buzztouch control panel, but the android phone won't alter the default size, and I can't find the file with the actual code to make adjustments. Can anyone help?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/04/12 07:50 AM (13 years ago)
Check out res > layout > screen_quiz.xml. There's stuff about text and image size there. Cool stuff on the CSS code! 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.