【问题标题】:Custom gradient actionbar background, not display well, need dither自定义渐变actionbar背景,显示不好,需要dither
【发布时间】:2012-05-14 05:42:00
【问题描述】:
我使用线性背景(xml 形状)作为 android 4.0 中的操作栏背景。显示不好,看起来有条纹。
如何使其渲染平滑?
【问题讨论】:
标签:
android
gradient
android-actionbar
dithering
【解决方案2】:
尝试提高PixelFormat 窗口的质量:
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
getWindow().setFormat(PixelFormat.RGBA_8888);
}
这可能与this question 重复。
【解决方案3】:
它是重复图案(平铺)还是九个补丁?
ICS 在某些类型的渲染方面存在一些问题,因为默认情况下它使用硬件加速进行绘图,这使得无法使用某些绘图技术(特别是在 Drawables 时)并与其他一些技术产生不希望的结果。你可以看到一些解释和list here。
幸运的是,其中大多数都有解决方案或解决方法。只需要知道您使用哪种元素来绘制背景。