I have a ScrollView
with an image in it.
I want the edges of the ScrollView
to make a fade effect when I scroll the image.
I\'m not talking
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">
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);
Add these lines in your ScrollView xml code.
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadeScrollbars="true"
android:requiresFadingEdge="vertical"
android:fadingEdgeLength="50dp">