1

I am using a custom title bar and a LinearLayout inside a ScrollView below it. I see this strange white color while I scroll above or below. Images attached. Normal view

Strange White color as soon as white background scrolls towards the custom title bar. Image below. Strange White color as soon as white background scrolls towards the custom title bar

How do I get rid of this white color, it also shows at the bottom of the layout. FYI, I am using Theme.Light.

Update: I get the same effect even at the bottom of the layout and it is more pronounced when the color in the foreground is white.

PravinCG
  • 7,688
  • 3
  • 30
  • 55

3 Answers3

2

I had this same problem and it was driving me nuts. It's because the theme has a "dropshadow" by default, create a style and set it as the theme:

Style:

  <style name="ThemeNoDropshadow" parent="@android:style/Theme.Light">
    <item name="android:windowContentOverlay">@null</item>
  </style>

App manifest:

  <application android:theme="@style/ThemeNoDropshadow" ...>
dmon
  • 30,048
  • 8
  • 87
  • 96
1

I think I found the actual solution while looking into something else (serendipity!). Anyway, add this property in your view layout definition:

android:fadingEdge="none"
dmon
  • 30,048
  • 8
  • 87
  • 96
0

It's the cacheColorHint, assign it transparent if you want to get rid of it, as a property of the ListView.

Annoyed me too, and I never have it.

android:cacheColorHint="#0000"

HTH


edit: How to set the color of an Android ScrollView fading edge?

Community
  • 1
  • 1
ataulm
  • 15,195
  • 7
  • 50
  • 92
  • The answer is correct for listView though what I am using is not a listview. It is a layout under scrollview and scrollview does not have this property. – PravinCG May 24 '11 at 15:14
  • see updated answer for link to another q with a similar issue – ataulm May 25 '11 at 14:28