I use a linear background (xml shape) as the actionbar background in android 4.0. It does not display well, looks banded.
How to make it render smooth?
I use a linear background (xml shape) as the actionbar background in android 4.0. It does not display well, looks banded.
How to make it render smooth?
First, I'm assuming you're using the default RGBA_8888
pixel format (default as of Android 2.3). Second, on some displays gradients render poorly. One workaround is to overlay a small bit of noise over the gradient (a repeating semi-transparent noise texture in drawable-nodpi
should do) using a <layer-list>
drawable.
Is it a repeating pattern (tiled) or a nine patch? ICS is having some issues with certain types of rendering since it is by default drawing using hardware acceleration which makes it impossible to use some drawing techniques (specially when Drawables) and generates undesired results with some others. You can see some explanation and a list here.
Fortunately there are solutions or workarounds to most of them. Just need to know which exact kind of element are you using to draw your background.
Try increasing
PixelFormat
quality of a window:This is possibly a duplicate of this question.