aboutsummaryrefslogtreecommitdiffstats
path: root/libs/emojicon
diff options
context:
space:
mode:
Diffstat (limited to 'libs/emojicon')
-rw-r--r--libs/emojicon/src/main/java/github/ankushsachdeva/emojicon/EmojiconHandler.java52
1 files changed, 18 insertions, 34 deletions
diff --git a/libs/emojicon/src/main/java/github/ankushsachdeva/emojicon/EmojiconHandler.java b/libs/emojicon/src/main/java/github/ankushsachdeva/emojicon/EmojiconHandler.java
index 0df62b57..3e032c42 100644
--- a/libs/emojicon/src/main/java/github/ankushsachdeva/emojicon/EmojiconHandler.java
+++ b/libs/emojicon/src/main/java/github/ankushsachdeva/emojicon/EmojiconHandler.java
@@ -1406,48 +1406,32 @@ public final class EmojiconHandler {
.getInstance();
static {
- addPattern(ANDROID_EMOTICONS, ":)", R.drawable.emo_im_happy);
- addPattern(ANDROID_EMOTICONS, ":-)", R.drawable.emo_im_happy);
- addPattern(ANDROID_EMOTICONS, ":(", R.drawable.emo_im_sad);
- addPattern(ANDROID_EMOTICONS, ":-(", R.drawable.emo_im_sad);
- addPattern(ANDROID_EMOTICONS, ";)", R.drawable.emo_im_winking);
- addPattern(ANDROID_EMOTICONS, ";-)", R.drawable.emo_im_winking);
- addPattern(ANDROID_EMOTICONS, ":P",
+ addPattern(ANDROID_EMOTICONS, ":-?\\)", R.drawable.emo_im_happy);
+ addPattern(ANDROID_EMOTICONS, ":-?\\(", R.drawable.emo_im_sad);
+ addPattern(ANDROID_EMOTICONS, ";-?\\)", R.drawable.emo_im_winking);
+ addPattern(ANDROID_EMOTICONS, ":-?[pP]",
R.drawable.emo_im_tongue_sticking_out);
- addPattern(ANDROID_EMOTICONS, ":-P",
- R.drawable.emo_im_tongue_sticking_out);
- addPattern(ANDROID_EMOTICONS, "=-O", R.drawable.emo_im_surprised);
- addPattern(ANDROID_EMOTICONS, ":*", R.drawable.emo_im_kissing);
- addPattern(ANDROID_EMOTICONS, ":-*", R.drawable.emo_im_kissing);
- addPattern(ANDROID_EMOTICONS, ":O", R.drawable.emo_im_wtf);
- addPattern(ANDROID_EMOTICONS, ":-O", R.drawable.emo_im_wtf);
- addPattern(ANDROID_EMOTICONS, "B)", R.drawable.emo_im_cool);
- addPattern(ANDROID_EMOTICONS, "B-)", R.drawable.emo_im_cool);
- addPattern(ANDROID_EMOTICONS, "8)", R.drawable.emo_im_cool);
- addPattern(ANDROID_EMOTICONS, "8-)", R.drawable.emo_im_cool);
- addPattern(ANDROID_EMOTICONS, ":$", R.drawable.emo_im_money_mouth);
- addPattern(ANDROID_EMOTICONS, ":-$", R.drawable.emo_im_money_mouth);
- addPattern(ANDROID_EMOTICONS, ":-!", R.drawable.emo_im_foot_in_mouth);
- addPattern(ANDROID_EMOTICONS, ":-[", R.drawable.emo_im_embarrassed);
- addPattern(ANDROID_EMOTICONS, "O:)", R.drawable.emo_im_angel);
- addPattern(ANDROID_EMOTICONS, "O:-)", R.drawable.emo_im_angel);
- addPattern(ANDROID_EMOTICONS, ":\\", R.drawable.emo_im_undecided);
- addPattern(ANDROID_EMOTICONS, ":-\\", R.drawable.emo_im_undecided);
- addPattern(ANDROID_EMOTICONS, ":'(", R.drawable.emo_im_crying);
- addPattern(ANDROID_EMOTICONS, ":D", R.drawable.emo_im_laughing);
- addPattern(ANDROID_EMOTICONS, ":-D", R.drawable.emo_im_laughing);
+ addPattern(ANDROID_EMOTICONS, "=-[oO0]", R.drawable.emo_im_surprised);
+ addPattern(ANDROID_EMOTICONS, ":-?\\*", R.drawable.emo_im_kissing);
+ addPattern(ANDROID_EMOTICONS, ":-?[oO0]", R.drawable.emo_im_wtf);
+ addPattern(ANDROID_EMOTICONS, "[8B]-?\\)", R.drawable.emo_im_cool);
+ addPattern(ANDROID_EMOTICONS, ":-?\\$", R.drawable.emo_im_money_mouth);
+ addPattern(ANDROID_EMOTICONS, ":-?!", R.drawable.emo_im_foot_in_mouth);
+ addPattern(ANDROID_EMOTICONS, ":-?\\[", R.drawable.emo_im_embarrassed);
+ addPattern(ANDROID_EMOTICONS, "[oO0]:-?\\)", R.drawable.emo_im_angel);
+ addPattern(ANDROID_EMOTICONS, ":-?[\\\\/]", R.drawable.emo_im_undecided);
+ addPattern(ANDROID_EMOTICONS, ":'-?\\(", R.drawable.emo_im_crying);
+ addPattern(ANDROID_EMOTICONS, ":-?D", R.drawable.emo_im_laughing);
addPattern(ANDROID_EMOTICONS, "O_o", R.drawable.emo_im_wtf);
addPattern(ANDROID_EMOTICONS, "o_O", R.drawable.emo_im_wtf);
- addPattern(ANDROID_EMOTICONS, ">:O", R.drawable.emo_im_yelling);
- addPattern(ANDROID_EMOTICONS, ">:0", R.drawable.emo_im_yelling);
- addPattern(ANDROID_EMOTICONS, ":S", R.drawable.emo_im_lips_are_sealed);
- addPattern(ANDROID_EMOTICONS, ":-S", R.drawable.emo_im_lips_are_sealed);
+ addPattern(ANDROID_EMOTICONS, ">:[oO0]", R.drawable.emo_im_yelling);
+ addPattern(ANDROID_EMOTICONS, ":-?[sS]", R.drawable.emo_im_lips_are_sealed);
addPattern(ANDROID_EMOTICONS, "<3", R.drawable.emo_im_heart);
}
private static void addPattern(Map<Pattern, Integer> map, String smile,
int resource) {
- map.put(Pattern.compile(Pattern.quote(smile)), resource);
+ map.put(Pattern.compile(smile), resource);
}
private static boolean getSmiledText(Context context, Spannable spannable) {