Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 91

Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
11/27/12 10:20 AM (13 years ago)

Android Menu Buttons

Hello all, The menu buttons within my android app( png images with transparent corners) look fine when the app first launches. However, when the user changes the orientation, the buttons display black corners, and I have not found a solution to this. The color of the buttons (BT control panel) is set to clear. If you download my app you can see what I'm talking about. Has anyone ever seen this before?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/27/12 09:49 PM (13 years ago)
Hmm...no, have not seen this before. I wonder if it has something to do with Android's built in black background color showing through the "clear" background color you have set for the screen in the control panel. Not sure really. As a test, and a little debug exercise, what happens if you set another background color for the screen, say blue. Refresh, re-load, rotate. Does the blue background remain when you rotate and do the buttons maintain their proper corners? Or, do the buttons turn black on the edges again. That may or may not help understand anything. But, my hunch is that the background will work fine and the images will show black corners when rotated. If this is the case, then there's something going on with how Android is rendering the transparent .png's after the screen is rotated. Again, not sure why this would be but it does seem logical? There could be a way to re-load all the images after the screen loads but it seems to me that that would be terribly slow and be a bogus user experience. Test a bit, see what you can come up with. AH, look at this, doesn't look like you're alone! http://stackoverflow.com/questions/4148774/how-do-i-get-a-transparent-background-after-rotaing-a-png-image-with-php
 
WebNevees
Code is Art
Profile
Posts: 206
Reg: Oct 28, 2012
KL
11,660
like
12/02/12 01:20 AM (13 years ago)
Hi David, and Hi Mad Padge I'm having sort of the same problem in android. I'm in a buttons menu screen and when I set the "Image URL Large Device" option for the buttons image with a web url (remote file), instead of using a "Image File Name Large Device" pointing to a local filename, if the images are transparent pngs then I will have black backgrounds in 2 cases: 1- I rotate the screen 2- I exit the app and reopen. So for all next times that I use the app I will face the same black background problem. Until I change the config file, triggering a new refresh of the app. Then the buttons will be ok until I rotate or restart the app.... Since I am facing different layouts in android customers and have a gradient based bg image, I really need to use the transparency in png files. What can I do? any fixes?
 
WebNevees
Code is Art
Profile
Posts: 206
Reg: Oct 28, 2012
KL
11,660
like
12/02/12 01:32 AM (13 years ago)
Oh and forgot to send the screenshots. The ones that are ok are for the first time I open the app (or just refresh ). The images are all URLs. https://dl.dropbox.com/u/27773514/ForShare/Screenshot_2012-12-02-16-00-31.png https://dl.dropbox.com/u/27773514/ForShare/Screenshot_2012-12-02-16-00-45.png These are from when I restart the app, or even rotate the screen. https://dl.dropbox.com/u/27773514/ForShare/Screenshot_2012-12-02-16-02-05.png https://dl.dropbox.com/u/27773514/ForShare/Screenshot_2012-12-02-15-27-08.png and if I set the button image's source to a local file in my app then I face no blackout problem. But since I want to change the icons periodically I'd rather address the urls instead.
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
12/18/12 10:01 AM (13 years ago)
WebNeeves, our situation is similar.
 
WebNevees
Code is Art
Profile
Posts: 206
Reg: Oct 28, 2012
KL
11,660
like
12/19/12 10:04 PM (13 years ago)
Mad Padge, were you able to resolve the issue? I had to change plans and not use remote urls for the icon files for android, although for ios it's no problem. So for Android I am using local files and although this is static, and I won't be able to change the icons later on, but its a temporary fix.
 

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.