Skip to content

Instantly share code, notes, and snippets.

Avatar
❤️
Full Stacked.

Sarasranglt Sarasranglt

❤️
Full Stacked.
View GitHub Profile
@cnnrhill
cnnrhill / ListViewScrollTracker.java
Created Sep 24, 2013
Helper class for calculating relative scroll offsets in a ListView or GridView by tracking the position of child views.
View ListViewScrollTracker.java
import android.util.SparseArray;
import android.widget.AbsListView;
/**
* Helper class for calculating relative scroll offsets in a ListView or GridView by tracking the
* position of child views.
*/
public class ListViewScrollTracker {
private AbsListView mListView;
private SparseArray<Integer> mPositions;