Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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