Skip to content

Instantly share code, notes, and snippets.

View weverb2's full-sized avatar

Brandon Wever weverb2

View GitHub Profile
@AKiniyalocts
AKiniyalocts / EdgeDecorator.java
Created December 8, 2016 21:00
Quick way to add padding to first and last item in recyclerview via decorators
package com.batterii.mobile.ui.component.decorators;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;
/**
* Created by anthonykiniyalocts on 12/8/16.
*
* Quick way to add padding to first and last item in recyclerview via decorators
@AKiniyalocts
AKiniyalocts / BaseViewHolder.java
Created December 7, 2015 20:45
Base class for RecyclerView holder that forces the bind() pattern
import android.support.v7.widget.RecyclerView;
import android.view.View;
import butterknife.ButterKnife;
/**
* Created by anthonykiniyalocts on 11/9/15.
*/
public abstract class BaseViewHolder extends RecyclerView.ViewHolder {
@patrickhammond
patrickhammond / EspressoTestRule.java
Last active September 2, 2018 12:14
Hacking through Espresso issues...
import android.app.Activity;
import android.app.Instrumentation;
import android.app.KeyguardManager;
import android.app.KeyguardManager.KeyguardLock;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.support.test.InstrumentationRegistry;