Is there a way to disable/edit the fading that a list view has at its edges?

后端 未结 4 706
难免孤独
难免孤独 2020-12-28 14:28

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

相关标签:
4条回答
  • 2020-12-28 14:34

    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)

    0 讨论(0)
  • 2020-12-28 14:42

    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.

    0 讨论(0)
  • 2020-12-28 14:51

    In case someone finds this via Google:

    As mentioned, android:fadingEdge is deprecated. Use this instead:

    android:overScrollMode="never"
    
    0 讨论(0)
  • 2020-12-28 14:55

    If you targetSdkVersion >= 14 than there will be no fading edges.

    android:requiresFadingEdge
    

    can help you to get them back.

    source

    0 讨论(0)
提交回复
热议问题