When I scroll the ListView, the background image is not displayed. Why?
I have one custom ListView which contains one ImageView and one TextView, and I set a background. But while I am scrolling the ListView, the background image is n开发者_如何学编程ot displayed. How can I fix this?
Black color is display.
Set the following property in your ListView in the layout file.
android:cacheColorHint="#00000000"
That will make it so that when you scroll the background image shows up correctly.
Use this: listview.setCacheColorHint(0);
精彩评论