Remove shadow from top and bottom of ListView in android?

I'm assuming you're talking about the fading edges. To disable them:

android:fadingEdge="none"

or

listView.setVerticalFadingEdgeEnabled(false);

UPDATE

As Pim Reijersen pointed out in the comments, android:fadingEdge is deprecated and will be ignored as of API level 14. Please use:

android:fadingEdgeLength="0dp"

android:fadingEdgeLength was not worked for me I used and worked well with android:overScrollMode="never"

Add android:overScrollMode="never" to your ScrollView


Use this in your XML ScrollView:

android:overScrollMode="never"

You can set to "always", "never", or "ifContentScrolls".


It's work for me

android:fadeScrollbars="false"
android:fadingEdge="none"
android:fadingEdgeLength="0dp"
android:cacheColorHint="#00000000"
android:overScrollMode="never"

try below code snippet

listView.setVerticalFadingEdgeEnabled(false);