Google 致力于为黑人社区推动种族平等。查看具体举措

EmojiSpan

public abstract class EmojiSpan
extends ReplacementSpan

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

Inherited methods

Public methods

getSize

public 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