Discussion Forums  >  Uncategorized

Replies: 10    Views: 367

Tech Guy
Lost but trying
Profile
Posts: 96
Reg: Jul 11, 2011
New Orleans
960
09/21/11 12:57 PM (14 years ago)

Entering icons for each menu selection not workig correctly.

I am trying to enter an icon for one of my menu choices, however it isn't working correctly. I have an image ( png 30x30)by the name of cost.png. I dragged it to my BT_images folder in Eclipse. When I click on the menu item i want the image attached to, I enter the image name cost.png. I hit save and then I refresh my phone. Here is where the problem occurs. Instead of displaying the picture I chose, it displays the picture I used from the previous menu item (the default picture lock.png). Any ideas?
 
Tech Guy
Lost but trying
Profile
Posts: 96
Reg: Jul 11, 2011
New Orleans
960
like
09/21/11 01:02 PM (14 years ago)
Added note: If I choose a picture file that came default, it will work. So my personal pictures are the ones I have problems with, not the default pictures.
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
09/21/11 01:51 PM (14 years ago)
When you add images or files into the Eclipse directory (and also for Xcode), you need to recompile the app or it will show the previous images. That's because images/files added directly into Eclipse are embedded into the compiled app you load on your phone or into the simulator.
 
Tech Guy
Lost but trying
Profile
Posts: 96
Reg: Jul 11, 2011
New Orleans
960
like
09/21/11 02:30 PM (14 years ago)
If I recompile, that would simply erase the picture files I put in the BT_Images file, so that wouldn't work. According to Buzztouch, I am suppose to compile and then add the images in the BT_images folder. This was already done. I did that first.
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
09/21/11 06:30 PM (14 years ago)
Hi Tech Guy, MGoBlue is correct. After adding (embedding) files into your xcode or eclipse project, you will need to compile/recompile the app for those files to be visible. Refreshing an app will update the config.txt file used to build screens and menus, etc., but won't add images to the device/simulator. 'According to Buzztouch, I am suppose to compile and then add the images in the BT_images folder.' - Do you recall where you read/heard this? I would like to correct or further explain that information.
 
Tech Guy
Lost but trying
Profile
Posts: 96
Reg: Jul 11, 2011
New Orleans
960
like
09/22/11 07:41 AM (14 years ago)
Parker, I did what MNGoBlue suggested and when I recompiled it wrote over what I had in the folder. Basically getting rid of the pictures I put in. Although I am certainly not an expert at app building, I know a little about windows. If I download the zip folder and extract it to the same location where I had extracted the previous zip file, if the folders have the same name, windows will ask me if I want to replace the existing folder with the same name. Naturally when I do that, it will get rid of anything I just replaced. How do I get past that. To answer your question on where I read that info I mentioned, I read it on every page where I am trying to enter a picture. Here is the exactly what is says. Enter an icon file name or a URL - not both. If you enter an icon file name, such as myicon.png be sure to drag your custom image into the BT_images folder after downloading the source-code for your project. Icon file names are case senstive.
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
09/22/11 01:58 PM (14 years ago)
Ahh ok, you are misunderstanding what we mean by the word 'compile'. Downloading your project from buzztouch isn't actually compiling your app. It is just taking all of the information from your control panel and creating a project for you to open in either xcode or eclipse that you then later compile. So, you are correct that when you re-download your project file and save it in the directory of an already existing file with the same name, the new file will replace the old one. After opening your project in xcode, you can make modifications to your app through its code, or in this case, embed images by dragging them in to the BT_images folder. A popup window will show up and ask if you want to add the files to your project folder as well. Be sure to check the box to do so and say 'yes/save'. Now that you have added new images/files to your project you will compile the app for the simulator by clicking the 'run' button in xcode. If you would like to add more images/files, drag them into the appropriate folder in xcode and then hit the 'stop' button followed by the 'run' button. This will recompile the app with the latest files available within the project. I hope this clears it up for you. A lot of people don't get this at first but it'll make sense the more you play with it. Please ask if you have any more questions or want further clarification. :D
 
Tech Guy
Lost but trying
Profile
Posts: 96
Reg: Jul 11, 2011
New Orleans
960
like
09/22/11 02:21 PM (14 years ago)
OK I am not using Xcode. I am an Android user. When I drag the picture into the BT_Images folder, I do not get a message that asks me if I want to add the files to my project folder. All it asks me is to select how the files should be imported. My choices are Copy Files or Link to Files. I have been choosing copy files. After adding the photo to the BT_Images file, I first deleted the app from my phone in case it kept the previous image in its cache and then I clicked on Run, then Run as Android Application. It goes through its steps and eventually my app comes on my phone. When it opens up, I navagate to where the Icon is suppose to be and it is not there. The same thing happens when I try to add a header image. The the icon, I have it set as a png file with 30x30 resolution. The photo for the header image is a Jpg file at 300x200 resolution. The name of the icon image is icon.png and the name of the header image is security.jpg. This is the name I used when programming my app. I also tried NOT deleting my app on my phone and then recompiling. Naturally I get the message asking if I want to refresh all data. On a different note, I noticed a bug when refreshing data. Currently I have one menu item on my app but when I refresh the app, it doesn't show the menu Item. I have to close the app and reopen it to see the menu item. If I choose to refresh again, I have to close the app again and reopen it otherwise the menu item will be gone again. Also, before the question is asked about the header image, I did add the size of the image.
 
itchicken
Code is Art
Profile
Posts: 6
Reg: Oct 03, 2011
tucker
60
like
10/07/11 06:58 AM (14 years ago)
I am having the same issue. I have deleted the project from xcode, redownloaded, removed all images and icons from structure. build and run and the images are still showing in the menu. when I replace the image to a new one it still shows the previous if anything at all. it at anything Im lost at this point.
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
10/07/11 10:02 AM (14 years ago)
Sorry for losing track of this thread. A few more things to try: Are you dragging the images into the BT_images folder within eclipse or the one in the downloaded project folder? If you haven't been, try the one in eclipse itself. Have you adjusted the menu list properties in the Advanced Menu Properties section for that screen? You'll want to look at and play with both Menu List Row Height, Font Size, and Menu List Icons / Images Size. When you reference your images in the control panel are you using just the image name and not the complete file path? You would want image.png and not BT_images/image.png. After you check all of that, when you run your app on the simulator or device, what does LogCat output when you access that menu list? Does it give any errors? There is information on setting up LogCat in the README.txt file in your project download folder.
 
itchicken
Code is Art
Profile
Posts: 6
Reg: Oct 03, 2011
tucker
60
like
10/07/11 06:28 PM (14 years ago)
Yeah I did some playing and finally got it working. Thanks. Don't ask what I did since I did alot in frustration and am just glad they are working.
 

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.