de.unikassel.android.sdcframework.app
Class FileListAdapter

Package class diagram package FileListAdapter
java.lang.Object
  extended by android.widget.BaseAdapter
      extended by android.widget.ArrayAdapter<File>
          extended by de.unikassel.android.sdcframework.app.FileListAdapter
All Implemented Interfaces:
Adapter, Filterable, ListAdapter, SpinnerAdapter

public class FileListAdapter
extends ArrayAdapter<File>

A simple file list adapter.


Field Summary
private  Activity context
          The activity context.
private  FileMatcherFilter filter
          The file matcher filter.
 
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
 
Constructor Summary
FileListAdapter(Activity context, FileMatcherFilter filter)
          Constructor
 
Method Summary
 View getView(int position, View convertView, ViewGroup parent)
           
 void setDirectory(File dir)
          File list update method.
 
Methods inherited from class android.widget.ArrayAdapter
add, clear, createFromResource, getContext, getCount, getDropDownView, getFilter, getItem, getItemId, getPosition, insert, notifyDataSetChanged, remove, setDropDownViewResource, setNotifyOnChange, sort
 
Methods inherited from class android.widget.BaseAdapter
areAllItemsEnabled, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

private final Activity context
The activity context.


filter

private final FileMatcherFilter filter
The file matcher filter.

Constructor Detail

FileListAdapter

public FileListAdapter(Activity context,
                       FileMatcherFilter filter)
Constructor

Parameters:
context - the activity context
filter - a regular file pattern expression
Method Detail

getView

public View getView(int position,
                    View convertView,
                    ViewGroup parent)
Specified by:
getView in interface Adapter
Overrides:
getView in class ArrayAdapter<File>

setDirectory

public void setDirectory(File dir)
File list update method.

Parameters:
dir - the directory