code: @SuppressLint("NewApi")
      private void adaptImageButtonBackground() {
          Drawable background = createStateListBackgroundDrawable();
  
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
              Drawable rippleDrawable = new RippleDrawable(
                      new ColorStateList(new int[][]{{}}, new int[]{getPressedColor()}), background,
                      null);
              ViewUtil.setBackground(imageButton, rippleDrawable);
          } else {
              ViewUtil.setBackground(imageButton, background);
          }
      }
docs: Adapts the background of the image button, which is used to show the floating image button's
  background and icon, depending on the floating button's colors.