开发者

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);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