lightbulb_outline Please take our October 2018 developer survey. Start survey
added in version 26.1.0
belongs to Maven artifact com.android.support:support-emoji:28.0.0-alpha1

EmojiSpan

public abstract class EmojiSpan
extends ReplacementSpan

java.lang.Object
   ↳ android.text.style.CharacterStyle
     ↳ android.text.style.MetricAffectingSpan
       ↳ android.text.style.ReplacementSpan
         ↳ android.support.text.emoji.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(Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm)

Inherited methods

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

Public methods

getSize

added in version 26.1.0
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