Strange White color at top and bottom of layout
I am using a custom title bar and a LinearL开发者_如何学运维ayout inside a ScrollView below it. I see this strange white color while I scroll above or below. Images attached.
Strange White color as soon as white background scrolls towards the custom title bar. Image below.
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.
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" ...>
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"
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?
精彩评论