2

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?

Muhammed Refaat
  • 8,914
  • 14
  • 83
  • 118
Zhein
  • 21
  • 2

1 Answers1

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