All Projects → vanniktech → Emoji

vanniktech / Emoji

Licence: apache-2.0
A simple library to add Emoji support to your Android Application

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Emoji

Emojitaco
Alfred Emoji Script with Taco and other unicode 9 emoji
Stars: ✭ 51 (-95.75%)
Mutual labels:  emoji
Normalize country
Convert country names and codes to a standard.
Stars: ✭ 60 (-95%)
Mutual labels:  emoji
Emoji Cli
Emoji searcher
Stars: ✭ 68 (-94.34%)
Mutual labels:  emoji
Weird Json
A collection of strange encoded JSONs. For connoisseurs.
Stars: ✭ 53 (-95.59%)
Mutual labels:  emoji
Gitmoji Commit Hook
Start the commit message with an applicable emoji
Stars: ✭ 58 (-95.17%)
Mutual labels:  emoji
Country Code Emoji
convert country codes (ISO 3166-1 alpha-2) to corresponding emoji flags (unicode regional indicator symbols)
Stars: ✭ 65 (-94.59%)
Mutual labels:  emoji
Superbadges
Emoji Tab Bar button badges ✨
Stars: ✭ 47 (-96.09%)
Mutual labels:  emoji
Phpumoji
PHPUnit Emoji Result Printer
Stars: ✭ 75 (-93.76%)
Mutual labels:  emoji
Mojilist
🛍 Create shopping lists with emojis!
Stars: ✭ 60 (-95%)
Mutual labels:  emoji
Codefont
60余种常用的等宽字体 愉快的code吧 欢迎issues我 收录更多字体 Happy code bar with more than 60 common fonts of equal width. Welcome issues. I include more fonts.
Stars: ✭ 68 (-94.34%)
Mutual labels:  emoji
Emoji Art Generator
Use a genetic algorithm to evolve an image by putting emojies on a canvas
Stars: ✭ 53 (-95.59%)
Mutual labels:  emoji
Unicode Proposals
Proposals for new characters to encode and canonic character sequences to register
Stars: ✭ 55 (-95.42%)
Mutual labels:  emoji
Emojis List
Complete list of standard emojis.
Stars: ✭ 65 (-94.59%)
Mutual labels:  emoji
Code Review Emoji Guide
An emoji legend to help convey intention and added meaning in code review comments.
Stars: ✭ 52 (-95.67%)
Mutual labels:  emoji
Hexo Filter Github Emojis
github emojis for hexo! 🎉
Stars: ✭ 71 (-94.09%)
Mutual labels:  emoji
Emotecollector
Collects emotes from other servers for use by people who don't have Nitro
Stars: ✭ 51 (-95.75%)
Mutual labels:  emoji
Emoji Regex
A regular expression to match all Emoji-only symbols as per the Unicode Standard.
Stars: ✭ 1,134 (-5.58%)
Mutual labels:  emoji
Laravel Smartmd
🎯 A simple markdown editor compatible most markdown parse,You can choose any parse methods on server or client,like Mathematical formula、flowchart、upload image...
Stars: ✭ 76 (-93.67%)
Mutual labels:  emoji
Rime pure
【rime小狼毫\trime同文】手机/PC一站式配置【简约皮肤\拼音搜狗词库\原创trime同文四叶草九宫格拼音方案\四叶草拼音、小鹤双拼、极品五笔、徐码、郑码】 rime配置
Stars: ✭ 73 (-93.92%)
Mutual labels:  emoji
Ideogram
Insert emoji anywhere in elementary OS, even in non-native apps
Stars: ✭ 68 (-94.34%)
Mutual labels:  emoji

Emoji

A library to add Emoji support to your Android app. Emojis can be picked in a PopupWindow. In order to edit and display text with Emojis this library provides public APIs:

There's also a EmojiLayoutFactory, which can be used to get automatic Emoji support when using normal Android Views such as TextView, Checkbox, etc.

Material Design Library bindings can be included via:

implementation 'com.vanniktech:emoji-material:0.7.0'

There's also a MaterialEmojiLayoutFactory, which can be used to get automatic Emoji support.

The library has 4 different providers to choose from (iOS, Google, Facebook & Twitter).

iOS Emojis

Normal KeyboardEmoji KeyboardRecent Emojis

For getting the above iOS Emojis simply add the dependency and code below.

implementation 'com.vanniktech:emoji-ios:0.7.0'

And install the provider in your application class.

EmojiManager.install(new IosEmojiProvider());

Google

Normal KeyboardEmoji KeyboardRecent Emojis

For getting the above Google Emojis simply add the dependency and code below.

implementation 'com.vanniktech:emoji-google:0.7.0'

And install the provider in your application class.

EmojiManager.install(new GoogleEmojiProvider());

Facebook

Normal KeyboardEmoji KeyboardRecent Emojis

For getting the above Facebook Emojis simply add the dependency and code below.

implementation 'com.vanniktech:emoji-facebook:0.7.0'

And install the provider in your application class.

EmojiManager.install(new GoogleEmojiProvider());

