EmojiSpan
public abstract class EmojiSpan extends ReplacementSpan
| java.lang.Object | ||||
| ↳ | android.text.style.CharacterStyle | |||
| ↳ | android.text.style.MetricAffectingSpan | |||
| ↳ | android.text.style.ReplacementSpan | |||
| ↳ | androidx.emoji2.text.EmojiSpan |
Base span class for the emoji replacement. When an emoji is found and needs to be replaced in a CharSequence, an instance of this class is added to the CharSequence.
Summary
Public methods |
|
|---|---|
int |
getSize( |
final @NonNull TypefaceEmojiRasterizer |
Get the rasterizer that draws this emoji. |
Inherited methods |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||
|
Public methods
getSize
Added in 1.0.0
public int getSize(
@NonNull Paint paint,
CharSequence text,
int start,
int end,
@Nullable Paint.FontMetricsInt fm
)
getTypefaceRasterizer
Added in 1.3.0
public final @NonNull TypefaceEmojiRasterizer getTypefaceRasterizer()
Get the rasterizer that draws this emoji.
| Returns | |
|---|---|
@NonNull TypefaceEmojiRasterizer |
rasterizer to draw emoji |