public class

DraweeSpanStringBuilder

extends SpannableStringBuilder
implements AttachDetachListener
java.lang.Object
   ↳ android.text.SpannableStringBuilder
     ↳ com.facebook.drawee.span.DraweeSpanStringBuilder

Class Overview

DraweeSpanStringBuilder that can be used to add DraweeSpans to strings.

The containing view must also call onDetachFromView(View) ()} from its onStartTemporaryDetach() and onDetachedFromWindow() methods. Similarly, it must call onAttachToView(View) from its onFinishTemporaryDetach() and onAttachedToWindow() methods.

If you attach the same DraweeSpanStringBuilder to different views, only the most recent view will be updated correctly since you can only bind the same builder to 1 view at a time. Older views will be automatically unbound.

See Also

Summary

Nested Classes
interface DraweeSpanStringBuilder.DraweeSpanChangedListener  
Constants
int UNSET_SIZE
[Expand]
Inherited Constants
From interface android.text.Spanned
Public Constructors
DraweeSpanStringBuilder()
DraweeSpanStringBuilder(CharSequence text)
DraweeSpanStringBuilder(CharSequence text, int start, int end)
Public Methods
Set<DraweeSpan> getDraweeSpans()
boolean hasDraweeSpans()
void onAttachToView(View view)
void onDetachFromView(View view)
void setDraweeSpanChangedListener(DraweeSpanStringBuilder.DraweeSpanChangedListener draweeSpanChangedListener)
void setImageSpan(Context context, DraweeHierarchy draweeHierarchy, DraweeController draweeController, int index, int drawableWidthPx, int drawableHeightPx, boolean enableResizing, int verticalAlignment)
void setImageSpan(DraweeHolder draweeHolder, int startIndex, int endIndex, int drawableWidthPx, int drawableHeightPx, boolean enableResizing, int verticalAlignment)
void setImageSpan(Context context, DraweeHierarchy draweeHierarchy, DraweeController draweeController, int startIndex, int endIndex, int drawableWidthPx, int drawableHeightPx, boolean enableResizing, int verticalAlignment)
void setImageSpan(DraweeHolder draweeHolder, int index, int drawableWidthPx, int drawableHeightPx, boolean enableResizing, int verticalAlignment)
Protected Methods
void bindToDrawable(Drawable drawable)
void bindToView(View view)
void unbindFromDrawable(Drawable drawable)
void unbindFromPreviousComponent()
void unbindFromView(View view)
[Expand]
Inherited Methods
From class android.text.SpannableStringBuilder
From class java.lang.Object
From interface android.text.Editable
From interface android.text.GetChars
From interface android.text.Spannable
From interface android.text.Spanned
From interface com.facebook.common.lifecycle.AttachDetachListener
From interface java.lang.Appendable
From interface java.lang.CharSequence

Constants

public static final int UNSET_SIZE

Constant Value: -1 (0xffffffff)

Public Constructors

public DraweeSpanStringBuilder ()

public DraweeSpanStringBuilder (CharSequence text)

public DraweeSpanStringBuilder (CharSequence text, int start, int end)

Public Methods

public Set<DraweeSpan> getDraweeSpans ()

public boolean hasDraweeSpans ()

public void onAttachToView (View view)

public void onDetachFromView (View view)

public void setDraweeSpanChangedListener (DraweeSpanStringBuilder.DraweeSpanChangedListener draweeSpanChangedListener)

public void setImageSpan (Context context, DraweeHierarchy draweeHierarchy, DraweeController draweeController, int index, int drawableWidthPx, int drawableHeightPx, boolean enableResizing, int verticalAlignment)

public void setImageSpan (DraweeHolder draweeHolder, int startIndex, int endIndex, int drawableWidthPx, int drawableHeightPx, boolean enableResizing, int verticalAlignment)

public void setImageSpan (Context context, DraweeHierarchy draweeHierarchy, DraweeController draweeController, int startIndex, int endIndex, int drawableWidthPx, int drawableHeightPx, boolean enableResizing, int verticalAlignment)

public void setImageSpan (DraweeHolder draweeHolder, int index, int drawableWidthPx, int drawableHeightPx, boolean enableResizing, int verticalAlignment)

Protected Methods

protected void bindToDrawable (Drawable drawable)

protected void bindToView (View view)

protected void unbindFromDrawable (Drawable drawable)

protected void unbindFromPreviousComponent ()

protected void unbindFromView (View view)