* Copyright (C) 2012-2013 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
+ * it under the terms of the GNU General Public License version 2,
+ * as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
*/
package com.owncloud.android.ui.preview;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.Vector;
+import com.owncloud.android.datamodel.DataStorageManager;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.ui.fragment.FileFragment;
+
import android.accounts.Account;
-import android.os.Bundle;
-import android.os.Parcelable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v4.view.PagerAdapter;
-import android.support.v4.view.ViewPager;
-import android.util.Log;
-import android.view.View;
import android.view.ViewGroup;
-import com.owncloud.android.datamodel.DataStorageManager;
-import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.ui.fragment.FileFragment;
/**
* Adapter class that provides Fragment instances
//public class PreviewImagePagerAdapter extends PagerAdapter {
public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
- private static final String TAG = PreviewImagePagerAdapter.class.getSimpleName();
-
private Vector<OCFile> mImageFiles;
private Account mAccount;
private Set<Object> mObsoleteFragments;
private Map<Integer, FileFragment> mCachedFragments;
- /*
- private final FragmentManager mFragmentManager;
- private FragmentTransaction mCurTransaction = null;
- private ArrayList<Fragment.SavedState> mSavedState = new ArrayList<Fragment.SavedState>();
- private ArrayList<Fragment> mFragments = new ArrayList<Fragment>();
- private Fragment mCurrentPrimaryItem = null;
- */
-
/**
* Constructor.
*
return mDownloadErrors.contains(Integer.valueOf(position));
}
-
-
/* -*
* Called when a change in the shown pages is going to start being made.
*