Discussion Forums  >  Images, Documents, File Locations

Replies: 9    Views: 340

clhend
Aspiring developer
Profile
Posts: 76
Reg: Dec 23, 2014
Weatherford, TX
5,460
06/01/15 08:14 AM (9 years ago)

Images Not Loading Efficiently

I've noticed that when I switch screens, the next screen background image doesn't load. Instead the background image from the homescreen will remain in place, often through two or three screen changes. Also some of the button images load slowly or don't even appear after leaving and then returning to the same screen. I've used the tinypng.com to shrink the images one time already. Is there an optimal file size for quick loading?
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/01/15 12:43 PM (9 years ago)
I have seen that happen when the next background image you are attempting to load cannot be found. Or has an illegal character such as a hyphen in the name, if you are on Android. Shrinking using tinypng is good, also make sure the pixel sizes are as low as you can go. A couple of other tips for Android: If your app references images as URL's, move them into the project and your app will be more stable. Set in the manifest android:largeHeap="true”, which helps by giving app more memory (as mentioned by Sean). I have not found a downside to this tweak. It might give you enough extra memory. Alan
 
clhend
Aspiring developer
Profile
Posts: 76
Reg: Dec 23, 2014
Weatherford, TX
5,460
like
06/01/15 01:16 PM (9 years ago)
Thanks Alan. I may have to shrink the images a second time, although most are well under 80k, with only a couple over 1m.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/02/15 01:19 AM (9 years ago)
Just to confirm, when I said shrink the pixel sizes, here are a couple of examples. For buttons in menu's, aim for about 60x60 pixels for small devices, or 100x100px for large devices. If that reduces the quality you see, then try a bit bigger. For background images, the same principle applies, but sizes depend on whether you are centering them, stretching, etc. Graphics on Android can be a source of Great Frustration! Alan
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
06/03/15 06:52 AM (9 years ago)
Also consider putting the images in your project, drawable folders, to load faster. LA
 
arkietechs
Aspiring developer
Profile
Posts: 11
Reg: Sep 01, 2014
Jacksonville
7,010
like
12/25/15 08:17 PM (8 years ago)
I'm having the same issue. The icon images for my buttons are urls at buzztouch and I've loaded them into my drawable folder in Andriod Studio. However, like clhend stated, when I switch screens and come back to the Home Screen the icon images disappear. I have to refresh the app and they come back. What am I missing? I'm at the point to submit the app, but can't with this bug.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
12/26/15 03:43 AM (8 years ago)
It sounds like you are using both locations and your app is still picking up the URL's(The icon images for my buttons are urls at buzztouch *and* I've loaded them into my drawable folder in Andriod Studio.) If you remove the URL entries from your CP, then you can be certain (after a refresh) that the project is using the images in the project build. Good luck, Alan
 
arkietechs
Aspiring developer
Profile
Posts: 11
Reg: Sep 01, 2014
Jacksonville
7,010
like
12/30/15 07:37 PM (8 years ago)
So I started a new project from scratch with just a home button screen, splash, background png image and the png icon. Zipped and opened in Andriod Studio. I did not move any files into the Andriod Project. After you click on the icon and go back to the home menu, the icon png goes away. Please see this in the short video I added. The icon is only a url from buzztouch and buzztouch is up. The icon png is a 64x64 and 1.14 KB. This is a basic setup. Have I missed a step? Thanks all. https://www.dropbox.com/s/dn4nu2lb5okx1qi/test41a.mp4?dl=0
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
12/31/15 03:19 AM (8 years ago)
Hi arkietechs, I do not think that is the same problem. I suspect your problem here is another bug in the way png files are cached in BT 3.0 on Android. You could try moving the png files into the project build in Android Studio and then refer to the image from your control panel as a local file, *not* a URL. Or try my menu buttons plus plugin, which this particular problem has been identified and addressed. I've tested this using Eclipse and I believe @funkymonkey uses it successfully with android studio. See this link http://www.buzztouch.com/plugins/plugin.php?pid=5DDEAB1E0B50ECC91C30DB8 and jump to the bottom of the readme, I think this describes the issuet you are experiencing. Cheers, Alan
 
arkietechs
Aspiring developer
Profile
Posts: 11
Reg: Sep 01, 2014
Jacksonville
7,010
like
12/31/15 10:12 AM (8 years ago)
Thank you Alan and all. I will begin this process and let you know how it works. Happy New Year to all.
 

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.