Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fading at the bottom of a scrollable list on Android?

I have a long ListView with a white background (android:background="@android:color/white") and transparent cache color (android:cacheColorHint="#00000000"). Two questions:

  1. I am testing on a variety of devices. On older ones, the fade works fine. But on the newer ones, I am not seeing any fade at all, just a sharp cutoff. Why might that be and how do I fix it?

  2. A lot of the times the elements in my list line up so that there is just enough whitespace at the bottom, that the fade doesn't reach the text and is not visible. Is there a way to make the fade cover more of the list?

like image 210
Kalina Avatar asked Sep 21 '12 17:09

Kalina


1 Answers

Found my own answers:

  1. android:requiresFadingEdge="vertical"
  2. android:fadingEdgeLength="48dp"

EDIT: changing to dp instead of sp

like image 131
Kalina Avatar answered Sep 23 '22 00:09

Kalina