Skip to content

Instantly share code, notes, and snippets.

Avatar

Vitaliy ultraon

View GitHub Profile
@ultraon
ultraon / HandledClickUrlTextView.java
Last active Jun 15, 2016
The HandledClickUrlTextView is an extended TextView for supporting custom handler for link clicks
View HandledClickUrlTextView.java
package presentation.view;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
@ultraon
ultraon / build.gradle
Last active Mar 30, 2016
Example for building android library module (in project) with custom variant
View build.gradle
//snippet from library module
android {
defaultPublishConfig "productionRelease"
publishNonDefault true
productFlavors {
alpha {
}
production {
}
@ultraon
ultraon / RuntimeTypeAdapterFactory.java
Last active May 23, 2017
RuntimeTypeAdapterFactory with fixed issue: com.google.gson.JsonParseException
View RuntimeTypeAdapterFactory.java
/*
* Copyright (C) 2011 Google Inc.
*
* 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
@ultraon
ultraon / ChildrenViewStateHelper.java
Last active Aug 3, 2016
Example of ChildrenViewStateHelper for saving view states with the same id in ViewGroup
View ChildrenViewStateHelper.java
package mypackage.presentation.utils.view;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.SparseArray;
import android.view.ViewGroup;
public class ChildrenViewStateHelper {
You can’t perform that action at this time.