How to get rid of the overscroll glow

前端 未结 3 1036
梦如初夏
梦如初夏 2020-12-15 16:39

I have a listview with overscroll mode on - (I need it on)

And there is a blue overscroll glow everytime I overscroll

how do I get rid of the overscroll glow

相关标签:
3条回答
  • 2020-12-15 17:17

    You just need to set your ListView property fadeEdge to none in your layout xml file and you will not get the shadow blue on OVERSCROLL.

    android:fadingEdge="none"

    EDIT:

    this is now deprecated, you can use android:overScrollMode="never" instead.

    0 讨论(0)
  • 2020-12-15 17:23

    In the ListView you can set the drawable when overscrolling on top or bottom. This is usually set to a white/transparent drawable that is animated with fadeIn and fadeOut. To set the glowing to something fully transparent you can write:

    ListView listView = ...;
    listView.setOverscrollFooter(new ColorDrawable(0));
    listView.setOverscrollHeader(new ColorDrawable(0));
    

    This keeps the overscroll itself active, so that you can react on overscrolling events, but the glowing should be gone.

    0 讨论(0)
  • 2020-12-15 17:25
    android:overScrollMode="never"
    
    0 讨论(0)
提交回复
热议问题