Build 1.0_r1(from source)

android.text.style
Class DynamicDrawableSpan

java.lang.Object
  extended by android.text.style.CharacterStyle
      extended by android.text.style.MetricAffectingSpan
          extended by android.text.style.ReplacementSpan
              extended by android.text.style.DynamicDrawableSpan
All Implemented Interfaces:
UpdateLayout
Direct Known Subclasses:
ImageSpan

public abstract class DynamicDrawableSpan
extends ReplacementSpan


Nested Class Summary
 
Nested classes/interfaces inherited from class android.text.style.MetricAffectingSpan
MetricAffectingSpan.Passthrough
 
Constructor Summary
DynamicDrawableSpan()
           
 
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 android.text.style.ReplacementSpan
updateDrawState, updateMeasureState
 
Methods inherited from class android.text.style.MetricAffectingSpan
getUnderlying
 
Methods inherited from class android.text.style.CharacterStyle
wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicDrawableSpan

public DynamicDrawableSpan()
Method Detail

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

Build 1.0_r1(from source)

Please submit a feedback, bug or feature