Skip to content

Instantly share code, notes, and snippets.

Drew Hannay drewhannay

Block or report user

Report or block drewhannay

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
drewhannay /
Last active Jun 21, 2017
Android Espresso Activity Clean Up
* Copyright (C) 2017 Drew Hannay
* <p>
* 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
* <p>
* <p>
* Unless required by applicable law or agreed to in writing, software
package com.linkedin.util;
import android.os.Bundle;
public class ExampleTestRunner extends AndroidJUnitRunner {
View Android Studio TAG Class Template
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
public class ${NAME} {
private static final String TAG = "${NAME}";
import android.animation.ValueAnimator;
import android.view.View;
import android.view.animation.LinearInterpolator;
public abstract class ExpandableItemViewHolder extends RecyclerView.ViewHolder {
private int mOriginalHeight;
private boolean mIsViewExpanded;
drewhannay /
Last active Aug 29, 2015
Extension of Android's AsyncTaskLoader which takes care of the boilerplate details and adds support for loading Broadcasts
import android.content.Context;
import android.content.Intent;
* Base class which takes care of the boilerplate details involved in extending
* AsyncTaskLoader and adds convenience methods for registering and unregistering
* an observer for the Loader
drewhannay /
Created Aug 24, 2014
Simple shell script to pull, push, and list database files for an Android emulator or device
if [ $# -lt 1 ]
echo "Usage:"
echo " commands"
echo " setOptions \$databaseName \$packageName"
echo " ls"
echo " pull"
echo " push"
drewhannay / vim_commands
Last active Dec 13, 2015
Helpful Vim Commands
View vim_commands
# Select entire paragraph and rewrap the text
vip gq
# vim LaTeX
zr # unfold one level
zR # unfold all levels
zm # fold one level
zM # fold all levels
\ll # compile LaTeX document
\lv # view compiled LaTeX PDF
You can’t perform that action at this time.