public void setImageVitoSpan(
      Context context,
      VitoSpanLoader vitoSpanLoader,
      ImageSource imageSource,
      ImageOptions imageOptions,
      Object callerContext,
      int startIndex,
      int endIndex,
      final int drawableWidthPx,
      final int drawableHeightPx,
      boolean enableResizing,
      @BetterImageSpan.BetterImageSpanAlignment int verticalAlignment) {
    if (endIndex >= length()) {
      // Unfortunately, some callers use this wrong. The original implementation also swallows
      // an exception if this happens (e.g. if you tap on a video that has a minutiae as well.
      // Example: Text = "ABC", insert image at position 18.
      return;
    }
    FrescoDrawableInterface drawableInterface = vitoSpanLoader.createDrawable();
    Drawable topLevelDrawable = (Drawable) drawableInterface;
    if (topLevelDrawable.getBounds().isEmpty()) {
      topLevelDrawable.setBounds(0, 0, drawableWidthPx, drawableHeightPx);
    }
    VitoSpan span =
        new VitoSpan(
            context.getResources(),
            drawableInterface,
            verticalAlignment,
            new BetterImageSpan((Drawable) drawableInterface, verticalAlignment),
            mDrawableCallback);
    mVitoSpans.add(span);
    vitoSpanShow(
        imageSource,
        imageOptions,
        callerContext,
        ControllerListenerWrapper.create(
            new VitoDrawableChangedListener(span, enableResizing, drawableHeightPx)),
        span);
    setSpan(span, startIndex, endIndex + 1, SPAN_EXCLUSIVE_EXCLUSIVE);
  }
DraweeSpanStringBuilder that can be used to add {@link DraweeSpan}s to strings.

<p>The containing view must also call {@link #onDetachFromView(View)} ()} from its {@link
View#onStartTemporaryDetach()} and {@link View#onDetachedFromWindow()} methods. Similarly, it
must call {@link #onAttachToView(View)} from its {@link View#onFinishTemporaryDetach()} and
{@link View#onAttachedToWindow()} methods.

<p>If you attach the same DraweeSpanStringBuilder to different views, only the most recent view
will be updated correctly since you can only bind the same builder to 1 view at a time. Older
views will be automatically unbound.

<p>{@see DraweeHolder}
drawee-span/src/main/java/com/facebook/drawee/span/DraweeSpanStringBuilder.java