简体   繁体   中英

Android PNG Transparency Issue

I'm using PNG images with transparency in my game and no matter what I do the edges of them get all grainy looking.

I have tried setting the following in my activity with no luck:

getWindow().setFlags(WindowManager.LayoutParams.FLAG_DITHER, WindowManager.LayoutParams.FLAG_DITHER);

Is there anything I can do in Photoshop or in my game to overcome this. Please see the image here: 播放按钮

It looks like your image is too low a resolution and the edges are not tidy, there is some white left over from when you deleted the background.

Open the image in photoshop, zoom right in and fix your edges. Probably best to redraw and resize again for the screen you are using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM