Most visited

Recently visited

Added in API level 1

ImageSpan

public class ImageSpan
extends DynamicDrawableSpan

java.lang.Object
   ↳ android.text.style.CharacterStyle
     ↳ android.text.style.MetricAffectingSpan
       ↳ android.text.style.ReplacementSpan
         ↳ android.text.style.DynamicDrawableSpan
           ↳ android.text.style.ImageSpan


Summary

Inherited constants

From class android.text.style.DynamicDrawableSpan

Inherited fields

From class android.text.style.DynamicDrawableSpan

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
From class android.text.style.ReplacementSpan
From class android.text.style.MetricAffectingSpan
From class android.text.style.CharacterStyle
From class java.lang.Object

Public constructors

ImageSpan

Added in API level 1
ImageSpan (Bitmap b)

This constructor was deprecated in API level 4.
Use ImageSpan(Context, Bitmap) instead.

Parameters
b Bitmap

ImageSpan

Added in API level 3
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

Added in API level 4
ImageSpan (Context context, 
                Bitmap b)

Parameters
context Context
b Bitmap

ImageSpan

Added in API level 4
ImageSpan (Context context, 
                Bitmap b, 
                int verticalAlignment)

Parameters
context Context
b Bitmap
verticalAlignment int: one of ALIGN_BOTTOM or ALIGN_BASELINE.

ImageSpan

Added in API level 1
ImageSpan (Drawable d)

Parameters
d Drawable

ImageSpan

Added in API level 3
ImageSpan (Drawable d, 
                int verticalAlignment)

Parameters
d Drawable
verticalAlignment int: one of ALIGN_BOTTOM or ALIGN_BASELINE.

ImageSpan

Added in API level 1
ImageSpan (Drawable d, 
                String source)

Parameters
d Drawable
source String

ImageSpan

Added in API level 3
ImageSpan (Drawable d, 
                String source, 
                int verticalAlignment)

Parameters
d Drawable
source String
verticalAlignment int: one of ALIGN_BOTTOM or ALIGN_BASELINE.

ImageSpan

Added in API level 1
ImageSpan (Context context, 
                Uri uri)

Parameters
context Context
uri Uri

ImageSpan

Added in API level 3
ImageSpan (Context context, 
                Uri uri, 
                int verticalAlignment)

Parameters
context Context
uri Uri
verticalAlignment int: one of ALIGN_BOTTOM or ALIGN_BASELINE.

ImageSpan

Added in API level 1
ImageSpan (Context context, 
                int resourceId)

Parameters
context Context
resourceId int

ImageSpan

Added in API level 3
ImageSpan (Context context, 
                int resourceId, 
                int verticalAlignment)

Parameters
context Context
resourceId int
verticalAlignment int: one of ALIGN_BOTTOM or ALIGN_BASELINE.

Public methods

getDrawable

Added in API level 1
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.

Returns
Drawable

getSource

Added in API level 1
String getSource ()

Returns the source string that was saved during construction.

Returns
String

Hooray!