Monday, August 24, 2015

[Android][Solved with image] ListView Background becomes strange color when scrolling

This is the original color, the background is black, text in white.

However, if you scroll the screen, the ListView,
background of listView would change to some strange color.
(For my case, to white, but my text are in white)


android:scrollingCache="false"

If disable the scrollingCache,
works but found it would be quite slow .
About the reason why is cos scrolling Cache helped to cache the
http://android-developers.blogspot.hk/2009/01/why-is-my-list-black-android.html

For me, i would more suggest using set cacheColorHint to transparent so that the strange color i memtioned at title won't affect your layout.

android:cacheColorHint="#00000000"


Reference.
http://stackoverflow.com/questions/2833057/background-listview-becomes-black-when-scrolling

No comments :

Post a Comment