Android
The Android Aroma EmojiPicker package provides an emojipicker with automatic day and night mode.
⥠Installation
This component requires minimum SDK 21.
Add the dependency to build.gradle
.
Groovy:
dependencies {
implementation "nl.coffeeit.aroma:emojipicker:1.0.6"
}
KTS:
dependencies {
implementation("nl.coffeeit.aroma:emojipicker:1.0.6")
}
đ Usage
To use the EmojiPicker in a project, simply add it to your code like this:
val emojiBottomSheetDialogFragment = EmojiBottomSheet.newInstance({ emoji ->
// Handle emoji click
})
emojiBottomSheetDialogFragment.show(supportFragmentManager, EmojiBottomSheet.TAG)
Make sure to add the following in the AndroidManifest.xml
as an activity tag attribute of the
Activity you’re using the EmojiPicker in android:configChanges="screenLayout|orientation|screenSize"
.
This makes sure the EmojiPicker keeps working when the configuration changes when it’s opened.
EmojiPicker also contains an extension method to convert unicode back into an emoji. Example:
The unicode for the Welsh flag emoji (ó ˘ó ˇó Źó łó ˘ó ˇó Źó łó ˘ó ˇó Źó łđ´ó §ó ˘ó ˇó Źó łó ż) is 0x1F3F40xE00670xE00620xE00770xE006C0xE00730xE007F
and when using the toEmoji
method on that String, it’s converted to ó ˘ó ˇó Źó łó ˘ó ˇó Źó łó ˘ó ˇó Źó łđ´ó §ó ˘ó ˇó Źó łó ż again. It can be used as follows:
"0x1F3F40xE00670xE00620xE00770xE006C0xE00730xE007F".toEmoji()
or emoji.unicode.toEmoji()
.
âď¸ Customisation
EmojiPicker
uses the following color resources, which can be overwritten:
<color name="emojiPickerBackground"></color>
<color name="emojiPickerBackgroundInput"></color>
<color name="emojiPickerCategoryIconTint"></color>
<color name="emojiPickerDivider"></color>
<color name="emojiPickerSearchIconTint"></color>
<color name="emojiPickerSelectedCategoryIconTint"></color>
<color name="emojiPickerText"></color>
đ Multi-language
The EmojiPicker supports 39 languages: Arabic, Catalan, Czech, Danish, German, Greek, English, Australian English, British English, Spanish, Latin, Finnish, French, Canadian, Hebrew, Hindi, Croatian, Hungarian, Indonesian, Italian, Japanese, Korean, Malay, Norwegian, Dutch, Polish, Brazilian Portuguese, Portuguese, Romanian, Russian, Slovak, Swedish, Thai, Turkish, Ukrainian, Vietnamese, Simplified Chinese, Traditional Chinese and Hong Kong Chinese. Searching for an emoji can only be done in the English language.
âď¸ Changelog
The changelog can be found here.
â ď¸ License
Android Aroma EmojiPicker is licensed under the terms of the MIT Open Source license.