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.ListAdapter
From interface com.esri.android.map.popup.PopupEditable
From interface android.widget.Adapter

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 Context: the context
popup Popup: the popup
downloadDirectory File: the download directory

Public Methods

public boolean areAllItemsEnabled ()

Returns
boolean

public int getColumnWidth ()

Gets the column width for the grid.

Returns
int the mColumnWidth

public int getCount ()

Returns
int

public AttachmentInfo getItem (int position)

Parameters
position int
Returns
AttachmentInfo

public long getItemId (int position)

Parameters
position int
Returns
long

public int getItemViewType (int position)

Parameters
position int
Returns
int

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

Parameters
position int
convertView View
parent ViewGroup
Returns
View

public int getViewTypeCount ()

Returns
int

public boolean hasStableIds ()

Returns
boolean

public boolean isEmpty ()

Returns
boolean

public boolean isEnabled (int position)

Parameters
position int
Returns
boolean

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)

Parameters
observer DataSetObserver

public void setColumnWidth (int columnWidth)

Sets the column width for the grid.

Parameters
columnWidth int: the column width

public void setEditMode (boolean editMode)

Sets the edit mode.

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

public void unregisterDataSetObserver (DataSetObserver observer)

Parameters
observer DataSetObserver