public class TextDrawable extends Drawable implements Touchable, TextContent
Drawable
for mounting text content from a Component
.Component
,
TextSpec
EMPTY
Constructor and Description |
---|
TextDrawable() |
Modifier and Type | Method and Description |
---|---|
void |
draw(Canvas canvas) |
ClickableSpan[] |
getClickableSpans() |
int |
getColor() |
Layout |
getLayout() |
int |
getOpacity() |
java.lang.CharSequence |
getText() |
java.util.List<java.lang.CharSequence> |
getTextItems() |
float |
getTextSize() |
void |
invalidateDrawable(Drawable drawable) |
boolean |
isStateful() |
void |
mount(java.lang.CharSequence text,
Layout layout,
float layoutTranslationY,
boolean clipToBounds,
ColorStateList colorStateList,
int userColor,
int highlightColor,
ClickableSpan[] clickableSpans,
ImageSpan[] imageSpans,
ClickableSpanListener spanListener,
TouchableSpanListener touchableSpanListener,
com.facebook.litho.widget.TextDrawable.TextOffsetOnTouchListener textOffsetOnTouchListener,
int highlightStartOffset,
int highlightEndOffset,
float clickableSpanExpandedOffset,
java.lang.String contextLogTag) |
void |
mount(java.lang.CharSequence text,
Layout layout,
float layoutTranslationY,
ColorStateList colorStateList,
int userColor,
int highlightColor,
ClickableSpan[] clickableSpans) |
void |
mount(java.lang.CharSequence text,
Layout layout,
int userColor,
ClickableSpan[] clickableSpans) |
void |
mount(java.lang.CharSequence text,
Layout layout,
int userColor,
int highlightColor) |
protected boolean |
onStateChange(int[] states) |
boolean |
onTouchEvent(MotionEvent event,
View view) |
void |
scheduleDrawable(Drawable drawable,
java.lang.Runnable runnable,
long l) |
void |
setAlpha(int alpha) |
void |
setColorFilter(ColorFilter cf) |
void |
setTextColor(int textColor) |
boolean |
shouldHandleTouchEvent(MotionEvent event) |
void |
unmount() |
void |
unscheduleDrawable(Drawable drawable,
java.lang.Runnable runnable) |
public void draw(Canvas canvas)
public boolean isStateful()
protected boolean onStateChange(int[] states)
public boolean onTouchEvent(MotionEvent event, View view)
onTouchEvent
in interface Touchable
public boolean shouldHandleTouchEvent(MotionEvent event)
shouldHandleTouchEvent
in interface Touchable
public void mount(java.lang.CharSequence text, Layout layout, int userColor, ClickableSpan[] clickableSpans)
public void mount(java.lang.CharSequence text, Layout layout, int userColor, int highlightColor)
public void mount(java.lang.CharSequence text, Layout layout, float layoutTranslationY, ColorStateList colorStateList, int userColor, int highlightColor, ClickableSpan[] clickableSpans)
public void mount(java.lang.CharSequence text, Layout layout, float layoutTranslationY, boolean clipToBounds, ColorStateList colorStateList, int userColor, int highlightColor, ClickableSpan[] clickableSpans, ImageSpan[] imageSpans, ClickableSpanListener spanListener, TouchableSpanListener touchableSpanListener, com.facebook.litho.widget.TextDrawable.TextOffsetOnTouchListener textOffsetOnTouchListener, int highlightStartOffset, int highlightEndOffset, float clickableSpanExpandedOffset, java.lang.String contextLogTag)
public void setTextColor(int textColor)
public void unmount()
public ClickableSpan[] getClickableSpans()
public void setAlpha(int alpha)
public void setColorFilter(ColorFilter cf)
public int getOpacity()
public java.lang.CharSequence getText()
public int getColor()
public float getTextSize()
public Layout getLayout()
public java.util.List<java.lang.CharSequence> getTextItems()
getTextItems
in interface TextContent
public void invalidateDrawable(Drawable drawable)
public void scheduleDrawable(Drawable drawable, java.lang.Runnable runnable, long l)
public void unscheduleDrawable(Drawable drawable, java.lang.Runnable runnable)