Add Emoji support to your Android app!
This library combines the works of @rocboronat, @ankushsachdeva and @peibumur and my one continuation of this project.
Gradle:
repositories {
...
maven { url "https://jitpack.io" }
}
...
dependencies {
compile 'com.github.Data5tream:emoji-lib:0.0.2.1'
}
Maven:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
...
<dependency>
<groupId>com.github.data5tream</groupId>
<artifactId>emoji-lib</artifactId>
<version>0.0.2.1</version>
</dependency>
Use com.github.data5tream.emojilib.EmojiTextView
and com.github.data5tream.emojilib.EmojiEditText
in your layout XMLs to automatically represent unicode emojis.
Use EmojiParser
to convert Emoji Cheat Sheet codes into unicode characters:
String formattedAsCheatCode = ":smile:";
String formattedAsUnicode = EmojiParser.parseEmojis(formattedAsCheatCode);
formattedAsUnicode
will be: 😄
You can also use EmojiParser
to convert unicode emojis into Emoji Cheat Sheet codes:
String formattedAsUnicode = "😄";
String formattedAsCheatCode = EmojiParser.convertToCheatCode(formattedAsUnicode);
formattedAsCheatCode
will be: :smile:
To use the emoji-keyboard, take a look at the example code.
Emoji Support Lib uses emoji graphics from emoji-cheat-sheet.com.
This project has a dependency on Guava.
Copyright 2016 Simon Barth
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.