Gradient compatibility issue - ICS defaults to fewer colors than all the previous versions of Android

谁都会走 提交于 2019-12-05 05:24:57
Wozza

I think the problem is that android is (on the right) drawing the gradient using fewer colours. I believe you want to enable dithering to help disguise the drop in the color depth. Maybe see this answer link

I'm not totally sure how it works, but I believe android will sometimes default to RGB_565 mode, even if the device is capable of 24bit colors.

ICS automaticly adds gradient effect if hardware acceleration is enabled in application. It is also possible to force hardware acceleration for all apps, you will notice that some apps will have gradient background, instead of black.

Jave

I saw your comment that using PixelFormat.RGBA_8888 didn't help.
You can also try adding the dither flag: window.addFlags(WindowManager.LayoutParams.FLAG_DITHER);.
You can see my previous related answer about dithering and colours here:
Awful background image quality in Android

Just verified on ICS 4.0.3 device: this is emulator ONLY problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!