public class TextInlineImageSpan
extends android.text.style.ReplacementSpan
| Constructor and Description |
|---|
TextInlineImageSpan(android.content.res.Resources resources,
int height,
int width,
android.net.Uri uri) |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(android.graphics.Canvas canvas,
java.lang.CharSequence text,
int start,
int end,
float x,
int top,
int y,
int bottom,
android.graphics.Paint paint) |
android.graphics.drawable.Drawable |
getDrawable() |
int |
getSize(android.graphics.Paint paint,
java.lang.CharSequence text,
int start,
int end,
android.graphics.Paint.FontMetricsInt fm) |
void |
onAttachedToWindow() |
void |
onDetachedFromWindow()
The ReactTextView that holds this ImageSpan is responsible for passing these methods on so
that we can do proper lifetime management for Fresco
|
void |
onFinishTemporaryDetach() |
void |
onStartTemporaryDetach() |
static void |
possiblyUpdateInlineImageSpans(android.text.Spannable spannable,
android.widget.TextView view)
For TextInlineImageSpan we need to update the Span to know that the window is attached and
the TextView that we will set as the callback on the Drawable.
|
public TextInlineImageSpan(android.content.res.Resources resources,
int height,
int width,
@Nullable
android.net.Uri uri)
public void onDetachedFromWindow()
public void onStartTemporaryDetach()
public void onAttachedToWindow()
public void onFinishTemporaryDetach()
@Nullable public android.graphics.drawable.Drawable getDrawable()
public int getSize(android.graphics.Paint paint,
java.lang.CharSequence text,
int start,
int end,
android.graphics.Paint.FontMetricsInt fm)
getSize in class android.text.style.ReplacementSpanpublic void draw(android.graphics.Canvas canvas,
java.lang.CharSequence text,
int start,
int end,
float x,
int top,
int y,
int bottom,
android.graphics.Paint paint)
draw in class android.text.style.ReplacementSpanpublic static void possiblyUpdateInlineImageSpans(android.text.Spannable spannable,
android.widget.TextView view)
spannable - The spannable that may contain TextInlineImageSpansview - The view which will be set as the callback for the Drawable