Skip to content

Instantly share code, notes, and snippets.

View J1aDong's full-sized avatar

J1aDong J1aDong

View GitHub Profile
@miao1007
miao1007 / build.gradle
Created September 3, 2015 11:54
Retrofit 2.0 RxJava Sample
dependencies {
compile 'io.reactivex:rxjava:1.0.12'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.retrofit:retrofit:2.0.0-beta1'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
compile 'com.squareup.retrofit:adapter-rxjava:2.0.0-beta1'
}
package com.segmentfault.app.view;
import android.content.Context;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.NestedScrollingChild;
import android.support.v4.view.NestedScrollingChildHelper;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.AttributeSet;
import android.view.MotionEvent;
@darnmason
darnmason / HeaderViewRecyclerAdapter.java
Last active March 21, 2020 17:19
RecyclerView adapter designed to wrap an existing adapter allowing the addition of header views and footer views.
/*
* Copyright (C) 2014 darnmason
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing