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 2013 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
import android.view.View; | |
import android.view.ViewGroup; | |
/** | |
* A {@link ViewGroup.OnHierarchyChangeListener hierarchy change listener} which recursively | |
* monitors an entire tree of views. | |
*/ | |
public final class HierarchyTreeChangeListener implements ViewGroup.OnHierarchyChangeListener { | |
/** | |
* Wrap a regular {@link ViewGroup.OnHierarchyChangeListener hierarchy change listener} with one |
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 Pager<I, O> { | |
private static final Observable FINISH_SEQUENCE = Observable.never(); | |
private PublishSubject<Observable<I>> pages; | |
private Observable<I> nextPage = finish(); | |
private Subscription subscription = Subscriptions.empty(); | |
private final PagingFunction<I> pagingFunction; | |
private final Func1<I, O> pageTransformer; |
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
import android.animation.TypeEvaluator; | |
import android.animation.ValueAnimator; | |
import static java.lang.Math.pow; | |
public class GammaEvaluator implements TypeEvaluator { | |
private static final GammaEvaluator instance = new GammaEvaluator(); | |
/** |
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 2016 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
import java.io.File; | |
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.Locale; | |
import java.util.TimeZone; | |
import okio.BufferedSource; | |
import okio.ByteString; |
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
fun View.visible() { | |
visibility = View.VISIBLE | |
} | |
fun View.invisible() { | |
visibility = View.INVISIBLE | |
} | |
fun View.gone() { | |
visibility = View.GONE |
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 me.seebrock3r.utils | |
import android.os.Build.VERSION_CODES.JELLY_BEAN_MR1 | |
import android.os.Build.VERSION_CODES.JELLY_BEAN_MR2 | |
import android.os.Build.VERSION_CODES.KITKAT | |
import android.os.Build.VERSION_CODES.LOLLIPOP | |
import android.os.Build.VERSION_CODES.LOLLIPOP_MR1 | |
import android.os.Build.VERSION_CODES.M | |
import android.os.Build.VERSION_CODES.N | |
import org.assertj.core.api.Assertions.assertThat |