Skip to content

Instantly share code, notes, and snippets.

Drakeet drakeet

Block or report user

Report or block drakeet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View proguard-rules-purewriter.pro
-ignorewarnings
-keep public class * extends android.os.Binder
-keepclassmembers enum * {
**[] $VALUES;
public *;
}
-keepclassmembers class * {
public <init> (org.json.JSONObject);
}
View BaseTransformer.java
// 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
View proguard-android-optimize-drakeet.pro
# 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
View assumenosideeffects.pro
-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);
View kotlin-proguard-rules
-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);
View QuickReturnDelegate.kt
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
View gist:7cbfee84b1587a7c4c4e8167a7ca7f0e
### 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:
View proguard-rules.pro
-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.** { *; }
View CustomMatchers.java
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
View Inhibitor.java
public class MainActivity extends AppCompatActivity implements Updatable {
private TextView textView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = (TextView) findViewById(R.id.text);
You can’t perform that action at this time.