From b2e91006f4ba715c7d7fe97dee4181cb56127090 Mon Sep 17 00:00:00 2001 From: Likai Ding Date: Tue, 13 Aug 2013 14:07:48 +0800 Subject: Gallery2: Support GIF animation This change implements a Java GIF decoder. Change-Id: I227cef76cbacd66b7e87bc59b4f07d518b70a859 Signed-off-by: Xiaojing Zhang --- src/com/android/gallery3d/ui/PhotoView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/com/android/gallery3d/ui/PhotoView.java') diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java index e3b72eead..246e647b4 100755 --- a/src/com/android/gallery3d/ui/PhotoView.java +++ b/src/com/android/gallery3d/ui/PhotoView.java @@ -734,7 +734,7 @@ public class PhotoView extends GLView { canvas.translate((int) (cx + 0.5f), (int) (cy + 0.5f)); int s = (int) (scale * Math.min(r.width(), r.height()) + 0.5f); //Full pic locates at index 0 of the array in PhotoDataAdapter - if (mModel.isVideo(0)) { + if (mModel.isVideo(0) || mModel.isGif(0)) { drawVideoPlayIcon(canvas, s); } if (mLoadingState == Model.LOADING_FAIL ) { @@ -864,7 +864,7 @@ public class PhotoView extends GLView { invalidate(); } int s = Math.min(drawW, drawH); - if (mModel.isVideo(mIndex)) { + if (mModel.isVideo(mIndex) || mModel.isGif(mIndex)) { drawVideoPlayIcon(canvas, s); } -- cgit v1.2.3