我有一张图片,周围有相当大的阴影,背景是透明的。我已将它从 photoshop 保存为 PNG 文件,并通过 xml 在 ImageView 中使用它。这会导致阴影产生条纹效果,而且看起来不太好看。不太确定该怎么做...
最佳答案
只需添加
// set 32 bit window (draw correctly transparent images)
getWindow().getAttributes().format = android.graphics.PixelFormat.RGBA_8888;
在 onCreate(...) 中
http://www.curious-creature.org/2010/12/08/bitmap-quality-banding-and-dithering/
关于android - 透明PNG图像看起来不好看,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3590965/