Twitter

Normal KeyboardEmoji KeyboardRecent Emojis

For getting the above Twitter Emojis simply add the dependency and code below.

implementation 'com.vanniktech:emoji-twitter:0.7.0'

And install the provider in your application class.

EmojiManager.install(new TwitterEmojiProvider());

Custom Emojis

If you want to display your own Emojis you can create your own implementation of EmojiProvider and pass it to EmojiManager.install.

All of the core API lays in emoji, which is being pulled in automatically by the provided implementations:

implementation 'com.vanniktech:emoji:0.7.0'

Set up

Inserting Emojis

Declare your EmojiEditText in your layout xml file.

<com.vanniktech.emoji.EmojiEditText
  android:id="@+id/emojiEditText"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:imeOptions="actionSend"
  android:inputType="textCapSentences|textMultiLine"
  android:maxLines="3"/>

To open the EmojiPopup execute the code below:

final EmojiPopup emojiPopup = EmojiPopup.Builder.fromRootView(rootView).build(emojiEditText);
emojiPopup.toggle(); // Toggles visibility of the Popup.
emojiPopup.dismiss(); // Dismisses the Popup.
emojiPopup.isShowing(); // Returns true when Popup is showing.

The rootView is the rootView of your layout xml file which will be used for calculating the height of the keyboard. emojiEditText is the EmojiEditText that you declared in your layout xml file.

Displaying Emojis

<com.vanniktech.emoji.EmojiTextView
  android:id="@+id/emojiTextView"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"/>

Just use the EmojiTextView and call setText with the String that contains Unicode encoded Emojis. To change the size of the displayed Emojis use the lineHeight property from TextView.

EmojiPopup Listeners

The EmojiPopup builder allows you to declare several listeners.

setOnSoftKeyboardCloseListener(OnSoftKeyboardCloseListener listener);
setOnEmojiClickListener(OnEmojiClickListener listener);
setOnSoftKeyboardOpenListener(OnSoftKeyboardOpenListener listener);
setOnEmojiPopupShownListener(OnEmojiPopupShownListener listener);
setOnEmojiPopupDismissListener(OnEmojiPopupDismissListener listener);
setOnEmojiBackspaceClickListener(OnEmojiBackspaceClickListener listener);

EmojiPopup Configuration

Custom Recent Emoji implementation

You can pass your own implementation of the recent Emojis. Implement the RecentEmoji interface and pass it when you're building the EmojiPopup:

setRecentEmoji(yourClassThatImplementsRecentEmoji)

If no instance or a null instance is set the default implementation will be used.

Custom Variant Emoji implementation

You can pass your own implementation of the variant Emojis. Implement the VariantEmoji interface and pass it when you're building the EmojiPopup:

setVariantEmoji(yourClassThatImplementsVariantEmoji)

If no instance or a null instance is set the default implementation will be used.

Animations

Custom keyboard enter and exit animations

You can pass your own animation style for enter and exit transitions of the Emoji keyboard while you're building the EmojiPopup:

setKeyboardAnimationStyle(R.style.emoji_fade_animation_style);

If no style is set the keyboard will appear and exit as a regular PopupWindow. This library currently ships with two animation styles as an example:

  • R.style.emoji_slide_animation_style
  • R.style.emoji_fade_animation_style

Custom page transformers

You can pass your own Page Transformer for the Emoji keyboard View Pager while you're building the EmojiPopup:

setPageTransformer(new MagicTransformer());

If no transformer is set ViewPager will behave as its usual self. Please do note that this library currently does not ship any example Page Transformers.

Other goodies

  • MaximalNumberOfEmojisInputFilter can be used to limit the number of Emojis one can type into an EditText
  • OnlyEmojisInputFilter can be used to limit the input of an EditText to emoji only
  • SingleEmojiTrait can be used to force a single emoji which can be replaced by a new one
  • EmojiEditText#disableKeyboardInput() to disable normal keyboard input. To undo call #enableKeyboardInput()

Snapshots

This library is also distributed as a SNAPSHOT if you like to check out the latest features.

Note: The API is not stable and may change and break your code at any time if you use a SNAPSHOT.

Add this to your repositories:

maven { url "https://oss.sonatype.org/content/repositories/snapshots" }

And one of these to your dependencies:

implementation 'com.vanniktech:emoji:0.8.0-SNAPSHOT'
implementation 'com.vanniktech:emoji-ios:0.8.0-SNAPSHOT'
implementation 'com.vanniktech:emoji-google:0.8.0-SNAPSHOT'
implementation 'com.vanniktech:emoji-twitter:0.8.0-SNAPSHOT'
implementation 'com.vanniktech:emoji-facebook:0.8.0-SNAPSHOT'
implementation 'com.vanniktech:emoji-material:0.8.0-SNAPSHOT'

Proguard

No configuration needed.

License

Copyright (C) 2016 - Niklas Baudy, Ruben Gees, Mario Đanić and contributors

Licensed under the Apache License, Version 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].