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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -