public class ImageGalleryFileAdapter extends ImageGalleryBaseAdapter implements MapEventDispatcher.MapEventDispatchListener
| Modifier and Type | Class and Description |
|---|---|
static class |
ImageGalleryFileAdapter.SortBy |
ImageGalleryBaseAdapter.ThumbnailCreator<T>, ImageGalleryBaseAdapter.ViewHolder<T>filters, receiver, refreshThread| Constructor and Description |
|---|
ImageGalleryFileAdapter(MapView view,
java.util.List<java.io.File> files,
java.util.List<java.lang.String> uids,
boolean showDetails,
java.lang.String callbackTag2,
android.view.View progressBar)
Create a new gallery file adapter
|
ImageGalleryFileAdapter(MapView view,
java.util.List<java.io.File> files,
MapItem marker,
boolean showDetails,
java.lang.String callbackTag2,
android.view.View progressBar)
Create a new gallery file adapter for displaying marker attachments
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(java.io.File file,
java.lang.String uid) |
void |
beginMultiSelectAction(boolean export)
Initiate multi select action
|
void |
clearSelection() |
void |
customizeGalleryView(android.view.View gallery)
Customizes image gallery view elements (e.g., visibility, click handlers)
as needed by the adapter.
|
void |
customizeToolbarView(android.view.View toolbar)
Customizes image gallery toolbar view elements (e.g., visibility, click
handlers) as needed by the adapter.
|
void |
deleteFile(java.io.File f)
Delete a file from the filesystem, including any associated
metadata files (such as .ntf.aux.xml)
|
protected void |
displayFile(GalleryItem item)
Display the supplied item, which was clicked in the gallery and has been
determined not to represent an image or video.
|
protected void |
displayVideo(GalleryItem item)
Display the supplied item, which was clicked in the gallery and has been
determined to represent a video.
|
void |
dispose() |
void |
endMultiSelectAction(boolean cancel) |
static java.io.File |
getCacheFile(java.io.File file,
java.lang.String extension) |
int |
getCount() |
DropDown.OnStateListener |
getDropDownStateListener() |
protected java.lang.String[] |
getImageURIs()
Returns an array of the URIs of GalleryItems that are of an image MIME
type.
|
java.lang.Object |
getItem(int position) |
long |
getItemId(int position) |
boolean |
getMultiSelect() |
java.lang.String[] |
getSelection() |
android.view.View |
getView(int position,
android.view.View convertView,
android.view.ViewGroup parent) |
void |
onMapEvent(MapEvent event)
Listen for ITEM_REMOVED events which target map items we care about
|
void |
onMapMoved(AtakMapView view,
boolean animate) |
protected void |
refreshImpl()
Filter and sort images based on "Show All" option
|
void |
removeFile(java.io.File f) |
void |
removeImages(java.lang.String... imagePaths) |
void |
setMultiSelect(boolean multiSelect) |
void |
showAll(boolean show)
Set whether to show all images or only those within field-of-view
|
void |
sortItems(ImageGalleryFileAdapter.SortBy sortType)
Set sorting method
|
addFilter, displayImage, getDisplayDetails, getFileCache, getGridViewClickListener, getLoadExecutor, getMapView, getSaveExecutor, getTitle, getTitles, hideProgressBar, refresh, removeFilter, removeFilter, rotateBitmap, setDisplayDetails, setItemThumbnail, setReceiver, showProgressBar, updateLastModifiedareAllItemsEnabled, getAutofillOptions, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, setAutofillOptions, unregisterDataSetObserverpublic ImageGalleryFileAdapter(MapView view, java.util.List<java.io.File> files, java.util.List<java.lang.String> uids, boolean showDetails, java.lang.String callbackTag2, android.view.View progressBar)
view - Map viewfiles - List of filesuids - List of attachment UIDs for each fileshowDetails - True to show info below each filecallbackTag2 - Delete callback intent actionprogressBar - Progress bar viewpublic ImageGalleryFileAdapter(MapView view, java.util.List<java.io.File> files, MapItem marker, boolean showDetails, java.lang.String callbackTag2, android.view.View progressBar)
view - Map viewfiles - List of files to displaymarker - Attachment markershowDetails - True to display info below each filecallbackTag2 - Delete callback intent actionprogressBar - Progress bar viewpublic void clearSelection()
public static java.io.File getCacheFile(java.io.File file,
java.lang.String extension)
public boolean getMultiSelect()
public java.lang.String[] getSelection()
public void removeImages(java.lang.String... imagePaths)
public void removeFile(java.io.File f)
public void deleteFile(java.io.File f)
f - public void addFile(java.io.File file,
java.lang.String uid)
public void onMapEvent(MapEvent event)
onMapEvent in interface MapEventDispatcher.MapEventDispatchListenerevent - Map eventpublic void setMultiSelect(boolean multiSelect)
public void showAll(boolean show)
show - True to show all, false to only show visiblepublic void onMapMoved(AtakMapView view,
boolean animate)
public void sortItems(ImageGalleryFileAdapter.SortBy sortType)
sortType - Either TIME_SORT or NAME_SORT.public void customizeGalleryView(android.view.View gallery)
ImageGalleryBaseAdaptercustomizeGalleryView in class ImageGalleryBaseAdaptergallery - The image gallery view.public void customizeToolbarView(android.view.View toolbar)
ImageGalleryBaseAdaptercustomizeToolbarView in class ImageGalleryBaseAdaptertoolbar - The image gallery's toolbar view.public void dispose()
dispose in class ImageGalleryBaseAdapterpublic DropDown.OnStateListener getDropDownStateListener()
getDropDownStateListener in class ImageGalleryBaseAdapterpublic int getCount()
getCount in interface android.widget.Adapterpublic java.lang.Object getItem(int position)
getItem in interface android.widget.Adapterpublic long getItemId(int position)
getItemId in interface android.widget.Adapterpublic android.view.View getView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
getView in interface android.widget.Adapterprotected void displayFile(GalleryItem item)
ImageGalleryBaseAdapterdisplayFile in class ImageGalleryBaseAdapteritem - The GalleryItem to be displayed as a file.protected void displayVideo(GalleryItem item)
ImageGalleryBaseAdapterdisplayVideo in class ImageGalleryBaseAdapteritem - The GalleryItem to be displayed as a video.protected java.lang.String[] getImageURIs()
ImageGalleryBaseAdaptergetImageURIs in class ImageGalleryBaseAdapterpublic void beginMultiSelectAction(boolean export)
export - true to export selections, false to delete selectionspublic void endMultiSelectAction(boolean cancel)
protected void refreshImpl()
refreshImpl in class ImageGalleryBaseAdapter