Is there a way to disable/edit the fading that a list view has at its edges?
Solution 1
I can't actually test it right now, but I believe fadingEdge is what you're looking for:
android:fadingEdge="none"
or
listView.setVerticalFadingEdgeEnabled(false);
http://developer.android.com/reference/android/view/View.html#setVerticalFadingEdgeEnabled(boolean)
Solution 2
In case someone finds this via Google:
As mentioned, android:fadingEdge
is deprecated. Use this instead:
android:overScrollMode="never"
Solution 3
Late answer, but at this point to maintain backwards compatibility with API 13 and below, use both android:requiresFadingEdge="none"
and android:fadingEdge="none"
together.
cottonBallPaws
Updated on April 15, 2020Comments
-
cottonBallPaws about 4 years
Scrollable views such as the ListView have a fade out of the content along the edges where there is more content in that direction. How can I turn this fading off? I know you can change the cacheColorHint as discussed here: http://developer.android.com/resources/articles/listview-backgrounds.html but that is not what I am looking for and will not achieve what I am looking for in this case.
I want to disable the fade completely or be able to reduce the size and or transparency of it. Is this possible?
-
cottonBallPaws over 13 yearsThat did it! Thank you. Also, I see there is a field called android:fadingEdgeLength for controlling the length of the fade. Thanks again.
-
Warpzit almost 12 yearsIt should be noted that fadingedges is disabled per default for all scrollviews from ice cream sandwich and henceforth (commonsware.com/blog/2011/10/19/…)
-
Kevin Coppock almost 12 yearsHeh, funny that this answer comes back to help ME. Thanks @Warpzit, I was actually wondering yesterday why my fading edge wasn't working on ICS. :)
-
Warpzit almost 12 years@kcoppock heh well I figured it out because I was wondering why fadingedge was deprecated :) Glad it already helped someone :D
-
tomrozb over 10 yearsThe only solution that worked for me on 4.3. All the suggestions above simply don't work.
-
speedynomads over 10 yearsThe accepted answer is out of date. This is the correct solution.
-
Suvitruf - Andrei Apanasik almost 10 yearsIf i need disable fadingEdge but without disabling OverScroll?
-
Adib Faramarzi over 9 yearsthis solution should be accepted , its the preferred way to do it.
-
kit about 6 yearsWorks for RecyclerView too, tested