在机器人的EditField中表情符号的键盘支持机器人、表情符号、键盘、EditField

2023-09-05 06:58:09 作者:你的杨貌为我倾颖

我的应用程序采用了Android 4.0的三星Galaxy S3。

My application uses Android 4.0 on Samsung Galaxy S3.

我想融入的EditText现场表情符支持Android应用程序。 任何人都可以给我建议,我怎么能实现呢?

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

例如,在WhatsApp的和微信的应用程序,文本字段不支持表情符号键盘字符,但在我的应用程序就说明为I型使用表情符号键盘的每个字符。

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.

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());
        }
    });

和我也尝试 https://github.com/IPL/iOSStyleEditText

和表情符号,从 HTTP字体://klncity1.word$p$pss.com/tag/emoji /

但不工作

推荐答案

这取决于所用字体的的TextView 或其子像的EditText

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

每的查看可显示表情符号,因为有数百个表情符号包括在统一code和这些也成为了默认的最表情符号键盘和应用程序,如WhatsApp的使用。

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.

不过,你不会看到那些五颜六色的图像,你在WhatsApp的看到,例如。这是因为,WhatsApp的使用自定义字体/图像,这些表情符号代替它的默认外观。

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.

但是,如果你在正常的消息应用程序或其他地方添加表情符号到一个文本字段,你应该看到正常的Andr​​oid风格,是黑白表情符号显示了Android机器人。

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.

下面是常见的表情符号及其统一code codepoints的列表:

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

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

他们都在Android的正常字体的支持。我猜你可能已经改变了字体的的EditText 的布局。

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