class EmojiTransformationMethod implements TransformationMethod {

    @Override
    public CharSequence getTransformation(@Nullable CharSequence source, @NonNull final View view) {
        if (view.isInEditMode()) {
            return source;
        }

        if (mTransformationMethod != null) {
            source = mTransformationMethod.getTransformation(source, view);
        }

        if (source != null) {
            switch (EmojiCompat.get().getLoadState()){
                case EmojiCompat.LOAD_STATE_SUCCEEDED:
                    return EmojiCompat.get().process(source);
                case EmojiCompat.LOAD_STATE_LOADING:
                case EmojiCompat.LOAD_STATE_FAILED:
                case EmojiCompat.LOAD_STATE_DEFAULT:
                default:
                    break;
            }
        }
        return source;
    }

      EmojiTransformationMethod(TransformationMethod transformationMethod);

}