Library project for Android. The scope is to nicely animate a view according to the scroll status of a listview.
For example It can be used to go on top of a list.
It's a library project (it's possible to use directly the jar).
rotatingHelper = new ListViewRotatingHelper(moveList, myScrollListener); //myScrollListener can be null if you don't use any listener on the listview
listView.setOnScrollListener(rotatingHelper);
moveList.setOnClickListener(new OnClickListener() { //the view you are passing to the ListViewRotatingHelper
public void onClick(View v) {
if(rotatingHelper.isUp()) //If the first elements are shown, just go down with the list
listView.smoothScrollBy(500,500);
else
listView.smoothScrollToPosition(0, 0); //Otherwise go up to the first element of the listview
}
});
It's free to use it, just add a reference to this github project.