How to get rid of the overscroll glow

前端 未结 3 1045
梦如初夏
梦如初夏 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: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.

提交回复
热议问题