-
- All Implemented Interfaces:
-
android.text.style.UpdateAppearance,android.text.style.UpdateLayout,com.facebook.react.views.text.ReactSpan
public abstract class TextInlineImageSpan extends ReplacementSpan implements ReactSpan
Base class for inline image spans.
-
-
Method Summary
Modifier and Type Method Description static voidpossiblyUpdateInlineImageSpans(Spannable spannable, TextView view)For TextInlineImageSpan we need to update the Span to know that the window is attached and theTextView that we will set as the callback on the Drawable. abstract DrawablegetDrawable()Get the drawable that is span represents. abstract voidonDetachedFromWindow()Called by the text view from onDetachedFromWindow, abstract voidonStartTemporaryDetach()Called by the text view from onStartTemporaryDetach. abstract voidonAttachedToWindow()Called by the text view from onAttachedToWindow. abstract voidonFinishTemporaryDetach()Called by the text view from onFinishTemporaryDetach. abstract voidsetTextView(TextView textView)Set the textview that will contain this span. abstract intgetWidth()Get the width of the span. abstract intgetHeight()Get the height of the span. -
Methods inherited from class android.text.style.ReplacementSpan
draw, getContentDescription, getSize, setContentDescription, updateDrawState, updateMeasureState -
Methods inherited from class android.text.style.MetricAffectingSpan
getUnderlying -
Methods inherited from class android.text.style.CharacterStyle
getUnderlying, wrap -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
possiblyUpdateInlineImageSpans
static void possiblyUpdateInlineImageSpans(Spannable spannable, TextView view)
For TextInlineImageSpan we need to update the Span to know that the window is attached and theTextView that we will set as the callback on the Drawable.
- Parameters:
spannable- The spannable that may contain TextInlineImageSpansview- The view which will be set as the callback for the Drawable
-
getDrawable
@Nullable() abstract Drawable getDrawable()
Get the drawable that is span represents.
-
onDetachedFromWindow
abstract void onDetachedFromWindow()
Called by the text view from onDetachedFromWindow,
-
onStartTemporaryDetach
abstract void onStartTemporaryDetach()
Called by the text view from onStartTemporaryDetach.
-
onAttachedToWindow
abstract void onAttachedToWindow()
Called by the text view from onAttachedToWindow.
-
onFinishTemporaryDetach
abstract void onFinishTemporaryDetach()
Called by the text view from onFinishTemporaryDetach.
-
setTextView
abstract void setTextView(TextView textView)
Set the textview that will contain this span.
-
getWidth
abstract int getWidth()
Get the width of the span.
-
getHeight
abstract int getHeight()
Get the height of the span.
-
-
-
-