Skip to content

Commit

Permalink
Fix readme. Add information for #480.
Browse files Browse the repository at this point in the history
  • Loading branch information
koral-- committed Dec 9, 2017
1 parent fd6d6fe commit 97221f6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android-gif-drawable
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-android--gif--drawable-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1147)
[![Android-Libs](https://img.shields.io/badge/Android--Libs-android--gif--drawable-orange.svg?style=flat)](http://android-libs.com/lib/android-gif-drawable)
[![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%2393-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-93)
[![API](https://img.shields.io/badge/API-9%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=14)
[![API](https://img.shields.io/badge/API-14%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=14)
[![Javadocs](http://www.javadoc.io/badge/pl.droidsonroids.gif/android-gif-drawable.svg)](http://www.javadoc.io/doc/pl.droidsonroids.gif/android-gif-drawable)

`View`s and `Drawable` for animated GIFs in Android.
Expand Down Expand Up @@ -203,7 +203,7 @@ protected void onCreate(Bundle savedInstanceState) {
#### Associating single `GifDrawable` instance with multiple `View`s
Normally single `GifDrawable` instance associated with multiple `View`s will animate only on the last one.
To solve that create `MultiCallback` instance, add `View`s to it and set callback for given drawable, eg.:
To solve that create `MultiCallback` instance, add `View`s to it and set callback for given drawable, e.g.:
```java
MultiCallback multiCallback = new MultiCallback();
Expand All @@ -216,6 +216,9 @@ multiCallback.addView(anotherImageView);
gifDrawable.setCallback(multiCallback);
```
Note that if you change a drawable of e.g. `ImageView`, the callback will be removed from the previous
drawable. Thereafter, you have to reassign callback or the same `GifDrawable` instance will stop animating.
#### Advanced
+ `recycle()` - provided to speed up freeing memory (like in `android.graphics.Bitmap`)
Expand Down

0 comments on commit 97221f6

Please sign in to comment.