A library to show emoji in TextView, EditText (like WhatsApp) for Android

Overview

Discontinued

This projected is discontinued. Please consider using other alternative, i.e EmojiCompat.

Contact me if you want to continue working on another forked repository so I can promote it here. Cheers!

Android Gems

CircleCI emojicon on Maven Central

Emojicon

Do you like emojis in Whatsapp, iMessage? Emojicon is a library to implement such a thing for Android.

Example

emojiconize

import io.github.rockerhieu.emojiconize.Emojiconize;

// Your activity must be a subclass of AppCompatActivity
public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // Emojiconize the whole activity, must call before `super.onCreate()`
        Emojiconize.activity(this).go();
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

More information: rockerhieu/emojiconize

emojicon

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:emojicon="http://schemas.android.com/apk/res-auto"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical">

    <io.github.rockerhieu.emojicon.EmojiconTextView
            android:id="@+id/txtEmojicon"
            android:text="I \ue32d emojicon"
            emojicon:emojiconAlignment="baseline"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>

    <io.github.rockerhieu.emojicon.EmojiconEditText
            android:id="@+id/editEmojicon"
            android:text="I \ue32d emojicon"
            emojicon:emojiconSize="28sp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>
    <fragment
            android:id="@+id/emojicons"
            android:layout_width="match_parent"
            android:layout_height="220dp"
            class="io.github.rockerhieu.emojicon.EmojiconsFragment"/>
</LinearLayout>

image

Note: You can change the size and alignment of emojis in XML layout through attribute emojiconSize and emojiconAlignment, respectively.

Usage

  • EmojiconTextView: a TextView which can render emojis.
  • EmojiconEditText: a EditText which can render emojis.
  • EmojiconMultiAutoCompleteTextView: a MultiAutoCompleteTextView which can render emojis.
  • EmojiconGridFragment: a fragment contains emojis in a GridView for the user to choose.
  • EmojiconsFragment: a fragment contains many set of emojis for the user to choose.

Building in IntelliJ

Via Gradle:

compile 'io.github.rockerhieu:emojicon:<latest-version>'

Building in Eclipse

Go home you're drunk

Acknowledgements

Emojicon is using emojis graphics from emoji-cheat-sheet.com.

Contributing

Please fork this repository and contribute back using pull requests.

Any contributions, large or small, major features, bug fixes, additional language translations, unit/integration tests are welcomed and appreciated but will be thoroughly reviewed and discussed.

License

