disable listview overscroll on samsung android

2020-06-04 05:20发布

问题:

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?

回答1:

Try this setOverScrollMode (int mode).. check this link out: http://developer.android.com/reference/android/widget/AbsListView.html#setOverScrollMode(int)



回答2:

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



回答3:

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



回答4:

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