@Test public void isOnlyEmojisMultipleEmojisAndText() { assertThat(EmojiUtils.isOnlyEmojis(EMOJI_1 + "hello" + EMOJI_2)).isFalse(); }
public static boolean isOnlyEmojis(@Nullable final CharSequence text) { if (text != null && text.length() > 0) { final String inputWithoutSpaces = SPACE_REMOVAL.matcher(text).replaceAll(Matcher.quoteReplacement("")); return EmojiManager.getInstance() .getEmojiRepetitivePattern() .matcher(inputWithoutSpaces) .matches(); } return false; }
EmojiUtils { public static boolean isOnlyEmojis(@Nullable final CharSequence text) { if (text != null && text.length() > 0) { final String inputWithoutSpaces = SPACE_REMOVAL.matcher(text).replaceAll(Matcher.quoteReplacement("")); return EmojiManager.getInstance() .getEmojiRepetitivePattern() .matcher(inputWithoutSpaces) .matches(); } return false; } }
EmojiUtils { public static boolean isOnlyEmojis(@Nullable final CharSequence text) { if (text != null && text.length() > 0) { final String inputWithoutSpaces = SPACE_REMOVAL.matcher(text).replaceAll(Matcher.quoteReplacement("")); return EmojiManager.getInstance() .getEmojiRepetitivePattern() .matcher(inputWithoutSpaces) .matches(); } return false; } private  EmojiUtils(); }
EmojiUtils { public static boolean isOnlyEmojis(@Nullable final CharSequence text) { if (text != null && text.length() > 0) { final String inputWithoutSpaces = SPACE_REMOVAL.matcher(text).replaceAll(Matcher.quoteReplacement("")); return EmojiManager.getInstance() .getEmojiRepetitivePattern() .matcher(inputWithoutSpaces) .matches(); } return false; } private  EmojiUtils(); static boolean isOnlyEmojis(@Nullable final CharSequence text); @NonNull static List<EmojiRange> emojis(@Nullable final CharSequence text); static int emojisCount(@Nullable final CharSequence text); @NonNull static EmojiInformation emojiInformation(@Nullable final CharSequence text); }
EmojiUtils { public static boolean isOnlyEmojis(@Nullable final CharSequence text) { if (text != null && text.length() > 0) { final String inputWithoutSpaces = SPACE_REMOVAL.matcher(text).replaceAll(Matcher.quoteReplacement("")); return EmojiManager.getInstance() .getEmojiRepetitivePattern() .matcher(inputWithoutSpaces) .matches(); } return false; } private  EmojiUtils(); static boolean isOnlyEmojis(@Nullable final CharSequence text); @NonNull static List<EmojiRange> emojis(@Nullable final CharSequence text); static int emojisCount(@Nullable final CharSequence text); @NonNull static EmojiInformation emojiInformation(@Nullable final CharSequence text);  }