felipecsl/GifImageView

How to display gif image from external storage ?

Closed this issue · 2 comments

Hello there,

I am unable to display locally stored gif image programatically.
Here is my code
String root = Environment.getExternalStorageDirectory().toString()+"/EnthuonsChat/Images/"+imageName;
File fileToDownload = new File(root);
if(fileToDownload.exists()){
new GifDataDownloader() {
@OverRide
protected void onPostExecute(final byte[] bytes) {
((ItemMessageUserHolder) holder).gifImageView.setBytes(bytes);
((ItemMessageUserHolder) holder).gifImageView.startAnimation();
}
}.execute(root);
}
Please help me to resolve this issue....

Did you put StartAnimation as well ?
Mine won't display if I don't start the Animation as well

You're likely loading the file incorrectly. make sure it its correctly loaded before calling setBytes and startAnimation