docs: public static void updateMeasureSpec(
        Spec spec,
        float aspectRatio,
        @Nullable ViewGroup.LayoutParams layoutParams,
        int widthPadding,
        int heightPadding) {
      if (aspectRatio <= 0 || layoutParams == null) {
        return;
      }
      if (shouldAdjust(layoutParams.height)) {
        int widthSpecSize = View.MeasureSpec.getSize(spec.width);
        int desiredHeight = (int) ((widthSpecSize - widthPadding) / aspectRatio + heightPadding);
        int resolvedHeight = View.resolveSize(desiredHeight, spec.height);
        spec.height = View.MeasureSpec.makeMeasureSpec(resolvedHeight, View.MeasureSpec.EXACTLY);
      } else if (shouldAdjust(layoutParams.width)) {
        int heightSpecSize = View.MeasureSpec.getSize(spec.height);
        int desiredWidth = (int) ((heightSpecSize - heightPadding) * aspectRatio + widthPadding);
        int resolvedWidth = View.resolveSize(desiredWidth, spec.width);
        spec.width = View.MeasureSpec.makeMeasureSpec(resolvedWidth, View.MeasureSpec.EXACTLY);
      }
    }