Copyright 2014 Hieu Rocker

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.
Comments
  • rockerhieu-emojicon keyboard

    rockerhieu-emojicon keyboard

    hello i'm finding a problem in rockerhieu-emojicon keyboard downloaded from this link https://github.com/rockerhieu/emojicon

    when launching the example, in the "recent" fragment numbers are showing and they are not pictures, just numbers.. any one have any idea how to solve this?

    opened by HananeAlSamrout 20
  • Attach fragment in PopupWindow

    Attach fragment in PopupWindow

    Hello,

    First of all, congratulations for the library, it's great!

    Is it possible to create a PopupWindow with fragment "EmojiconsFragment" to do a layer like whattsapp (to toggle keyboard to emojicons)? I tried this with the DialogFragment and PopupWindow and there's always the error:

    IllegalArgumentException: No view found for id...

    If I attach the fragment in the general layout, it works correctly, but not in this case.

    Thanks

    question 
    opened by kanu8 19
  • Send text with emoji to server.

    Send text with emoji to server.

    Hello,

    I have problem with send the text with emoji to server. When I send they are becoming to ???. Server side work perfectly, because I have tested it with the iOS version.

    Any suggestion?

    Thanks, Vardan

    question 
    opened by vgevorgyan 15
  • Cannot Resolve method Type Boolean

    Cannot Resolve method Type Boolean

    @rockerhieu I used your example code in my project. Used the same Layout file. Imported the dependencies in gradle. Everything is done as mentioned. But still I get an error in the Cannot Resolve method error for

    "setUseSystemDefault(b)" and "EmojiconsFragment.newInstance(useSystemDefault)"

    Am I missing something?

    opened by harishannam 12
  • Ellipsis for emojicon

    Ellipsis for emojicon

    when i enter more emojicons and they are out of the view then I am not able to show ellipsis. I tried android:singleLine="true" android:ellipsize="end" but not working. Please help.

    opened by seema7 11
  • Seems to be wrong release version. Example not working for using unsupported method

    Seems to be wrong release version. Example not working for using unsupported method

    Using IntelliJ and importing as

    compile 'com.rockerhieu.emojicon:library:1.0'

    However, in EmojiActivity.java, none of

    mEditEmojicon.setUseSystemDefault(b) mTxtEmojicon.setUseSystemDefault(b) EmojiconsFragment.newInstance(useSystemDefault)

    could be found.

    Did I config the dependencies wrong or the library has a version mismatch with the example?

    Thanks,

    • Felix
    opened by felixswang 10
  • Installation issues - some tips

    Installation issues - some tips

    Thanks for writing this!

    Some tips for installation, at least for Windows 7:

    One tip that would have saved me time would be in the Eclipse Integration Gradle installation - don't waste time installing the STS dashboard. Just install from the update site, and make sure that you uncheck the Spring-based tools (which are checked by default). If you don't, then you may run into other dependency issues, like I did.

    Another error resulted in having to create a file called local.properties in the emojicon dir with this line:

    sdk.dir=/this/is/my/sdk/loc

    Obviously you will need to change that for your own sdk location.

    If you hard code with c:\this\is\my\sdk\loc, it doesn't work.

    There may be a default root dir, but I didn't want to spend more time playing around with it.

    question 
    opened by etchen99 10
  • How to use it in a fragment?

    How to use it in a fragment?

    I want use the emojicon, and the parent is a fragment, I mean the EditEmojicon view in a fragment. I can't use it! So How to use it in a fragment? thanks...

    opened by ShenghuGong 8
  • New iOS 9.1 emojis, emoji modifiers (skintones, etc)

    New iOS 9.1 emojis, emoji modifiers (skintones, etc)

    Addresses issues #82 and #85.

    I did this:

    String resourceName = "emoji_" + hexUnicode + "_" + hexFollowUnicode;
    
    int resourceId = context.getResources().getIdentifier(resourceName, "drawable", context.getApplicationContext().getPackageName());
    

    for handling emoji modifiers rather than adding (64x5) more elements to a map. I'm not totally sure if this will work everywhere but if it does it seems like we could do something like this for all the emojis rather than managing those huge maps since all of the drawables are appropriately named.

    opened by pfives 7
  • Cross platform Emoji Support

    Cross platform Emoji Support

    This emoji library is part of one of my android application,same application have desktop client also. Sent emoji can view mobile to mobile. But for cross platform facing issue that while passing emoji through desktop to mobile n vice versa,respective emoji is not reflecting at another client, Rather it shows single box only.

    Kindly advice for cross platform emoji support.

    opened by sagarlotus 7
  • won't build for me

    won't build for me

    Hi,

    I am trying to build Kontalk which pulls in emojicon as a submodule, but it fails: http://pastebin.com/Q4VRhnyF

    I have also tried directly building emojicon with ./gradlew clean build --debug , it results in the following log: http://pastebin.com/Zj5L1rZi

    Thanks for your help!

    opened by h-2 6
  • 采用系统默认表情 将选择表情背景换成白色时  键盘上显示的表情颜色变淡

    采用系统默认表情 将选择表情背景换成白色时 键盘上显示的表情颜色变淡

    采用系统默认表情,将选择表情背景换成白色时,键盘上显示的表情颜色变淡,请问这种情况该如何解决。我看了源码,并没有找到问题出在哪里,采用非系统默认表情时显示正常。

    The default emoticon is adopted. When the background of the selected emoticon is changed to white, the emoticon color displayed on the keyboard will be diluted. May I ask how to solve this situation?I looked at the source code, and did not find the problem is where the non-system default emoticon display normal.

    opened by BarkSheep 0
Releases(v1.4.0)
  • v1.4.0(Aug 1, 2016)

    This release contains some performance improvements when rendering emojis.

    Breaking changes

    Everything is now released under io.github.rockerhieu:emojicon, all classes are moved to io.github.rockerhieu.emojicon accordingly.

    Source code(tar.gz)
    Source code(zip)
  • v1.0(Mar 3, 2014)

    This is the first release with features:

    • EmojiconTextView: a TextView which can render emojis.
    • EmojiconEditText: a EditText which can render emojis.
    • EmojiconGridFragment: a fragment contains emojis in a GridView for the user to choose.
    • EmojiconsFragment: a fragment contains many set of emojis for the user to choose.

    License Apache Version 2.0

    Copyright 2014 Hieu Rocker
    
    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.
    
    Source code(tar.gz)
    Source code(zip)
Owner
Hieu Rocker
I'm a workaholic & a playaholic but not a sleepaholic
Hieu Rocker
Android form edit text is an extension of EditText that brings data validation facilities to the edittext.

Android Form EditText Android form edit text is an extension of EditText that brings data validation facilities to the edittext. Example App I built a

