code: private void adaptImageButtonSize() {
          int pixelSize = getPixelSize();
          LayoutParams layoutParams = (LayoutParams) imageButton.getLayoutParams();
          layoutParams.width = pixelSize;
          layoutParams.height = pixelSize;
          imageButton.setLayoutParams(layoutParams);
          imageButton.requestLayout();
      }
docs: Adapts the size of the image button, which is used to show the floating image button's
  background and icon, depending on the floating button's size.