Skip to content

Instantly share code, notes, and snippets.

View captrespect's full-sized avatar

Jonathon Roberts captrespect

  • Arkos Health
  • Pittsburgh, PA
View GitHub Profile
@captrespect
captrespect / OnTotalScrolledListener.java
Last active August 29, 2015 14:14
Adds the total amount scrolled to a OnScrollListener for a ListView.
public abstract class OnTotalScrolledListener implements AbsListView.OnScrollListener {
private List<Integer> mHeights = new ArrayList<>();
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
View c = view.getChildAt(0);
if (c != null) {