
Posted by Lin Guo, Software program Engineer
The usage of emojis in communication has change into more and more in style in recent times. These small icons can be utilized to specific a variety of feelings and might add a private contact to messages. Nevertheless, including emojis to your Android app generally is a little bit of a problem. That is the place the Emoji picker library is available in. You possibly can merely add a number of strains of code to your app, and you can begin utilizing emojis immediately. It is the best strategy to get began with emojis, and it’ll make your app extra enjoyable and expressive.

Some helpful options offered by the library
Up-to-date emojis with out tofu (☐)
Yearly, new emoji variations are revealed, and we are going to usually replace the library to supply these new emojis. Increased-end telephones will be capable of render these newer emojis with none downside. For lower-end telephones, newer emoji could also be displayed as a small sq. field known as tofu (☐). The library ensures to detect and take away them. This ensures the library is appropriate throughout a number of Android variations/gadgets.
Easy UI
The library has a number of optimizations that try to scale back startup latency and velocity up scrolling expertise, equivalent to caching renderable emojis, drawing emojis asynchronously and RecyclerView optimizations.
Customized inclusive expertise
Person picks are persistent within the library. Emojis which can be newly chosen shall be proven on the prime row, making it easier for customers to seek out and share them. The library additionally affords a wide range of emojis that symbolize completely different folks and cultures within the variant panels. If the person chooses an emoji from one of many variation panels (Determine 2), the selection is retained and set because the default in the primary panel.

Combine emoji picker into your app in 3 steps
Step 1: Import the library in construct.gradle
dependencies { |
Optionally set emojiGridColumns and emojiGridRows primarily based on the specified dimension of every emoji cell
An instance that makes use of EmojiPickerView in XML
<androidx.emoji2.emojipicker.EmojiPickerView |
A quite simple emoji picker ought to now be introduced in your app! For the following step, we assume you wish to do one thing to the picked emoji.
Step 3: Present listener to the picked emoji
|
Now you may have a fundamental functioning emoji picker. To customise it additional (e.g, override some kinds or present a special conduct to the current emoji row), please confer with our api and pattern app.
Be happy to file Bug Report or Function Request to assist us enhance the library!