public class FrescoBasedReactTextInlineImageSpan extends TextInlineImageSpan
Constructor and Description |
---|
FrescoBasedReactTextInlineImageSpan(android.content.res.Resources resources,
int height,
int width,
int tintColor,
android.net.Uri uri,
ReadableMap headers,
AbstractDraweeControllerBuilder draweeControllerBuilder,
java.lang.Object callerContext) |
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()
Get the drawable that is span represents.
|
int |
getHeight()
Get the height of the span.
|
int |
getSize(android.graphics.Paint paint,
java.lang.CharSequence text,
int start,
int end,
android.graphics.Paint.FontMetricsInt fm) |
int |
getWidth()
Get the width of the span.
|
void |
onAttachedToWindow()
Called by the text view from
View.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()
Called by the text view from
View.onFinishTemporaryDetach() . |
void |
onStartTemporaryDetach()
Called by the text view from
View.onStartTemporaryDetach() . |
void |
setTextView(android.widget.TextView textView)
Set the textview that will contain this span.
|
possiblyUpdateInlineImageSpans
public FrescoBasedReactTextInlineImageSpan(android.content.res.Resources resources, int height, int width, int tintColor, android.net.Uri uri, ReadableMap headers, AbstractDraweeControllerBuilder draweeControllerBuilder, java.lang.Object callerContext)
public void onDetachedFromWindow()
onDetachedFromWindow
in class TextInlineImageSpan
public void onStartTemporaryDetach()
TextInlineImageSpan
View.onStartTemporaryDetach()
.onStartTemporaryDetach
in class TextInlineImageSpan
public void onAttachedToWindow()
TextInlineImageSpan
View.onAttachedToWindow()
.onAttachedToWindow
in class TextInlineImageSpan
public void onFinishTemporaryDetach()
TextInlineImageSpan
View.onFinishTemporaryDetach()
.onFinishTemporaryDetach
in class TextInlineImageSpan
public android.graphics.drawable.Drawable getDrawable()
TextInlineImageSpan
getDrawable
in class TextInlineImageSpan
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.ReplacementSpan
public void setTextView(android.widget.TextView textView)
TextInlineImageSpan
setTextView
in class TextInlineImageSpan
public 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.ReplacementSpan
public int getWidth()
TextInlineImageSpan
getWidth
in class TextInlineImageSpan
public int getHeight()
TextInlineImageSpan
getHeight
in class TextInlineImageSpan