Here I'm trying to scroll a GridView
automatically top to bottom and as it comes to last item scroll it back to top from bottom using smoothScrollToPosition
but its very fast. The code is :
homeGridView.postDelayed(new Runnable() {
public void run() {
// ObjectAnimator.ofInt(homeGridView, "scrollY", homeGridView.getCount()-1).setDuration(1000).start();
homeGridView.smoothScrollToPosition(homeGridView.getCount() - 1);
homeGridView.postDelayed(new Runnable() {
public void run() {
// ObjectAnimator.ofInt(homeGridView, "scrollY", 0).setDuration(1000).start();
homeGridView.smoothScrollToPosition(0);
}
}, 1000);
}
}, 1000);
Now I just want to know that how can I decrease speed of this scroll or something better this.