Merge 071d72d649843cfed424dd2c89af39b0937ea7e5 into 2ea148c30a07f91ffa37c0aa36af1cf2670441af

This commit is contained in:
Rohit 2023-10-15 18:51:48 +05:30 committed by GitHub
commit facadc87be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,11 +101,9 @@ public class AsyncDrawableSpan extends ReplacementSpan {
@NonNull Paint paint) {
// @since 4.4.0 use SpanUtils instead of `canvas.getWidth`
drawable.initWithKnownDimensions(
SpanUtils.width(canvas, text),
paint.getTextSize()
);
final int width = (int) (SpanUtils.width(canvas, text) - x);
getDrawable().initWithKnownDimensions(width, paint.getTextSize());
final AsyncDrawable drawable = this.drawable;
if (drawable.hasResult()) {