public abstract class

BaseFileAdapter

extends SimpleRecyclerViewAdapter<T, VH extends ViewHolder>
implements Filterable FileListFilter.FilterPublishListener<FileInfo> ThumbnailWorker.ThumbnailWorkerListener
java.lang.Object
   ↳
     ↳ com.pdftron.pdf.widget.recyclerview.SimpleRecyclerViewAdapter<T, VH extends RecyclerView.ViewHolder>
       ↳ com.pdftron.demo.navigation.adapter.BaseFileAdapter<FileInfo extends com.pdftron.pdf.model.BaseFileInfo>
Known Direct Subclasses
Known Indirect Subclasses

Summary

Nested Classes
interface BaseFileAdapter.AdapterListener  
interface BaseFileAdapter.DragEventListener  
Fields
public static final int VIEW_TYPE_CONTENT
public static final int VIEW_TYPE_FOOTER
public static final int VIEW_TYPE_HEADER
public final ArrayList<FileInfo extends BaseFileInfo> mFileInfoSelectedList
Public Constructors
BaseFileAdapter(Context context, ArrayList<FileInfo> objects, Object objectsLock, int spanCount, BaseFileAdapter.AdapterListener adapterListener, ViewHolderBindListener bindListener)
Public Methods
void abortCancelThumbRequests()
final void add(FileInfo item)
Adds the item.
void cancelAllThumbRequests()
void cancelAllThumbRequests(boolean removePreviewHandler)
void cleanupResources()
void evictFromMemoryCache(String uuid)
RecyclerView.Adapter getAdapter()
FileListFilter getDerivedFilter()
CharSequence getFileDescription(FileInfo file)
int getFileType(FileInfo file)
Filter getFilter()
static int getFolderIconColor(Context context)
int getIndexOf(FileInfo info)
FileInfo getItem(int position)
Returns the item in the specified position.
int getItemCount()
long getItemId(int position)
int getItemViewType(int position)
int getSpanCount()
void insert(FileInfo item, int position)
Inserts the item at the specified position.
boolean isHeader(int position)
boolean isInSearchMode()
void onBindViewHolder(RecyclerView.ViewHolder holder, int position)
void onBindViewHolderContent(RecyclerView.ViewHolder holder, int position)
void onBindViewHolderHeader(RecyclerView.ViewHolder holder, int position)
RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType)
void onFilterResultsPublished(ArrayList<FileInfo> filteredFiles, int resultCode)
Raised when a filtering step is completed.
void onThumbnailReady(int result, int position, String iconPath, String identifier)
final boolean remove(FileInfo item)
Removes the item.
void removeAll()
FileInfo removeAt(int location)
Removes the item at the specified position.
void setDragEventListener(BaseFileAdapter.DragEventListener listener)
void setFileIcon(RecyclerView.ViewHolder holder, int position)
void setInSearchMode(boolean isInSearchMode)
void setMultiSelect(boolean multiSelect)
void setSelectionMode(boolean selectionMode)
void setShowFavoriteIndicator(boolean show)
void setShowInfoButton(boolean show)
void updateMainViewWidth(int width)
void updateSpanCount(int count)
Updates span count.
[Expand]
Inherited Methods
From class com.pdftron.pdf.widget.recyclerview.SimpleRecyclerViewAdapter
From class java.lang.Object
From interface android.widget.Filterable
From interface com.pdftron.demo.utils.FileListFilter.FilterPublishListener
From interface com.pdftron.demo.utils.ThumbnailWorker.ThumbnailWorkerListener

Fields

public static final int VIEW_TYPE_CONTENT

public static final int VIEW_TYPE_FOOTER

public static final int VIEW_TYPE_HEADER

public final ArrayList<FileInfo extends BaseFileInfo> mFileInfoSelectedList

Public Constructors

public BaseFileAdapter (Context context, ArrayList<FileInfo> objects, Object objectsLock, int spanCount, BaseFileAdapter.AdapterListener adapterListener, ViewHolderBindListener bindListener)

Public Methods

public void abortCancelThumbRequests ()

public final void add (FileInfo item)

Adds the item.

Parameters
item The item

public void cancelAllThumbRequests ()

public void cancelAllThumbRequests (boolean removePreviewHandler)

public void cleanupResources ()

public void evictFromMemoryCache (String uuid)

public RecyclerView.Adapter getAdapter ()

public FileListFilter getDerivedFilter ()

public CharSequence getFileDescription (FileInfo file)

public int getFileType (FileInfo file)

public Filter getFilter ()

public static int getFolderIconColor (Context context)

public int getIndexOf (FileInfo info)

public FileInfo getItem (int position)

Returns the item in the specified position.

Parameters
position The position
Returns
  • The item

public int getItemCount ()

public long getItemId (int position)

public int getItemViewType (int position)

public int getSpanCount ()

public void insert (FileInfo item, int position)

Inserts the item at the specified position.

Parameters
item The item
position The position

public boolean isHeader (int position)

public boolean isInSearchMode ()

public void onBindViewHolder (RecyclerView.ViewHolder holder, int position)

public void onBindViewHolderContent (RecyclerView.ViewHolder holder, int position)

public void onBindViewHolderHeader (RecyclerView.ViewHolder holder, int position)

public RecyclerView.ViewHolder onCreateViewHolder (ViewGroup parent, int viewType)

public void onFilterResultsPublished (ArrayList<FileInfo> filteredFiles, int resultCode)

Raised when a filtering step is completed.

Parameters
filteredFiles the list resulting from the filtering
resultCode FILTER_RESULT_SUCCESS if result contains at least 1 item. Otherwise returns the reason why it's empty

public void onThumbnailReady (int result, int position, String iconPath, String identifier)

public final boolean remove (FileInfo item)

Removes the item.

Parameters
item The item
Returns
  • True if the item is removed

public void removeAll ()

public FileInfo removeAt (int location)

Removes the item at the specified position.

Parameters
location The position
Returns
  • The removed item

public void setDragEventListener (BaseFileAdapter.DragEventListener listener)

public void setFileIcon (RecyclerView.ViewHolder holder, int position)

public void setInSearchMode (boolean isInSearchMode)

public void setMultiSelect (boolean multiSelect)

public void setSelectionMode (boolean selectionMode)

public void setShowFavoriteIndicator (boolean show)

public void setShowInfoButton (boolean show)

public void updateMainViewWidth (int width)

public void updateSpanCount (int count)

Updates span count.

Parameters
count The span count