ImageButton在透明图像中显示工件

时间:2010-10-03 04:01:54

标签: android

我有这样的布局:

<LinearLayout android:background="mybackgroundimage.jpg">
    ...
    <LinearLayout android:weight=1> <!-- another layout to group the 
               images below and give it weight=1 -->
        <ImageButton android:background="item1bg.png" .../>
        <ImageButton android:background="item2bg.png" .../>
    </LinearLayout>
</LinearLayout>

图像item1bg和item2bg从完整图像淡入到完全透明。 期望的效果是将图像混合到背景中。

我已经验证了这些图像,当你打开它们时它们看起来很好。但是当在按钮中应用时,它们会在混合部分显示伪影:一些绿色垂直透明线。

我尝试了setAlpha(0),但工件仍然存在。

关于为什么会发生这种情况和/或如何解决它的任何想法?

谢谢! Llappall

1 个答案:

答案 0 :(得分:0)

问题在于图像DID具有伪影,但由于alpha值更大(使图像的部分透明),因此很难看到它们。 这是图像的问题,而不是ImageButton。

:(

由于

llappall