3

I'm utilizing a simple listview and want to fade one edge, not two or four as I'm currently experiencing using:

<ListView
    android:id="@+id/main_feed"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:requiresFadingEdge="vertical"
    android:fadingEdgeLength="50dp" >
</ListView>

I want to only fade one edge (the bottom edge), but doing either 'vertical' or 'horizontal' in requiresFadingEdge fades top/bottom or left/right, respectively.

Any Suggestions?

Nikhil
  • 91
  • 1
  • 8

1 Answers1

5

I know this is an old question, but I found a way to do this. Just make your own class that extends ListView and override the method getTopFadingStrength() like this:

@Override
protected float getTopFadingEdgeStrength() {
    return 0;
}

This will remove the fading on the top, but keep the fading on the bottom, then in your XML just use your ListView implementation.