making the edge of the scrollview fade when scrolling in android

I am not sure if you this working, but here is what worked for me:

<ScrollView android:requiresFadingEdge="vertical">

and in your code, you can do the following

ScrollView scroll = findById(); scroll.setFadingEdgeLength(150);

this is for horizontal:

<HorizontalScrollView
    android:id="@+id/scroll"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:requiresFadingEdge="horizontal"
    android:fadingEdgeLength="80dp">