Andrea 1.5k Dec 14, 2022
Androids EditText that animates the typed text. EditText is extended to create AnimatedEditText and a PinEntryEditText.

AnimatedEditText for Android This repository contains AnimatedEditText and TextDrawable all of which extend the behaviour of EditText and implement fe

Ali Muzaffar 439 Nov 29, 2022
Form validation and feedback library for Android. Provides .setText for more than just TextView and EditText widgets. Provides easy means to validate with dependencies.

android-formidable-validation Form validation and feedback library for Android. Provides .setText for more than just TextView and EditText widgets. Pr

Linden 147 Nov 20, 2022
An extension of Android's TextView, EditText and Button that let's you use the font of your choice

AnyTextView (deprecated) Note: AnyTextView is no longer being maintained. I recommend replacing AnyTextView with the Calligraphy library instead. Frus

Hans Petter Eide 165 Nov 11, 2022
Simple way to create linked text, such as @username or #hashtag, in Android TextView and EditText

Simple Linkable Text Simple way to create link text, such as @username or #hashtag, in Android TextView and EditText Installation Gradle Add dependenc

Aditya Pradana Sugiarto 76 Nov 29, 2022
A simple and flexible Checked TextView or Checkable TextView

CheckableTextView Checkable TextView [KOTLIN] ⚡ A simple and flexible Checked TextView or Checkable TextView written in Kotlin ⚡ What's New Animation

null 110 Nov 20, 2022
Mentions-TextView - Make Mentions and hashtags clickable in Textview

Mentions Textview Custome Textview with Mentions and hashtags being clickable. D

null 2 Jan 9, 2022
Android's TextView that can expand/collapse like the Google Play's app description

ExpandableTextView ExpandableTextView is an Android library that allows developers to easily create an TextView which can expand/collapse just like th

Manabu S. 4k Dec 28, 2022
Android library contain custom realisation of EditText component for masking and formatting input text

Masked-Edittext Masked-Edittext android library EditText widget wrapper add masking and formatting input text functionality. Install Maven <dependency

Evgeny Safronov 600 Nov 29, 2022
A single EditText instead of a classical form. Library that implements flavienlaurent's singleinputform

material-singleinputform A single EditText instead of a classical form. This Library is a library implementation of flavienlaurent's "Single input for

Jan Heinrich Reimer 200 Nov 14, 2022
A single EditText instead of a classical form. Library that implements flavienlaurent's singleinputform

material-singleinputform A single EditText instead of a classical form. This Library is a library implementation of flavienlaurent's "Single input for

Jan Heinrich Reimer 200 Nov 14, 2022
AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.

AutoscaleEditText AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size. Latest Version How to use

Txus Ballesteros 354 Nov 28, 2022
A module designed to encapsulate the use of an Android EditText field for gathering currency information from a user. Supports all ISO-3166 compliant locales/currencies.

CurrencyEditText CurrencyEditText is an extension of Android's EditText view object. It is a module designed to provide ease-of-use when using an Edit

Josh Kitchens 335 Dec 25, 2022
Add text masking functionality to Android EditText. It will prevent user from inserting not allowed signs, and format input as well.

MaskFormatter MaskFormatter adds mask functionality to your EditText. It will prevent user from inserting not allowed signs, and format input as well.

Azimo Labs 161 Nov 25, 2022
A simple Android Tag EditText

TagEditText A simple Android Tag EditText. Setup The easiest way to add the TagEditText library to your project is by adding it as a dependency to you

HearSilent 15 May 5, 2022
An Android App example of how to create a custom EditText using DoubleLinkedList Data Structure

DoubleLinkedListEditText Library This is a library to create an EditText based on the Doubly Linked List data structure so that the user can enter cod

Layon Martins 1 Nov 9, 2021
A custom EditText with a switchable icon which shows or hides the password

Deprecated This library is deprecated now as there is an official way to use the password toggle with the TextInputLayout (inside the support library

Maksim 430 Nov 20, 2022
Uma máscara personalizável para EditText, que pode ser adicionada como um TextWatcher.

Custom-Mask-for-EditText ?? ( Máscara personalizável para EditTexts!) Uma máscara customizável que pode ser adicionada aos seus EditTexts, e adaptada

Thyago Neves Silvestre 3 Jun 14, 2022
Lightweight android library for highlighting sections of a textview, with optional callbacks.

Linker Lightweight android library for highlighting Strings inside of a textview (ignoring case), with optional callbacks. Language: Java MinSDK: 17 J

Josh Gainey 35 Apr 30, 2022