android - ScrollView, smooth scroll listener -
i need listen scroll of scrollview
. in order extended scrollview overriding onscrollchanged(int, int, int, int)
.
when view scrolls move view along scroll, , ok. when release view while scrolling, scrollview still scrolls inertia effect (smooth scroll). problem that, after release, method onscrollchanged
called after view invalidated, effect view moved after small delay ugly effect.
in order avoid disable smooth scroll scrollview. but, there way listening smooth scroll , continuing moving view during residual scroll?
i didn't test it's different way of getting scroll position change.
scrollview.getviewtreeobserver().addonscrollchangedlistener(listener);
this listener simple interface:
public void onscrollchanged(){ scrollview.getscrolly(); // value here }
Comments
Post a Comment