Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom ListView background problem

I have a LinearLayout layout with a ListView in it. I've made the android:background of the LinearLayout (I've also tried it on the ListView) be an image that I would like for my background.

This works fine enough. However, when I start scrolling through the ListView, the background often disappears and becomes black. If I move it around some more I may be able to get it to appear again. It would seem that Android is drawing over, or perhaps painting what's behind my background onto the items.

Any ideas/solutions?

like image 583
Andrew Avatar asked Oct 13 '10 20:10

Andrew


Video Answer


1 Answers

android:cacheColorHint="#00000000" on your listview More info is here http://www.curious-creature.org/2008/12/22/why-is-my-list-black-an-android-optimization/

like image 159
Alex Volovoy Avatar answered Sep 22 '22 23:09

Alex Volovoy