Skip to content

Instantly share code, notes, and snippets.

View intrications's full-sized avatar

Michael Basil intrications

View GitHub Profile
#! /bin/bash
#=====================================================================
# Selects an android device
# Copyright (C) 2012-2013 Diego Torres Milano. All rights reserved.
#=====================================================================
get_adb_devices()
{
adb devices 2>&1 | tail -n +2 | sed '/^$/d'
}
@intrications
intrications / gist:6801127
Last active December 24, 2015 12:59
gitignore for Android with Android Studio/Gradle/Eclipse
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@intrications
intrications / themes-debug.xml
Last active August 29, 2015 14:26 — forked from dlew/themes-debug.xml
With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where the hell did this color come from?" You can replace your normal theme with this debug theme to help figure out the source of that color.
<!-- You can change the parent around to whatever you normally use -->
<style name="DebugColors" parent="Theme.AppCompat">
<!-- System colors -->
<item name="android:colorForeground">#440000</item>
<item name="android:colorForegroundInverse">#004400</item>
<item name="android:colorBackground">#444400</item>
<item name="android:colorBackgroundCacheHint">#440044</item>
<item name="android:textColorPrimary">#FFFF00</item>
/*
* Adapted from ImageView code at:
* http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4.4_r1/android/widget/ImageView.java
*/
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ImageView;