Skip to content

Instantly share code, notes, and snippets.


Arthur ArthurSav

View GitHub Profile
ArthurSav / build.gradle
Created Feb 15, 2018
Increment version number and update version name on your android builds automatically. Version name is generated by the last tag on your git commits.
View build.gradle
apply from: 'versions.gradle'
android {
defaultConfig {
versionName VERSION_NAME
versionCode VERSION_CODE.toInteger()
buildTypes {
release {}
ArthurSav /
Created May 16, 2016 — forked from swankjesse/
This OkHttp application interceptor will replace the destination hostname in the request URL.
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
/** An interceptor that allows runtime changes to the URL hostname. */
public final class HostSelectionInterceptor implements Interceptor {
private volatile String host;
ArthurSav /
Created Sep 11, 2015
GridLayoutManager with working wrap_content.
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
public class WrappableGridLayoutManager extends GridLayoutManager {
You can’t perform that action at this time.