android.text.style
Class DynamicDrawableSpan
java.lang.Object
android.text.style.CharacterStyle
android.text.style.MetricAffectingSpan
android.text.style.ReplacementSpan
android.text.style.DynamicDrawableSpan
- All Implemented Interfaces:
- UpdateLayout
- Direct Known Subclasses:
- ImageSpan
public abstract class DynamicDrawableSpan
- extends ReplacementSpan
|
Method Summary |
void |
draw(Canvas canvas,
CharSequence text,
int start,
int end,
float x,
int top,
int y,
int bottom,
Paint paint)
|
abstract Drawable |
getDrawable()
Your subclass must implement this method to provide the bitmap
to be drawn. |
int |
getSize(Paint paint,
CharSequence text,
int start,
int end,
Paint.FontMetricsInt fm)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicDrawableSpan
public DynamicDrawableSpan()
getDrawable
public abstract Drawable getDrawable()
- Your subclass must implement this method to provide the bitmap
to be drawn. The dimensions of the bitmap must be the same
from each call to the next.
getSize
public int getSize(Paint paint,
CharSequence text,
int start,
int end,
Paint.FontMetricsInt fm)
- Specified by:
getSize in class ReplacementSpan
draw
public void draw(Canvas canvas,
CharSequence text,
int start,
int end,
float x,
int top,
int y,
int bottom,
Paint paint)
- Specified by:
draw in class ReplacementSpan
Please submit a feedback, bug or feature