How can I do this? I'm pretty new to Java and Android and I have the problem described above. When I paste the emoji inside the xml file it shows a white square and another weird character which "copies" the next character.
Any idea on how to work this out?
You can put emojis in an XML, and the squares are just the editor's way to render characters it can't recognize, like all other characters, you can specify the character by its UTF8 value instead.
For example,
Try using this library - emoji-java
I know you want an XML way, and this is Java
It may help you
Example