public static Spannable filterAsyncFromFile(Spannable spannable,int fontSize,String filePath,EmojiAsyncLoadTextView emojiAsyncLoadTextView){
  if (spannable == null) {
    return null;
  }
  Matcher m=getMatcher(spannable.toString());
  if (m != null) {
    while (m.find()) {
      String emojiHex=Integer.toHexString(Character.codePointAt(m.group(),0));
      EmojiDrawable emojiDrawable=new EmojiDrawable();
      emojiDrawable.setBounds(0,0,fontSize,fontSize);
      spannable.setSpan(new EmojiSpan(emojiDrawable,emojiAsyncLoadTextView),m.start(),m.end(),Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
      emojiAsyncLoadTextView.addAsyncLoadTask(emojiDrawable,filePath + emojiHex + ".png");
    }
  }
  return spannable;
}

public static Spannable filterAsyncFromFile ( Spannable spannable , int fontSize , String filePath , EmojiAsyncLoadTextView emojiAsyncLoadTextView ) { if ( spannable == null ) { return null ; } Matcher m = getMatcher ( spannable . toString ( ) ) ; if ( m != null ) { while ( m . find ( ) ) { String emojiHex = Integer . toHexString ( Character . codePointAt ( m . group ( ) , 0 ) ) ; EmojiDrawable emojiDrawable = new EmojiDrawable ( ) ; emojiDrawable . setBounds ( 0 , 0 , fontSize , fontSize ) ; spannable . setSpan ( new EmojiSpan ( emojiDrawable , emojiAsyncLoadTextView ) , m . start ( ) , m . end ( ) , Spannable . SPAN_INCLUSIVE_EXCLUSIVE ) ; emojiAsyncLoadTextView . addAsyncLoadTask ( emojiDrawable , filePath + emojiHex + ".png" ) ; } } return spannable ; }
load emoji from file asynchronously
