@Override
 public void setBackgroundDrawable(Drawable drawable) {
   Drawable background = getBackground();
   if (background instanceof RippleDrawable && !(drawable instanceof RippleDrawable))
     ((RippleDrawable) background).setBackgroundDrawable(drawable);
   else super.setBackgroundDrawable(drawable);
 }