Skip to content

Instantly share code, notes, and snippets.

Created November 13, 2012 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4069019 to your computer and use it in GitHub Desktop.
Save anonymous/4069019 to your computer and use it in GitHub Desktop.
getListView().setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (scrollState == SCROLL_STATE_TOUCH_SCROLL) {
Log.d(TAG, "startMethodTracing");
Debug.startMethodTracing("fuelomat");
return;
}
if (scrollState == SCROLL_STATE_IDLE || scrollState == SCROLL_STATE_FLING) {
Log.d(TAG, "stopMethodTracing");
Debug.stopMethodTracing();
return;
}
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment