summaryrefslogtreecommitdiffstats
path: root/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'photoviewer/src/com/android/ex/photo/PhotoViewActivity.java')
-rw-r--r--photoviewer/src/com/android/ex/photo/PhotoViewActivity.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java b/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java
index 7a4c6a9..927b0e4 100644
--- a/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java
+++ b/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java
@@ -35,7 +35,6 @@ import android.view.View;
import com.android.ex.photo.PhotoViewPager.InterceptType;
import com.android.ex.photo.PhotoViewPager.OnInterceptTouchListener;
-import com.android.ex.photo.adapters.BaseFragmentPagerAdapter.OnFragmentPagerListener;
import com.android.ex.photo.adapters.PhotoPagerAdapter;
import com.android.ex.photo.fragments.PhotoViewFragment;
import com.android.ex.photo.loaders.PhotoPagerLoader;
@@ -49,7 +48,7 @@ import java.util.Set;
*/
public class PhotoViewActivity extends Activity implements
LoaderCallbacks<Cursor>, OnPageChangeListener, OnInterceptTouchListener,
- OnFragmentPagerListener, OnMenuVisibilityListener {
+ OnMenuVisibilityListener {
/**
* Listener to be invoked for screen events.
@@ -183,7 +182,6 @@ public class PhotoViewActivity extends Activity implements
// Create the adapter and add the view pager
mAdapter = new PhotoPagerAdapter(this, getFragmentManager(), null);
- mAdapter.setFragmentPagerListener(this);
mViewPager = (PhotoViewPager) findViewById(R.id.photo_view_pager);
mViewPager.setAdapter(mAdapter);
@@ -300,6 +298,8 @@ public class PhotoViewActivity extends Activity implements
mAlbumCount = data.getCount();
// Cannot do this directly; need to be out of the loader
+ // TODO(pwestbro): Fix this as this could cause a problem as the cursor may be
+ // closed before the runnable runs.
new Handler().post(new Runnable() {
@Override
public void run() {
@@ -356,11 +356,6 @@ public class PhotoViewActivity extends Activity implements
public void onPageScrollStateChanged(int state) {
}
- @Override
- public void onPageActivated(Fragment fragment) {
- setViewActivated();
- }
-
public boolean isFragmentActive(Fragment fragment) {
if (mViewPager == null || mAdapter == null) {
return false;