Glide sharing transformed GIF
<p>I'd like to share GIFs I loaded with Glide but i can't find a way to do it.</p>

<p>I tried to share the GifDrawable data as an array of byte but when i try to share, the GIF doesn't appear.</p>

<p>Here's the code I wrote :</p>

<pre><code>Glide.with(getActivity())
        .load(to_add.mMeme.getmUrl())
        .asGif()
        .diskCacheStrategy(DiskCacheStrategy.ALL)
        .transformFrame(new TextTransformation(getContext(), to_add.mMeme.getmText()))
        .listener(new RequestListener&lt;String, GifDrawable&gt;() {
            @Override
            public boolean onException(Exception e, String s, Target&lt;GifDrawable&gt; target, boolean b) {
                return false;
            }

            @Override
            public boolean onResourceReady(GifDrawable gifDrawable, String s, Target&lt;GifDrawable&gt; target, boolean b, boolean b1) {
                to_add.mDrawable = gifDrawable;
                to_add.mView.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        Meme to_share = null;
                        for (Meme meme : mViewList) {
                            if (meme.mView.equals(v)) {
                                to_share = meme;
                                break;
                            }
                        }
                        if (to_share != null) {
                            Intent shareIntent = new Intent();
                            shareIntent.setAction(Intent.ACTION_SEND);
                            shareIntent.setType("image/*");
                            shareIntent.putExtra(Intent.EXTRA_STREAM, to_share.mDrawable.toString());
                            startActivity(Intent.createChooser(shareIntent, "Share"));
                        }
                    }
                });
                return false;
            }
        })
        .into((ImageView) to_add.mView.findViewById(R.id.memeImageView));
</code></pre>

<p>Here is my Meme class used in the previous code :</p>

<pre><code>public static class Meme {
    public Meme(StorageManager.Meme meme, View view) {
        mMeme = meme;
        mView = view;
    }

    StorageManager.Meme mMeme;
    View mView;
    GifDrawable mDrawable;
}
</code></pre>

<p>mViewList is a List of Meme:</p>

<pre><code>List&lt;Meme&gt; mViewList;
</code></pre>

<p>And to_add variable is the Meme containing the GIF i'm trying to share :</p>

<pre><code>final Meme to_add = new Meme(data, getActivity().getLayoutInflater().inflate(R.layout.meme_layout, null));
</code></pre>