If you are using a ListView for your Android Application and you have set a Custom Layout for it, where you have changed the default background for it, then you may face the issue of either Screen turning black while scrolling or flickering colours while you scroll.
In order to resolve this issue all you need to do is add the following attribute to the ListView tag in the Layout.xml.



android:cacheColorHint="#00000000"
As android:cacheColorHint is set to a transparent colour, you may not face the issue of list turning black or flicker of colours anymore.
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!