// Path: app/src/main/java/com/xmpp/chat/dao/EmojiItem.java
// public class EmojiItem {
// 	public int id;
// 	public String emojiText;
// 	public Integer emojiGroup;
// 	public Drawable emojiDrawable;
// }


import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.SoftReference;
import java.util.ArrayList;
import java.util.HashMap;
import com.xmpp.chat.dao.EmojiItem;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.text.Html;
import android.text.Spanned;
import android.webkit.MimeTypeMap;
			+ "🌄-🌅-🌃-🗽-🌈-🎡-⛲-🎢-🚢-🚤-⛵-✈-🚀-🚲-🚙-🚗-🚕-🚌-🚓-🚒-🚑\n"
			+ "🚚-🚃-🚉-🚄-🚅-🎫-⛽-🚥-⚠-🚧-🔰-🎰-🚏-💈-♨-🏁-🎌-🇯-🇵-🇰-🇷-🇨-🇳-🇺🇸\n"
			+ "🇫-🇷-🇪-🇸-🇮-🇹-🇷-🇺-🇬-🇧-🇩-🇪\n"
			+ "1-⃣-2-⃣-3-⃣-4-⃣-5-⃣-6-⃣-7-⃣-8-⃣-9-⃣-0-⃣-#-⃣-⬆-⬇-⬅-➡-↗-↖-↘-↙-◀-▶\n"
			+ "⏪-⏩-🆗-🆕-🔝-🆙-🆒-🎦-🈁-📶-🚻-🚹-🚺-🚼-🚭-🅿-♿-🚇-🚾-🔞-🆔\n"
			+ "✴-💟-🆚-📳-📴-💹-💱-♈-♉-♊-♋-♌-♍-♎-♏-♐-♑-♒-♓-⛎\n"
			+ "🔯-🅰-🅱-🆎-🅾-🔲-🔴-🔳-🕛-🕐-🕑-🕒-🕓-🕔-🕕-🕖-🕗-🕘-🕙-🕚-⭕";

	private HashMap<String, SoftReference<Drawable>> emojiDrawables;

	public ArrayList<EmojiItem> allEmojis;

	public ArrayList<EmojiItem> getAllEmojis() {
		if (allEmojis == null) {
			allEmojis = new ArrayList<EmojiItem>();

			String[] index = EMOJI_INDEX.split("\n");
			int id = 0;
			int group = 0;
			for (int i = 0; i < index.length; i++) {
				String[] emojis = index[i].split("-");
				if (i == 6 || i == 9 || i == 16 || i == 20)
					group++;
				for (int j = 0; j < emojis.length; j++) {
					EmojiItem emoji = new EmojiItem();
					emoji.emojiText = emojis[j];
					emoji.id = id++;
					emoji.emojiGroup = group;
					RegionDrawable drawable = new RegionDrawable(emojiImages, (Rect) emojiRects.get(emojis[j]));
					drawable.setBounds(0, 0, 30, 30);
// Path: app/src/main/java/com/xmpp/chat/dao/EmojiItem.java
// public class EmojiItem {
// 	public int id;
// 	public String emojiText;
// 	public Integer emojiGroup;
// 	public Drawable emojiDrawable;
// }


// Path: app/src/main/java/com/xmpp/chat/util/EmojiUtil.java
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.SoftReference;
import java.util.ArrayList;
import java.util.HashMap;
import com.xmpp.chat.dao.EmojiItem;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.text.Html;
import android.text.Spanned;
import android.webkit.MimeTypeMap;

			+ "🌄-🌅-🌃-🗽-🌈-🎡-⛲-🎢-🚢-🚤-⛵-✈-🚀-🚲-🚙-🚗-🚕-🚌-🚓-🚒-🚑\n"
			+ "🚚-🚃-🚉-🚄-🚅-🎫-⛽-🚥-⚠-🚧-🔰-🎰-🚏-💈-♨-🏁-🎌-🇯-🇵-🇰-🇷-🇨-🇳-🇺🇸\n"
			+ "🇫-🇷-🇪-🇸-🇮-🇹-🇷-🇺-🇬-🇧-🇩-🇪\n"
			+ "1-⃣-2-⃣-3-⃣-4-⃣-5-⃣-6-⃣-7-⃣-8-⃣-9-⃣-0-⃣-#-⃣-⬆-⬇-⬅-➡-↗-↖-↘-↙-◀-▶\n"
			+ "⏪-⏩-🆗-🆕-🔝-🆙-🆒-🎦-🈁-📶-🚻-🚹-🚺-🚼-🚭-🅿-♿-🚇-🚾-🔞-🆔\n"
			+ "✴-💟-🆚-📳-📴-💹-💱-♈-♉-♊-♋-♌-♍-♎-♏-♐-♑-♒-♓-⛎\n"
			+ "🔯-🅰-🅱-🆎-🅾-🔲-🔴-🔳-🕛-🕐-🕑-🕒-🕓-🕔-🕕-🕖-🕗-🕘-🕙-🕚-⭕";

	private HashMap<String, SoftReference<Drawable>> emojiDrawables;

	public ArrayList<EmojiItem> allEmojis;

	public ArrayList<EmojiItem> getAllEmojis() {
		if (allEmojis == null) {
			allEmojis = new ArrayList<EmojiItem>();

			String[] index = EMOJI_INDEX.split("\n");
			int id = 0;
			int group = 0;
			for (int i = 0; i < index.length; i++) {
				String[] emojis = index[i].split("-");
				if (i == 6 || i == 9 || i == 16 || i == 20)
					group++;
				for (int j = 0; j < emojis.length; j++) {
					EmojiItem emoji = new EmojiItem();
					emoji.emojiText = emojis[j];
					emoji.id = id++;
					emoji.emojiGroup = group;
					RegionDrawable drawable = new RegionDrawable(emojiImages, (Rect) emojiRects.get(emojis[j]));
					drawable.setBounds(0, 0, 30, 30);
					emoji.emojiDrawable = drawable;