Remove the black background in a Scroll

José Castro
Devsys
Published in
1 min readMay 31, 2017

When you do a Scroll in a ListView, the background color turns black and that is not desired.

To change or remove that background color, you need to go into the XML where exists your ListView and add it the next attribute:

android:cacheColorHint="#00000000"

You can change for any color, but the ‘00’ before the color make it transparent.

Here’s the why: https://android-developers.googleblog.com/2009/01/why-is-my-list-black-android.html

--

--