Skip to content

Instantly share code, notes, and snippets.

View cnnrhill's full-sized avatar

cnnr cnnrhill

View GitHub Profile
@donnfelker
donnfelker / OrderActivity.java
Last active November 22, 2019 23:46
RxJava Bound Service AIDL Abstraction
package com.donnfelker.rxexample;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import rx.Subscriber;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
@cnnrhill
cnnrhill / ListViewScrollTracker.java
Created September 24, 2013 04:24
Helper class for calculating relative scroll offsets in a ListView or GridView by tracking the position of child views.
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;