org.android.activityminer.app.activities
Class ActivityTreeListPreferenceAdapter

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

public class ActivityTreeListPreferenceAdapter
extends ActivityTreeListAdapter
implements View.OnClickListener

Adapter for the tree list view for the activity preference dialog.


Field Summary
private  boolean[] checkedStates
          The checked sates
private  SparseArray<View> mapIndexToView
          Map for quick view by index lookups
private  android.support.v4.util.LongSparseArray<Integer> mapLabel2Index
          Map for quick activity label index lookups
 
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
 
Constructor Summary
ActivityTreeListPreferenceAdapter(Context context, DBStatistic dbStatistics, List<Long> selectedValues)
          Constructor
 
Method Summary
 boolean[] getCheckedStates()
          Getter for the checkedStates
 View getView(int position, View convertView, ViewGroup parent)
           
 void onClick(View v)
           
protected  void updateCheckBox(View view)
          Does update the check box in the view
 
Methods inherited from class org.android.activityminer.app.activities.ActivityTreeListAdapter
getContext, getCount, getItem, getItemId
 
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

checkedStates

private final boolean[] checkedStates
The checked sates


mapLabel2Index

private final android.support.v4.util.LongSparseArray<Integer> mapLabel2Index
Map for quick activity label index lookups


mapIndexToView

private final SparseArray<View> mapIndexToView
Map for quick view by index lookups

Constructor Detail

ActivityTreeListPreferenceAdapter

public ActivityTreeListPreferenceAdapter(Context context,
                                         DBStatistic dbStatistics,
                                         List<Long> selectedValues)
Constructor

Parameters:
context - the activity context
dbStatistics - the database statistic for classes (activity labels)
selectedValues - the selected values from preferences
Method Detail

getCheckedStates

public boolean[] getCheckedStates()
Getter for the checkedStates

Returns:
the checkedStates

getView

public View getView(int position,
                    View convertView,
                    ViewGroup parent)
Specified by:
getView in interface Adapter
Overrides:
getView in class ActivityTreeListAdapter

updateCheckBox

protected void updateCheckBox(View view)
Does update the check box in the view

Parameters:
view - the view container

onClick

public void onClick(View v)
Specified by:
onClick in interface View.OnClickListener