Skip to content

Instantly share code, notes, and snippets.

public class GA {
private static volatile GA sInstance;
public static GA from(Context context) {
if (sInstance == null) {
synchronized (GA.class) {
if (sInstance == null) {
sInstance = new GA(context);
}
@ekzee
ekzee / QuickReturnListView
Last active August 29, 2015 14:08
simple implementation of quick return pattern for android listview
public class QuickReturn implements AbsListView.OnScrollListener {
public static QuickReturn apply(ListView listView, View targetView){
return new QuickReturn(listView, targetView);
}
private final ListView mListView;
private final View mTargetView;
private AbsListView.OnScrollListener mOnScrollListener;