Skip to content

Instantly share code, notes, and snippets.

View nobre84's full-sized avatar

Rafael Nobre nobre84

  • Kinzoo
  • Brazil
View GitHub Profile
@nobre84
nobre84 / ColorFilteredStateDrawable
Created February 13, 2015 18:31
StateListDrawable that applies a ColorFilter with the desired color / state configuration
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.util.StateSet;
/**
* Created by Rafael Nobre on 12/02/15.
*/
public class ColorFilteredStateDrawable extends StateListDrawable {
/*
* Demo InterfaCSS stylesheet file.
*
* Read more about the stylesheet format here: https://github.com/tolo/InterfaCSS/wiki/Stylesheet-format
* Checkout this page for a reference on what properties can be set: https://github.com/tolo/InterfaCSS/wiki/Stylesheet-Property-Reference
*
* For a short selection of available properties that can be set, see bottom of file.
*/