org.android.activityminer.app.activities
Class ActivityTreeListAdapter

Package class diagram package ActivityTreeListAdapter
java.lang.Object
  extended by android.widget.BaseAdapter
      extended by org.android.activityminer.app.activities.ActivityTreeListAdapter
All Implemented Interfaces:
Adapter, ListAdapter, SpinnerAdapter
Direct Known Subclasses:
ActivityTreeListPreferenceAdapter

public class ActivityTreeListAdapter
extends BaseAdapter

Adapter for the tree list view for the activity hierarchy


Field Summary
private  Context context
          The activity context
private  DBStatistic dbStatistics
          The database statistic for classes (activity labels)
private  List<ActivityLabel> entries
          The entry list
private  List<Integer> entryDepth
          The depth array for the activity entries in the tree
private  String formatActivityRecordingCount
          The format string for activity recording counts
private  int textAppearance
          The text appearance attribute
private  int viewLayoutId
          Identifier of the view layout
 
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
 
Constructor Summary
ActivityTreeListAdapter(Context context, DBStatistic dbStatistics)
          Constructor
ActivityTreeListAdapter(Context context, DBStatistic dbStatistics, int viewLayoutId, int textAppearance)
          Constructor
 
Method Summary
 Context getContext()
          Getter for the context
 int getCount()
           
 Object getItem(int position)
           
 long getItemId(int position)
           
 View getView(int position, View convertView, ViewGroup parent)
           
private  void prepareEntries(ActivityLabel activityLabel, int depth)
          Does a label entry and depth entry for the given activity label
 
Methods inherited from class android.widget.BaseAdapter
areAllItemsEnabled, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetChanged, 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 Context context
The activity context


dbStatistics

private final DBStatistic dbStatistics
The database statistic for classes (activity labels)


entryDepth

private final List<Integer> entryDepth
The depth array for the activity entries in the tree


viewLayoutId

private final int viewLayoutId
Identifier of the view layout


entries

private final List<ActivityLabel> entries
The entry list


textAppearance

private final int textAppearance
The text appearance attribute


formatActivityRecordingCount

private final String formatActivityRecordingCount
The format string for activity recording counts

Constructor Detail

ActivityTreeListAdapter

public ActivityTreeListAdapter(Context context,
                               DBStatistic dbStatistics,
                               int viewLayoutId,
                               int textAppearance)
Constructor

Parameters:
context - the activity context
dbStatistics - the database statistic for classes (activity labels)
viewLayoutId - the view layout identifier sub-elements
textAppearance - the text appearance attribute

ActivityTreeListAdapter

public ActivityTreeListAdapter(Context context,
                               DBStatistic dbStatistics)
Constructor

Parameters:
context - the activity context
dbStatistics - the database statistic for classes (activity labels)
Method Detail

getContext

public Context getContext()
Getter for the context

Returns:
the context

prepareEntries

private final void prepareEntries(ActivityLabel activityLabel,
                                  int depth)
Does a label entry and depth entry for the given activity label

Parameters:
activityLabel - the activity label
depth - the position in the tree

getCount

public final int getCount()

getItem

public final Object getItem(int position)

getItemId

public final long getItemId(int position)

getView

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