Emoji edittext should return Unicode

你离开我真会死。 提交于 2019-12-12 02:52:59

问题


I am working on Emoji.

I have used this library.

It works fine, But when i get text from the EmojiconEditText it do not returns me unicode which are used in that edittext.

As example If text is I \ue32d emojicon wher \ue32d is a heart icon. When use String Text=EmojiconEditText .gettext(); it should return the same text as "I \ue32d emojicon"

Please help me for the same.


回答1:


Finally i found solution.

You can get unicode from emoji by using commons-lang-2.5 jar

Check below code for emoji to unicode.

String textVal=edtpost.getText().toString();
String newval_unicode=StringEscapeUtils.escapeJava(textVal);

You can find uni code from this string.

May this answer help others.



来源:https://stackoverflow.com/questions/36474023/emoji-edittext-should-return-unicode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!