的ImageButton不显示特定抽拉ImageButton

2023-09-07 03:43:50 作者:妄拥.

这是相当一个有趣的问题,我曾经遇到过,

This is rather a funny problem I have ever come across,

我有9图像按钮,每行3个表布局。每个的ImageButton具有与之相关联的不同的图像。我已经设置了图像按钮,透明(#00000000)的背景。现在这里是有趣的事情发生,其中一个图像不能在模拟器(姜饼)以及运行Froyo的设备出现。布局编辑器显示的地方的所有图像。

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的 A TableLayout ,同样的问题依然存在。 我改变了形象(用它在不同的按钮)的位置,它仍然没有显示出来。 当我使用不同的图像,他们显示出来,但是当我使用这个特定的图像也不会。 所有图像具有相同的分辨率(90x72)和密度(72ppi) 所有的图像都在该绘制-MDPI 文件夹。 I used a RelativeLayout instead of a TableLayout, the same issue persists. I changed the position of the image (used it on different buttons) and still it doesn't show up. When I use a different image they show up, but when I use this particular image it won't. All images have the same resolution (90x72) and density (72ppi) All the images are in the the drawable-mdpi folder.

任何指针?

修改 原来是一个错误,这个问题已经解决。请检查此链接。

EDIT Turned out to be a bug and this issue has been resolved. Please check this link.

推荐答案

你仍然有问题。我有一个类似的错误 - 不显示特定的绘制,无论在哪个的ImageView 。 是不是这样,你的形象是第一个(按字母顺序)在绘制文件夹?由于一些奇怪的原因,有一个与第一绘制出了问题,我被排在首位添加一个虚拟绘制的解决我的问题。不过我很好奇,在实际问题。 希望帮助!我很期待任何进一步的解释:)

Do you still have the problem. I had a similar bug - a particular drawable was not being displayed, no matter in what ImageView. Is it the case that your image is the first (alphabetically) in the drawable folder? For some strange reason there is a problem with the first drawable, i "solved" my problem by adding a dummy drawable in first place. Still I'm very curious where the actual problem is. Hope that helps! And I'm looking forward for any further explanations :)