disable listview overscroll on samsung android

2020-06-04 04:58发布

I need to totally disable overscroll in my listviews so I can implement my own overscroll functionality.

Seems to be simple enough when looking at the core listview classes, just by setting the overscroll mode to OVERSCROLL_NEVER. This doesn't do anything on my Samsung Galaxy s2. I have also tried to overwrite the overScrollBy function to do nothing. That doesn't work either.

Has anyone had much experience with samsung ListView customizations that can help me?

4条回答
smile是对你的礼貌
2楼-- · 2020-06-04 05:21
Deceive 欺骗
3楼-- · 2020-06-04 05:34

New RecyclerView can be used instead of ListView to tackle the problem.

查看更多
趁早两清
4楼-- · 2020-06-04 05:39

Not my solution but check out https://gist.github.com/DHuckaby/3919939. Works for me. Stupid Samsung

查看更多
爷、活的狠高调
5楼-- · 2020-06-04 05:48

How about below code:

@Override
protected float getTopFadingEdgeStrength() {
    return 0.0f;
}

@Override
protected float getBottomFadingEdgeStrength() {
    return 0.0f;
}

Answer inspired from @cdhabecker Android ScrollView fading edge

查看更多
登录 后发表回答