@@ -5,7 +5,7 @@ android-gif-drawable
5
5
[ ![ Android Arsenal] ( https://img.shields.io/badge/Android%20Arsenal-android--gif--drawable-brightgreen.svg?style=flat )] ( https://android-arsenal.com/details/1/1147 )
6
6
[ ![ Android-Libs] ( https://img.shields.io/badge/Android--Libs-android--gif--drawable-orange.svg?style=flat )] ( http://android-libs.com/lib/android-gif-drawable )
7
7
[ ![ Android Weekly] ( http://img.shields.io/badge/Android%20Weekly-%2393-2CB3E5.svg?style=flat )] ( http://androidweekly.net/issues/issue-93 )
8
- [ ![ API] ( https://img.shields.io/badge/API-9 %2B-blue.svg?style=flat )] ( https://android-arsenal.com/api?level=14 )
8
+ [ ![ API] ( https://img.shields.io/badge/API-14 %2B-blue.svg?style=flat )] ( https://android-arsenal.com/api?level=14 )
9
9
[ ![ Javadocs] ( http://www.javadoc.io/badge/pl.droidsonroids.gif/android-gif-drawable.svg )] ( http://www.javadoc.io/doc/pl.droidsonroids.gif/android-gif-drawable )
10
10
11
11
` View ` s and ` Drawable ` for animated GIFs in Android.
@@ -203,7 +203,7 @@ protected void onCreate(Bundle savedInstanceState) {
203
203
#### Associating single `GifDrawable` instance with multiple `View`s
204
204
205
205
Normally single `GifDrawable` instance associated with multiple `View`s will animate only on the last one.
206
- To solve that create `MultiCallback` instance, add `View`s to it and set callback for given drawable, eg .:
206
+ To solve that create `MultiCallback` instance, add `View`s to it and set callback for given drawable, e.g .:
207
207
```java
208
208
MultiCallback multiCallback = new MultiCallback();
209
209
@@ -216,6 +216,9 @@ multiCallback.addView(anotherImageView);
216
216
gifDrawable.setCallback(multiCallback);
217
217
```
218
218
219
+ Note that if you change a drawable of e.g. `ImageView`, the callback will be removed from the previous
220
+ drawable. Thereafter, you have to reassign callback or the same `GifDrawable` instance will stop animating.
221
+
219
222
#### Advanced
220
223
221
224
+ `recycle()` - provided to speed up freeing memory (like in `android.graphics.Bitmap`)
0 commit comments