I know the we can turn off the overscroll via overscroll mode. But how do i control it in a way the that bottom has the overscroll effect while the top doesn't has the overscroll effect in a scroll view?
Asked
Active
Viewed 1,456 times
2
-
I think you can't, as you can only allow it or disable it at all. – Muhammed Refaat May 23 '16 at 12:44
1 Answers
0
There are one method in ScrollView
class called getBottomFadingEdgeStrength()
so you can create a Class that extends ScrollView
and override the above method.
like
/**
* Created by droidwithme on 23/05/16.
*/
public class MyScrollView extends ScrollView {
public MyScrollView(Context context) {
super(context);
}
public MyScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected float getBottomFadingEdgeStrength() {
return 0.0f;
}
}
and return a 0 to this method.
this may help you.

Devendra Singh
- 2,343
- 4
- 26
- 47