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 junit.framework.Assert; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import java.io.File; | |
import java.util.UUID; | |
import java.util.concurrent.TimeUnit; | |
import okhttp3.Cache; |
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.content.Context | |
import android.graphics.Color | |
import android.graphics.RadialGradient | |
import android.graphics.Shader | |
import android.graphics.drawable.PaintDrawable | |
import android.graphics.drawable.ShapeDrawable | |
import android.graphics.drawable.shapes.RectShape | |
import android.util.AttributeSet | |
import android.view.Gravity.* | |
import android.widget.FrameLayout |
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.content.Context | |
import android.support.v4.view.ViewCompat | |
import android.support.v4.widget.ViewDragHelper | |
import android.util.AttributeSet | |
import android.view.MotionEvent | |
import android.view.View | |
import android.widget.FrameLayout | |
class SwipeView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : FrameLayout(context, attrs, defStyleAttr) { |
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 AnimationUtils { | |
private static final int SLIDE_DURATION = 150; | |
private static final int FADE_DURATION = 100; | |
private static final ArrayMap<View, ObjectAnimator> showing = new ArrayMap<>(); | |
private static final ArrayMap<View, ObjectAnimator> hiding = new ArrayMap<>(); | |
private AnimationUtils() { | |
} |
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 MultiSelectItemAnimator extends DefaultItemAnimator { | |
private static final long DURATION = 150; | |
private final ArrayMap<RecyclerView.ViewHolder, AnimatorInfo> animatorMap = new ArrayMap<>(); | |
private final Animator.AnimatorListener resetListener = new ViewObjectAnimatorListener() { | |
@Override | |
public void onAnimationEnd(Animator animation, View view) { | |
view.setTranslationX(0f); | |
} |
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.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.text.style.ReplacementSpan; | |
public class CircleTextSpan extends ReplacementSpan { | |
private final int backgroundColor; | |
private final int textColor; |
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) 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 |