public class PhotoPagerAdapter extends BaseCursorPagerAdapter
Modifier and Type | Field and Description |
---|---|
protected SimpleArrayMap<String,Integer> |
mColumnIndices |
protected boolean |
mDisplayThumbsFullScreen |
protected float |
mMaxScale |
mContext, mCursor, mItemPosition, mObjectRowMap, mRowIDColumn
POSITION_NONE, POSITION_UNCHANGED
Constructor and Description |
---|
PhotoPagerAdapter(Context context,
FragmentManager fm,
Cursor c,
float maxScale,
boolean thumbsFullScreen) |
Modifier and Type | Method and Description |
---|---|
protected PhotoViewFragment |
createPhotoViewFragment(Intent intent,
int position,
boolean onlyShowSpinner) |
String |
getContentType(Cursor cursor) |
Fragment |
getItem(Context context,
Cursor cursor,
int position)
Makes a fragment for the data pointed to by the cursor
|
String |
getPhotoName(Cursor cursor) |
String |
getPhotoUri(Cursor cursor) |
protected Class<? extends PhotoViewFragment> |
getPhotoViewFragmentClass() |
String |
getThumbnailUri(Cursor cursor) |
boolean |
shouldShowLoadingIndicator(Cursor cursor) |
Cursor |
swapCursor(Cursor newCursor)
Swap in a new Cursor, returning the old Cursor.
|
convertToString, destroyItem, getCount, getCursor, getDataItem, getItem, getItemId, getItemPosition, instantiateItem, isDataValid, makeFragmentName
finishUpdate, isViewFromObject, restoreState, saveState, setPrimaryItem, startUpdate
destroyItem, finishUpdate, getPageTitle, getPageWidth, instantiateItem, notifyDataSetChanged, registerDataSetObserver, setPrimaryItem, startUpdate, unregisterDataSetObserver
protected SimpleArrayMap<String,Integer> mColumnIndices
protected final float mMaxScale
protected boolean mDisplayThumbsFullScreen
public PhotoPagerAdapter(Context context, FragmentManager fm, Cursor c, float maxScale, boolean thumbsFullScreen)
public Fragment getItem(Context context, Cursor cursor, int position)
BaseCursorPagerAdapter
getItem
in class BaseCursorPagerAdapter
context
- Interface to application's global informationcursor
- The cursor from which to get the data. The cursor is already
moved to the correct position.protected Class<? extends PhotoViewFragment> getPhotoViewFragmentClass()
protected PhotoViewFragment createPhotoViewFragment(Intent intent, int position, boolean onlyShowSpinner)
public Cursor swapCursor(Cursor newCursor)
BaseCursorPagerAdapter
swapCursor
in class BaseCursorPagerAdapter
newCursor
- The new cursor to be used.public boolean shouldShowLoadingIndicator(Cursor cursor)