Leg*_*end 6 android listview transparent flicker
出于某种原因,每当我滚动浏览项目列表时,listview中的背景就会消失并重新出现,从而产生一种我不想要的"闪烁"效果.我已尝试过以下建议:如何在Android中使ListView透明?但由于某种原因它不起作用.有什么建议?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/screenLayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:background="@color/title_background"
android:text="@string/whatsnew_title"
>
</TextView>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
</ListView>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
mer*_*nen 21
你有android:cacheColorHint="#00000000"吗?这是拟议修复中最重要的部分.我刚试过你的代码(显然不是一个精确的复制,因为你正在使用对项目特定资源的引用),它似乎有效.
Android开发者博客上的这篇文章应该是您感兴趣的.
| 归档时间: |
|
| 查看次数: |
8202 次 |
| 最近记录: |