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.Canvas | |
import android.graphics.Rect | |
import android.os.Build | |
import android.util.AttributeSet | |
import android.view.View | |
import java.util.* | |
/** | |
* @author Drakeet Xu |
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
-ignorewarnings | |
-keep public class * extends android.os.Binder | |
-keepclassmembers enum * { | |
**[] $VALUES; | |
public *; | |
} | |
-keepclassmembers class * { | |
public <init> (org.json.JSONObject); | |
} |
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
// Copied from https://github.com/ToxicBakery/ViewPagerTransforms | |
@SuppressWarnings("WeakerAccess") | |
public abstract class BaseTransformer implements PageTransformer { | |
public static final float DAMPING_RATIO_NO_BOUNCY = 1f; | |
/** | |
* Called each {@link #transformPage(View, float)}. | |
* | |
* @param view the view |
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
# This is a configuration file for ProGuard. | |
# http://proguard.sourceforge.net/index.html#manual/usage.html | |
# | |
# Starting with version 2.2 of the Android plugin for Gradle, this file is distributed together with | |
# the plugin and unpacked at build-time. The files in $ANDROID_HOME are no longer maintained and | |
# will be ignored by new version of the Android plugin for Gradle. | |
#-dontusemixedcaseclassnames | |
-dontskipnonpubliclibraryclasses | |
-verbose |
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
-assumenosideeffects class kotlin.jvm.internal.Intrinsics { | |
static void checkParameterIsNotNull(java.lang.Object, java.lang.String); | |
static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String); | |
static void checkNotNullExpressionValue(java.lang.Object, java.lang.String); | |
static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String); | |
static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String); | |
static void checkFieldIsNotNull(java.lang.Object, java.lang.String, java.lang.String); | |
static void checkFieldIsNotNull(java.lang.Object, java.lang.String); | |
static void checkNotNull(java.lang.Object, java.lang.String); | |
static void checkNotNullParameter(java.lang.Object, java.lang.String); |
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
-assumenosideeffects class kotlin.jvm.internal.Intrinsics { | |
static void checkParameterIsNotNull(java.lang.Object, java.lang.String); | |
static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String); | |
static void checkNotNullExpressionValue(java.lang.Object, java.lang.String); | |
static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String); | |
static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String); | |
static void checkFieldIsNotNull(java.lang.Object, java.lang.String, java.lang.String); | |
static void checkFieldIsNotNull(java.lang.Object, java.lang.String); | |
static void checkNotNull(java.lang.Object, java.lang.String); | |
static void checkNotNullParameter(java.lang.Object, java.lang.String); |
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.support.v7.widget.RecyclerView | |
/** | |
* @author drakeet | |
*/ | |
class QuickReturnDelegate(private val scrollSlop: Int = 12) : RecyclerView.OnScrollListener() { | |
private lateinit var callback: (hide: Boolean) -> Unit | |
private var scrollY: Int = 0 |
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
### Keybase proof | |
I hereby claim: | |
* I am drakeet on github. | |
* I am drakeet (https://keybase.io/drakeet) on keybase. | |
* I have a public key ASCtsAYEK4FBAGci9LMr_H8U7MURxIVrbnVqfgzSUCyzpgo | |
To claim this, I am signing this 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
-ignorewarnings | |
-keep public class * extends android.os.Binder | |
-keepclassmembers enum * { | |
**[] $VALUES; | |
public *; | |
} | |
# v7 | |
-keep public class android.support.v7.widget.** { *; } | |
-keep public class android.support.v7.internal.widget.** { *; } |
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 CustomMatchers { | |
public static Matcher<View> withBackground(final int resourceId) { | |
return new TypeSafeMatcher<View>() { | |
@Override | |
public boolean matchesSafely(View view) { | |
return sameBitmap(view.getContext(), view.getBackground(), resourceId); | |
} | |
@Override |
NewerOlder