Skip to content

Instantly share code, notes, and snippets.

@Jeevuz
Created May 21, 2015 13:39
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 Jeevuz/b775e0d5f0dabdcaefe4 to your computer and use it in GitHub Desktop.
Save Jeevuz/b775e0d5f0dabdcaefe4 to your computer and use it in GitHub Desktop.
private void removeRippleEffectFromCheckBox(CheckBox checkBox) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Drawable drawable = checkBox.getBackground();
if (drawable instanceof RippleDrawable) {
drawable = ((RippleDrawable) drawable).findDrawableByLayerId(0);
checkBox.setBackground(drawable);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment