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:
UpdateAppearance, UpdateLayout
Direct Known Subclasses:
ImageSpan

public abstract class DynamicDrawableSpan
extends ReplacementSpan


Field Summary
static int ALIGN_BASELINE
           
static int ALIGN_BOTTOM
           
protected  int mVerticalAlignment
           
 
Constructor Summary
  DynamicDrawableSpan()
           
protected DynamicDrawableSpan(int verticalAlignment)
           
 
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()
           
 int getSize(Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm)
           
 int getVerticalAlignment()
           
 
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
 

Field Detail

ALIGN_BOTTOM

public static final int ALIGN_BOTTOM
See Also:
Constant Field Values

ALIGN_BASELINE

public static final int ALIGN_BASELINE
See Also:
Constant Field Values

mVerticalAlignment

protected final int mVerticalAlignment
Constructor Detail

DynamicDrawableSpan

public DynamicDrawableSpan()

DynamicDrawableSpan

protected DynamicDrawableSpan(int verticalAlignment)
Method Detail

getVerticalAlignment

public int getVerticalAlignment()

getDrawable

public abstract Drawable getDrawable()

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


Copyright © 2008-2012. All Rights Reserved.