Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ReplacementSpan

public abstract class ReplacementSpan
extends MetricAffectingSpan

java.lang.Object
   ↳ android.text.style.CharacterStyle
     ↳ android.text.style.MetricAffectingSpan
       ↳ android.text.style.ReplacementSpan
Known Direct Subclasses
Known Indirect Subclasses


Summary

Public constructors

ReplacementSpan()

Public methods

abstract void draw(Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, Paint paint)
abstract int getSize(Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm)
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.

Inherited methods

From class android.text.style.MetricAffectingSpan
From class android.text.style.CharacterStyle
From class java.lang.Object

Public constructors

ReplacementSpan

Added in API level 1
ReplacementSpan ()

Public methods

draw

Added in API level 1
void draw (Canvas canvas, 
                CharSequence text, 
                int start, 
                int end, 
                float x, 
                int top, 
                int y, 
                int bottom, 
                Paint paint)

Parameters
canvas Canvas
text CharSequence
start int
end int
x float
top int
y int
bottom int
paint Paint

getSize

Added in API level 1
int getSize (Paint paint, 
                CharSequence text, 
                int start, 
                int end, 
                Paint.FontMetricsInt fm)

Parameters
paint Paint
text CharSequence
start int
end int
fm Paint.FontMetricsInt
Returns
int

updateDrawState

Added in API level 1
void updateDrawState (TextPaint ds)

This method does nothing, since ReplacementSpans are drawn explicitly instead of affecting Paint properties.

Parameters
ds TextPaint

updateMeasureState

Added in API level 1
void updateMeasureState (TextPaint p)

This method does nothing, since ReplacementSpans are measured explicitly instead of affecting Paint properties.

Parameters
p TextPaint
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.