goofyz/testGlide — pull request #1 by sjudd (2014-10-18 02:17:45+00:00)
Title: Get gifs running.

A couple of issues here.

1. Setting an anonymous inner class as the callback isn't sufficient because Drawables hold on to their callbacks using WeakReferences. Since you weren't referencing the callback, it was quickly cleared, leaving your drawables without a callback.

2. Even if you get around #1 by setting your TextView as the callback, that still doesn't work because the TextView ignores calls to invalidate for Drawables that aren't it's left, right, top, or bottom drawables. You can see this logic in ``verifyDrawable`` on line 4776: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/TextView.java.

To actually get gifs to play, I used a tag to hold on the callback so it was referenced strongly, and then created a custom callback that invalidates the view without verifying the drawable first which gets things playing.

However, the reason why this is so complicated is that you're trying to display images in ``TextView``. I definitely do not recommend doing that, and things will definitely be broken if you try to make this work. Instead try using an ``ImageView`` or if you need text and an image, wrap a ``TextView`` and an ``ImageView`` in a ``ViewGroup``