ImageSpan
public
class
ImageSpan
extends DynamicDrawableSpan
Summary
Inherited constants |
From
class
android.text.style.DynamicDrawableSpan
int |
ALIGN_BASELINE
A constant indicating that the bottom of this span should be aligned
with the baseline of the surrounding text.
|
int |
ALIGN_BOTTOM
A constant indicating that the bottom of this span should be aligned
with the bottom of the surrounding text, i.e., at the same level as the
lowest descender in the text.
|
|
Public constructors |
ImageSpan(Bitmap b)
This constructor was deprecated
in API level 4.
Use ImageSpan(Context, Bitmap) instead.
|
ImageSpan(Bitmap b, int verticalAlignment)
This constructor was deprecated
in API level 4.
Use {@link #ImageSpan(Context, Bitmap, int) instead.
|
ImageSpan(Context context, Bitmap b)
|
ImageSpan(Context context, Bitmap b, int verticalAlignment)
|
ImageSpan(Drawable d)
|
ImageSpan(Drawable d, int verticalAlignment)
|
ImageSpan(Drawable d, String source)
|
ImageSpan(Drawable d, String source, int verticalAlignment)
|
ImageSpan(Context context, Uri uri)
|
ImageSpan(Context context, Uri uri, int verticalAlignment)
|
ImageSpan(Context context, int resourceId)
|
ImageSpan(Context context, int resourceId, int verticalAlignment)
|
Public methods |
Drawable
|
getDrawable()
Your subclass must implement this method to provide the bitmap
to be drawn.
|
String
|
getSource()
Returns the source string that was saved during construction.
|
Inherited methods |
From
class
android.text.style.DynamicDrawableSpan
void
|
draw(Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, Paint paint)
Draws the span into the canvas.
|
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)
Returns the width of the span.
|
int
|
getVerticalAlignment()
Returns the vertical alignment of this span, one of ALIGN_BOTTOM or
ALIGN_BASELINE .
|
|
From
class
android.text.style.ReplacementSpan
abstract
void
|
draw(Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, Paint paint)
Draws the span into the canvas.
|
abstract
int
|
getSize(Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm)
Returns the width of the span.
|
void
|
updateDrawState(TextPaint ds)
This method does nothing, since ReplacementSpans are drawn
explicitly instead of affecting Paint properties.
|
void
|
updateMeasureState(TextPaint p)
This method does nothing, since ReplacementSpans are measured
explicitly instead of affecting Paint properties.
|
|
From
class
android.text.style.MetricAffectingSpan
|
From
class
android.text.style.CharacterStyle
|
From
class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long millis, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long millis)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
Public constructors
ImageSpan
ImageSpan (Bitmap b,
int verticalAlignment)
This constructor was deprecated
in API level 4.
Use {@link #ImageSpan(Context, Bitmap, int) instead.
Parameters |
b |
Bitmap
|
verticalAlignment |
int
|
ImageSpan
ImageSpan (Context context,
Bitmap b)
Parameters |
context |
Context
|
b |
Bitmap
|
ImageSpan
ImageSpan (Context context,
Bitmap b,
int verticalAlignment)
ImageSpan
ImageSpan (Drawable d,
int verticalAlignment)
ImageSpan
ImageSpan (Drawable d,
String source)
Parameters |
d |
Drawable
|
source |
String
|
ImageSpan
ImageSpan (Drawable d,
String source,
int verticalAlignment)
ImageSpan
ImageSpan (Context context,
Uri uri)
Parameters |
context |
Context
|
uri |
Uri
|
ImageSpan
ImageSpan (Context context,
Uri uri,
int verticalAlignment)
ImageSpan
ImageSpan (Context context,
int resourceId)
Parameters |
context |
Context
|
resourceId |
int
|
ImageSpan
ImageSpan (Context context,
int resourceId,
int verticalAlignment)
Public methods
getDrawable
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.
getSource
String getSource ()
Returns the source string that was saved during construction.