hacer que el borde del scrollview se desvanezca al desplazarse en Android
Tengo un ScrollView
con una imagen en él.
Quiero que los bordes de la ScrollView
para hacer un efecto de desvanecimiento cuando me desplazo la imagen.
No estoy hablando del efecto que obtienes cuando llegas al final del pergamino. Quiero que el fade siempre exista.
Eso es lo que hice (sin hacer ningún efecto):
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.84"
android:background="@drawable/screen_nespresso"
android:fadingEdge="horizontal"
android:fadingEdgeLength="@dimen/padding_large"
android:fillViewport="false"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:visibility="visible" >
Gracias!
32
2 answers
No estoy seguro si esto funciona, pero esto es lo que funcionó para mí:
<ScrollView android:requiresFadingEdge="vertical">
Y en su código, puede hacer lo siguiente
ScrollView scroll = findById(); scroll.setFadingEdgeLength(150);
74
Author: Akshat,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-05-24 00:31:08
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-05-24 00:31:08
Esto es para horizental:
<HorizontalScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:requiresFadingEdge="horizontal"
android:fadingEdgeLength="80dp">
0
Author: batsheva,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-07-13 05:58:24
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-07-13 05:58:24