碰到了通过Movie显示gif图片,有部分图片的duration为0导致gif只显示第一帧

解决办法,改为使用android-gif-drawable.jar来显示gif图片(需要配合com.android.support:support-v4:18.0.0使用)

GifImageView imageView = new GifImageView(this);
GifDrawable gifFromPath = null;
                try {
                    gifFromPath = new GifDrawable(imagePath);  // gif图片在本机的路径比如 /mnt/sdcard/ggggg.gif
                } catch (IOException e) {
                    e.printStackTrace();
                }
imageView.setImageDrawable(gifFromPath);
原文地址:https://www.cnblogs.com/lipeineng/p/9754257.html