How to use - AhmedCommando/emojis_manager GitHub Wiki
How to use
-
Download the library and add it to your project using file->new->import module
-
frist of all, you have to create a emoji hashmap like this:
HashMap<String, Integer> list = new HashMap<>();
// fill the list with some emojis for this example
list.put(":)",R.drawable.smiley);
list.put(";)",R.drawable.wink);
list.put(":poop:",R.drawable.poop);
list.put(":p ",R.drawable.tongue);
- then call emojis library, pass your list and finally insert you result in a textview
SEmojis an = new SEmojis(this);
//must do, to set your emojis list
an.init(list);
SpannableStringBuilder res = an.FetchAndReplace(msg);
//set the result on any text view
output.setText(res);