Skip to content

Instantly share code, notes, and snippets.

View MehdiChouag's full-sized avatar
🥀
Making incredible things

Mehdi Chouag MehdiChouag

🥀
Making incredible things
View GitHub Profile
@MehdiChouag
MehdiChouag / gist:f38bcd1d2f63d4fe5a7a
Created December 8, 2015 18:30 — forked from konmik/gist:6ac725fa7134402539c4
Dagger 2 injection with inheritance
/**
* This class allows to inject into objects through a base class,
* so we don't have to repeat injection code everywhere.
*
* The performance drawback is about 0.013 ms per injection on a very slow device,
* which is negligible in most cases.
*
* Example:
* <pre>{@code
@MehdiChouag
MehdiChouag / themes-debug.xml
Last active August 29, 2015 14:27 — 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>