docs: @Override
      protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
          ViewGroup.LayoutParams params = getLayoutParams();
          boolean customMeasure = false;
          int newHeight = MeasureSpec.getSize(heightMeasureSpec);
          int newWidth = MeasureSpec.getSize(widthMeasureSpec);
          if (MeasureSpec.getMode(heightMeasureSpec) != MeasureSpec.EXACTLY &&
                  params.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
              newHeight = getPresetSizeInPixels(true); // Default to a preset size
              heightMeasureSpec = MeasureSpec.makeMeasureSpec(newHeight, MeasureSpec.EXACTLY);
              customMeasure = true;
          }
  
          if (MeasureSpec.getMode(widthMeasureSpec) != MeasureSpec.EXACTLY &&
                  params.width == ViewGroup.LayoutParams.WRAP_CONTENT) {
              newWidth = getPresetSizeInPixels(true); // Default to a preset size
              widthMeasureSpec = MeasureSpec.makeMeasureSpec(newWidth, MeasureSpec.EXACTLY);
              customMeasure = true;
          }
  
          if (customMeasure) {
              // Since we are providing custom dimensions, we need to handle the measure
              // phase from here
              setMeasuredDimension(newWidth, newHeight);
              measureChildren(widthMeasureSpec, heightMeasureSpec);
          } else {
              // Rely on FrameLayout to do the right thing
              super.onMeasure(widthMeasureSpec, heightMeasureSpec);
          }
      }