From 0b0df704f2214cb589643d9d075396eadd0f77e5 Mon Sep 17 00:00:00 2001 From: Adam Copp Date: Wed, 19 Sep 2012 12:20:44 +0100 Subject: Cursor listeners can use setPhotoIndex meaningfully Cursor listeners can now use setPhotoIndex and have the changes take effect immediately. It appears that nobody in code search will have their code broken by this change. Change-Id: I76afd8545310c24f05307d38ed03081914a17987 --- photoviewer/src/com/android/ex/photo/PhotoViewActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'photoviewer') diff --git a/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java b/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java index e0d8292..5e45f5e 100644 --- a/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java +++ b/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java @@ -323,6 +323,9 @@ public class PhotoViewActivity extends Activity implements } mIsEmpty = false; + mAdapter.swapCursor(data); + notifyCursorListeners(data); + // set the selected photo int itemIndex = mPhotoIndex; @@ -331,9 +334,6 @@ public class PhotoViewActivity extends Activity implements itemIndex = 0; } - mAdapter.swapCursor(data); - notifyCursorListeners(data); - mViewPager.setCurrentItem(itemIndex, false); setViewActivated(); } -- cgit v1.2.3