androidlistviewscreengradientnexus-4

Unexpected screen gradient in ListView


I have a ListView with some rows and a custom checkbox on the right hand side. On my OS 4.4 Nexus 4 it seems like a gentle gradient is being applied to the list row backgrounds, creating an ugly artifact on the checkboxes (they disappear half way down, and then invert for the bottom half). On other devices I don't see this problem, and I also don't see it in an OS 4.4.2 emulator.

I haven't been able to find any information online about this, so I'm not sure if it's specific to the device, or the exact OS flavor.

Is this something I can disable? If not, what advice should I give my asset designer?

Here's a screenshot:

screen gradient


Solution

  • As Denley mentioned, the reason for this is the default background specified by the Holo.Light theme. However, since this background is specifically affecting your ListView, I would suggest setting the background of your ListView in your xml file. Code below.

    <ListView
        android:background="@android:color/white">