[英]How to send Smileys/Emoticons with SMS in android Application
I am developing a SMS Application, but I have to add Smileys/Emoticons with the SMS. 我正在开发SMS应用程序,但必须在SMS中添加Smileys / Emoticons。 But I don't know how to do that.Please suggest any solution regarding the same.
但我不知道该怎么办。请提出与此有关的任何解决方案。
Thanks 谢谢
You can keep all the smiley's in the drawable folder and use a HashMap
to link the resource_id
with the smiley character
and use ImageSpan
to attach the image with text inside a TextView. 您可以将所有笑脸都保留在drawable文件夹中,并使用
HashMap
来将resource_id
与smiley character
链接起来,并使用ImageSpan
将图像与文本附加到TextView中。 I had just created a demo for the same, you can find it from here
. 我刚刚为此创建了一个演示,您可以从
here
找到它。
您将必须在“文本框”中使用ImageSpan来转换表情。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.