Created
August 14, 2012 17:56
-
-
Save xXxXxXxXxXam/3351266 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ThemedView extends View { | |
public ThemedView(Context context, AttributeSet attrs, int defStyle) { | |
super(context, attrs, defStyle); | |
} | |
public ThemedView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} | |
public ThemedView(Context context) { | |
super(context); | |
} | |
@Override | |
protected int[] onCreateDrawableState(int extraSpace) { | |
final int[] state = super.onCreateDrawableState(extraSpace + 2); | |
mergeDrawableStates(state, ((PocketActivity) getContext()).getThemeState()); | |
return state; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment