Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emoji Keyboard support for EditField in android

My application uses Android 4.0 on Samsung Galaxy S3.

I want to integrate Emoji character support in EditText field in Android application. Can anyone suggest me, how can I achieve it?

For example, In whatsapp and wechat application, TextField does support Emoji keyboard characters, but in my application it shows ? for each character I type using Emoji keyboard.

Screenshot explaining my need

text_message = (EditText) findViewById(R.id.editText1);
    text_view = (textView) findViewById(R.id.textView1);
    btntest = (Button) findViewById(R.id.button1);
    btntest.setOnClickListener(new OnClickListener()
    {
        public void onClick(View v)
        {

            text_swype.setText(text_message.getText().toString());
        }
    });

and i also try https://github.com/IPL/iOSStyleEditText

and font of emoji from http://klncity1.wordpress.com/tag/emoji/

but not work

like image 661
HiteshGs Avatar asked Jan 03 '14 08:01

HiteshGs


People also ask

Is there an emoji keyboard for Android?

You'll want to go to Settings > General, then scroll down and tap on Keyboard. Below a handful of toggle settings like Auto-Capitalization is the Keyboards setting. Tap that, then tap "Add New Keyboard." There, sandwiched between non-English language keyboards is the Emoji keyboard. Select it.

How do I get emojis on my Android Bluetooth keyboard?

If you have a Bluetooth keyboard connected to your Android phone or tablet, you can hit the Alt key to bring up the emoji palette.


3 Answers

It depends on the font that is used for the TextView or its subclasses like EditText.

Every View can display emoji because there are hundreds of emoji included in Unicode and those have also become the default that most emoji keyboards and apps like WhatsApp use.

However, you won't see those colorful images as you see in WhatsApp, for example. This is because WhatsApp uses custom fonts/images for these emoji which replace the default appearance.

But if you add emoji to a text field in your normal "Messages" application or somewhere else, you should see the normal Android style which is monochrome emoji showing the Android robot.

Here's a list of common emoji and their Unicode codepoints:

https://github.com/delight-im/Emoji

They're all supported in Android's normal font. I guess you may have changed the font of your EditText in the layout.

like image 78
caw Avatar answered Sep 28 '22 00:09

caw


You can use EmojiconTextView or EmojiconEditText from this library : https://github.com/rockerhieu/emojicon

like image 30
Hieu Rocker Avatar answered Sep 27 '22 23:09

Hieu Rocker


Here is the list of available emoji Unicode

Sending content to Server you need to use org.apache.commons.lang3.escapeJava(...) and when getting data from server you need to reverse Unicode to emoticon so you have to use org.apache.commons.lang3.unescapeJava(...)

like image 24
AZ_ Avatar answered Sep 28 '22 00:09

AZ_