在使用渐变作为背景的时候会出现抖动不清楚的问题如
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#3A3C39"
android:endColor="#181818"
android:angle="270"
/>
<corners android:radius="0dp" />
</shape>
android:background="@drawable/shape_background_grey"
如果出现上述问题如要
listView.getBackground().setDither(true);
本文介绍了一种解决在使用渐变背景时出现的抖动现象的方法。通过设置listView.getBackground().setDither(true);可以有效改善渐变背景在不同设备上显示不清晰的情况。
320

被折叠的 条评论
为什么被折叠?



