I have one ScrollView
with one LinearLayout
with TextView
s. I want to detect when ScrollView
is scrolling up or down to hide/show ActionBar
.
you need to create a class that extends ScrollView
public class ExampleScrollView extends ScrollView
and then Override onScrollChanged
that gives you the old and new scroll positions and from there you can detect which direction
protected void onScrollChanged(int l, int t, int oldl, int oldt)