public class

SimpleDraweeSpanTextView

extends TextView
java.lang.Object
   ↳ android.view.View
     ↳ android.widget.TextView
       ↳ com.facebook.drawee.span.SimpleDraweeSpanTextView

Class Overview

DraweeSpan text view that can be used to bind to a DraweeSpanStringBuilder to display images within text strings.

You should always use setDraweeSpanStringBuilder(DraweeSpanStringBuilder) instead of calling setText(CharSequence) and its variations.

If you use the normal text view setters, this view will behave exactly like BetterTextView. If you previously set a DraweeSpanStringBuilder but want to re-use it as a normal text view, you should call detachCurrentDraweeSpanStringBuilder() first.

Summary

[Expand]
Inherited Constants
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
SimpleDraweeSpanTextView(Context context)
SimpleDraweeSpanTextView(Context context, AttributeSet attrs)
SimpleDraweeSpanTextView(Context context, AttributeSet attrs, int defStyle)
Public Methods
void detachCurrentDraweeSpanStringBuilder()
Detaches the currently attached DraweeSpanStringBuilder (if there is one) so that this view can be used as a normal text view instead.
void onFinishTemporaryDetach()
void onStartTemporaryDetach()
void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter)
void setDraweeSpanStringBuilder(DraweeSpanStringBuilder draweeSpanStringBuilder)
Bind the given string builder to this view.
Protected Methods
void onAttachedToWindow()
void onDetachedFromWindow()
[Expand]
Inherited Methods
From class android.widget.TextView
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewTreeObserver.OnPreDrawListener
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public SimpleDraweeSpanTextView (Context context)

public SimpleDraweeSpanTextView (Context context, AttributeSet attrs)

public SimpleDraweeSpanTextView (Context context, AttributeSet attrs, int defStyle)

Public Methods

public void detachCurrentDraweeSpanStringBuilder ()

Detaches the currently attached DraweeSpanStringBuilder (if there is one) so that this view can be used as a normal text view instead.

public void onFinishTemporaryDetach ()

public void onStartTemporaryDetach ()

public void onTextChanged (CharSequence text, int start, int lengthBefore, int lengthAfter)

public void setDraweeSpanStringBuilder (DraweeSpanStringBuilder draweeSpanStringBuilder)

Bind the given string builder to this view.

Parameters
draweeSpanStringBuilder the builder to attach to

Protected Methods

protected void onAttachedToWindow ()

protected void onDetachedFromWindow ()