I have a long text with several lines. I want to wrap a TextView inside a ScrollView so that the ScrollView edge ScrollView TEMPORARY alpha gradient of the TextView when the user scrolls the text. Attenuation does not appear at all.
I intentionally set a high value for the height of the TextView , but it does not yet work with this, nor with WRAP_CONTENT or even MATCH_PARENT .
<ScrollView android:layout_width="match_parent" android:layout_height="300dp" android:requiresFadingEdge="vertical" android:fadingEdgeLength="200dp"> <TextView android:layout_width="match_parent" android:layout_height="1000dp" android:text="He has been involved with various online encyclopedia projects.[7]\nHe is the former editor-in-chief of Nupedia,[8] chief organizer (2001–02) of its successor, Wikipedia,[9] and founding editor-in-chief of Citizendium.[10]\nFrom his position at Nupedia, he assembled the process for article development.[11] Sanger proposed implementing a wiki, which led directly to the creation of Wikipedia.[12]\nInitially Wikipedia was a complementary project for Nupedia.[12]" android:id="@+id/textView" android:textSize="20sp" android:textAlignment="gravity" android:gravity="center_horizontal"/> </ScrollView>
All I could achieve was to remove the ScrollView and get a constant alpha gradient on the TextView

source share