Tag

SpannableStringBuilder

0 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Jul 24, 2024 · Mobile Development

Performance Optimization for Emoji Deletion in Android EditText Using Profiler and Emoji2

Using Android Profiler we discovered that deleting many custom emojis in an EditText triggers repeated DynamicLayout ChangeWatcher calls, causing up to two‑second lag, and by adopting the emoji2 library’s EmojiSpan rendering with a custom EditableFactory that suppresses onSpanChanged for emoji spans, the lag is eliminated.

AndroidEditTextPerformance
0 likes · 10 min read
Performance Optimization for Emoji Deletion in Android EditText Using Profiler and Emoji2