From ee96fa8b2c67ab4ae2ac1cb3c0d9795af04cc9b7 Mon Sep 17 00:00:00 2001 From: Bobby Georgescu Date: Thu, 13 Sep 2012 15:46:40 -0700 Subject: Animate correctly when opening single-photo album Bug: 7164177 Change-Id: I5ce60a8e842e3ddf0e356568f17ee488edef23cd --- src/com/android/gallery3d/app/AlbumSetPage.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/com/android/gallery3d/app/AlbumSetPage.java') diff --git a/src/com/android/gallery3d/app/AlbumSetPage.java b/src/com/android/gallery3d/app/AlbumSetPage.java index ed632ac30..6941f2914 100644 --- a/src/com/android/gallery3d/app/AlbumSetPage.java +++ b/src/com/android/gallery3d/app/AlbumSetPage.java @@ -47,6 +47,7 @@ import com.android.gallery3d.ui.FadeTexture; import com.android.gallery3d.ui.GLCanvas; import com.android.gallery3d.ui.GLRoot; import com.android.gallery3d.ui.GLView; +import com.android.gallery3d.ui.PreparePageFadeoutTexture; import com.android.gallery3d.ui.SelectionManager; import com.android.gallery3d.ui.SlotView; import com.android.gallery3d.ui.SynchronizedHandler; @@ -261,6 +262,11 @@ public class AlbumSetPage extends ActivityState implements & MediaObject.SUPPORT_IMPORT) != 0) { data.putBoolean(AlbumPage.KEY_AUTO_SELECT_ALL, true); } else if (!mGetContent && albumShouldOpenInFilmstrip(targetSet)) { + if (targetSet.getMediaItemCount() == 1) { + PreparePageFadeoutTexture.prepareFadeOutTexture(mActivity, mSlotView, mRootPane); + data.putParcelable(PhotoPage.KEY_OPEN_ANIMATION_RECT, + mSlotView.getSlotRect(slotIndex, mRootPane)); + } data.putInt(PhotoPage.KEY_INDEX_HINT, 0); data.putString(PhotoPage.KEY_MEDIA_SET_PATH, mediaPath); -- cgit v1.2.3