Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ScrollView with transparency on top and bottom

I'm using a vertical ScrollView in Android.

I need to add transparency on the top and the bottom of the ScrollView such that its contents appear disappear gradually.

Thanks.

like image 899
Hamzeh Soboh Avatar asked Nov 30 '13 19:11

Hamzeh Soboh


2 Answers

You just need to add the attributes

android:requiresFadingEdge="vertical"
android:fadingEdgeLength="25dp"
like image 127
Distwo Avatar answered Nov 05 '22 21:11

Distwo


Use the attribute android:fadingEdgeLength="15.5sp" The length specified will be applied to both top and bottom of the ScrollView

like image 26
Joel Fernandes Avatar answered Nov 05 '22 22:11

Joel Fernandes