Library for Emoji View like Hangouts, Emoji TextView and Emoji EditText
This library has been inspired by chathudan/KitKatEmoji
From Source
- For using KitKatEmoji module in sample app, include the source code and add the below dependencies in entry/build.gradle to generate hap/support.har.
implementation project(path: ':kitkatemoji')
- For using KitKatEmoji module in separate application using har file, add the har file in the entry/libs folder and add the dependencies in entry/build.gradle file.
implementation fileTree(dir: 'libs', include: ['*.har'])
<!-- create a container to put the emojikeyboard -->
<DirectionalLayout
ohos:id="$+id:emoji_keyboard_fraction"
ohos:height="250vp"
ohos:width="match_parent"
ohos:visibility="hide"
ohos:background_element="#FFFFEEAD"
/>
// extends the FractionAbility
public class MainAbility extends FractionAbility {
@Override
void onStart(){
// create the emoji keyboard
EmojiconsFraction emojiconsFraction = new EmojiconsFraction(getContext());
// add listeners
emojiconsFraction.setOnEmojiIconClickedListener(emojicon -> emojiconsFraction.input(messageEd, emojicon));
emojiconsFraction.setOnEmojiIconBackspaceClickedListener(c -> emojiconsFraction.backspace(messageEd));
// add the emoji icon to the container
getFractionManager()
.startFractionScheduler()
.add(ResourceTable.Id_emoji_keyboard_fraction, emojiconsFraction)
.submit();
}
}
for complete example please take a look at the sample application.
KitKatEmoji is released under the Apache License Version 2.0.