public class

ArcGISAttachmentsAdapter

extends Object
implements ListAdapter PopupEditable
java.lang.Object
   ↳ com.esri.android.map.popup.ArcGISAttachmentsAdapter

Class Overview

Default adapter for attachments

Summary

[Expand]
Inherited Constants
From interface android.widget.Adapter
Fields
protected LinkedHashMap<AttachmentInfo, ArcGISAttachmentsAdapter.ATTACHMENT_STATUS> mAttachmentInfos
Public Constructors
ArcGISAttachmentsAdapter(Context context, Popup popup, File downloadDirectory)
Constructor taking a context, a popup and a download directory.
Public Methods
boolean areAllItemsEnabled()
int getColumnWidth()
Gets the column width for the grid.
int getCount()
AttachmentInfo getItem(int position)
long getItemId(int position)
int getItemViewType(int position)
View getView(int position, View convertView, ViewGroup parent)
int getViewTypeCount()
boolean hasStableIds()
boolean isEmpty()
boolean isEnabled(int position)
void notifyDataSetChanged()
Notifies the attached View that the underlying data has been changed and it should refresh itself.
void notifyDataSetInvalidated()
Notify data set invalidated.
void registerDataSetObserver(DataSetObserver observer)
void setColumnWidth(int columnWidth)
Sets the column width for the grid.
void setEditMode(boolean editMode)
Sets the edit mode.
void unregisterDataSetObserver(DataSetObserver observer)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.widget.Adapter
From interface android.widget.ListAdapter
From interface com.esri.android.map.popup.PopupEditable

Fields

protected LinkedHashMap<AttachmentInfo, ArcGISAttachmentsAdapter.ATTACHMENT_STATUS> mAttachmentInfos

Public Constructors

public ArcGISAttachmentsAdapter (Context context, Popup popup, File downloadDirectory)

Constructor taking a context, a popup and a download directory. If the download directory is not provided, a default one will be used.

Parameters
context the context
popup the popup
downloadDirectory the download directory

Public Methods

public boolean areAllItemsEnabled ()

public int getColumnWidth ()

Gets the column width for the grid.

Returns
  • the mColumnWidth

public int getCount ()

public AttachmentInfo getItem (int position)

public long getItemId (int position)

public int getItemViewType (int position)

public View getView (int position, View convertView, ViewGroup parent)

public int getViewTypeCount ()

public boolean hasStableIds ()

public boolean isEmpty ()

public boolean isEnabled (int position)

public void notifyDataSetChanged ()

Notifies the attached View that the underlying data has been changed and it should refresh itself.

public void notifyDataSetInvalidated ()

Notify data set invalidated.

public void registerDataSetObserver (DataSetObserver observer)

public void setColumnWidth (int columnWidth)

Sets the column width for the grid.

Parameters
columnWidth the column width

public void setEditMode (boolean editMode)

Sets the edit mode.

Parameters
editMode the edits the mode: true to switch to edit mode, false to revert to read-only mode

public void unregisterDataSetObserver (DataSetObserver observer)