This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//snippet from library module | |
android { | |
defaultPublishConfig "productionRelease" | |
publishNonDefault true | |
productFlavors { | |
alpha { | |
} | |
production { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package utils; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import java.lang.reflect.Field; | |
/** | |
* The utility class with reflection convenient methods. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply from: "$rootDir/coverage.gradle" | |
//... | |
android { | |
//... | |
buildTypes { | |
//... | |
debug { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HorizontalOverScrollView extends HorizontalScrollView { | |
private static final int WIDTH_DEVIDER_OVERSCROLL_DISTANCE = 3; | |
private TimeInterpolator mInterpolator; | |
private int mMaxOverscrollDistance; | |
private int mAnimTime; | |
private long mStartTime; | |
/** | |
* Instantiates {@link HorizontalOverScrollView} object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Reset routing table on OSX | |
# display current routing table | |
echo "********** BEFORE ****************************************" | |
netstat -r | |
echo "**********************************************************" | |
for i in {0..4}; do | |
sudo route -n flush # several times |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The {@link IoToMainThreadTransformers} is a factory of convenient Rx transformers to use with {@link | |
* io.reactivex.Observable#compose(ObservableTransformer)} operator to transform observable via | |
* apply {@link io.reactivex.Observable#subscribeOn(Scheduler)} operator with the {@link | |
* Schedulers#io()} and {@link io.reactivex.Observable#observeOn(Scheduler)} operator with the | |
* {@link AndroidSchedulers#mainThread()}. | |
*/ | |
public final class IoToMainThreadTransformers { | |
private IoToMainThreadTransformers() { |
OlderNewer