This is rather a funny problem I have ever come across,
I have a table layout with 9 image buttons, 3 per row. Every ImageButton has a different image associated with it. I have set the background of the image button to transparent (#00000000). Now here is where the funny stuff happens, One of the images doesn't show up on the emulator (Gingerbread) as well as a device running Froyo. The layout editor shows all the images in place.
Here are some more stuff:
RelativeLayout
instead of a TableLayout
, the same issue persists.drawable-mdpi
folder.Any pointers?
EDIT Turned out to be a bug and this issue has been resolved. Please check this link.
I can confirm adding a dummy image which displays first alphabetically is a fix.
I had an image (titled about.png so of course near the top of the drawable folder) which was not displaying when the test device used was mdpi.
In my case, though, the image was not the first in the directory. I actually had an image which alphabetically displayed first called about_icon.png - which oddly was displaying fine. Additionally, the hdpi version of the image was displaying fine within an hdpi device.
I added a dummy placeholder image called "aaaa.png" and now the mdpi about image displays fine in device.
Very strange, and honestly a pretty lousy bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With