Skip to content

Instantly share code, notes, and snippets.

@adam-hurwitz
Created August 23, 2017 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam-hurwitz/e5bda69566a431d9511430e63612f6be to your computer and use it in GitHub Desktop.
Save adam-hurwitz/e5bda69566a431d9511430e63612f6be to your computer and use it in GitHub Desktop.
RippleTextView.java with RippleEffect.addRippleEffect() method
public RippleTextView(Context context) {
super(context);
getXMLAttributes(context, null);
RippleEffect.addRippleEffect(this, rippleEnabled,
backgroundColor, rippleColor);
}
public RippleTextView(Context context, AttributeSet attrs) {
super(context, attrs);
getXMLAttributes(context, attrs);
RippleEffect.addRippleEffect(this, rippleEnabled,
backgroundColor, rippleColor);
}
public RippleTextView(Context context, AttributeSet attrs, int
defStyleAttr) {
super(context, attrs, defStyleAttr);
getXMLAttributes(context, attrs);
RippleEffect.addRippleEffect(this, rippleEnabled,
backgroundColor, rippleColor);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment