org.android.activityminer.app.evaluation
Class ExpandableResultListAdapter

Package class diagram package ExpandableResultListAdapter
java.lang.Object
  extended by android.widget.BaseExpandableListAdapter
      extended by org.android.activityminer.app.evaluation.ExpandableResultListAdapter
All Implemented Interfaces:
ExpandableListAdapter, HeterogeneousExpandableList

public class ExpandableResultListAdapter
extends BaseExpandableListAdapter

The adapter for the expandable result list.


Field Summary
private  Activity context
          The activity context
private  List<EvaluationResult> evalResults
          The evaluation result data for the child entries.
private  String fmtDoublePrec0
          format string for double precision
private  String fmtDoublePrec3
          format string for double precision
private  String fmtPercentageWithDoublePrec2
          format string for double precision percent value
private  String formatString
          The format string for confusion matrix entries (depends on total sample count)
private  List<String> groups
          The groups description.
private  android.support.v4.util.LongSparseArray<String> mapActivityId2Name
          The activity label map
private  String sClass
          The class description
 
Constructor Summary
ExpandableResultListAdapter(Activity context, List<EvaluationResult> evalResults, android.support.v4.util.LongSparseArray<String> mapActivityId2Name)
          Constructor
 
Method Summary
 Object getChild(int groupPosition, int childPosition)
           
 long getChildId(int groupPosition, int childPosition)
           
 int getChildrenCount(int groupPosition)
           
 View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
           
 EvaluationResult getEvaluationResult(int groupPosition)
          Getter for the evaluation result at a given group position
 Object getGroup(int groupPosition)
           
 int getGroupCount()
           
 long getGroupId(int groupPosition)
           
 View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent)
           
 boolean hasStableIds()
           
 boolean isChildSelectable(int groupPosition, int childPosition)
           
 
Methods inherited from class android.widget.BaseExpandableListAdapter
areAllItemsEnabled, getChildType, getChildTypeCount, getCombinedChildId, getCombinedGroupId, getGroupType, getGroupTypeCount, isEmpty, notifyDataSetChanged, notifyDataSetInvalidated, onGroupCollapsed, onGroupExpanded, 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


evalResults

private List<EvaluationResult> evalResults
The evaluation result data for the child entries.


groups

private List<String> groups
The groups description.


mapActivityId2Name

private android.support.v4.util.LongSparseArray<String> mapActivityId2Name
The activity label map


fmtDoublePrec0

private final String fmtDoublePrec0
format string for double precision


fmtDoublePrec3

private final String fmtDoublePrec3
format string for double precision


fmtPercentageWithDoublePrec2

private final String fmtPercentageWithDoublePrec2
format string for double precision percent value


sClass

private final String sClass
The class description


formatString

private final String formatString
The format string for confusion matrix entries (depends on total sample count)

Constructor Detail

ExpandableResultListAdapter

public ExpandableResultListAdapter(Activity context,
                                   List<EvaluationResult> evalResults,
                                   android.support.v4.util.LongSparseArray<String> mapActivityId2Name)
Constructor

Parameters:
context - the activity context
evalResults - the list with the evaluation results
mapActivityId2Name - the activity identifier to name mapping
Method Detail

getGroupView

public View getGroupView(int groupPosition,
                         boolean isExpanded,
                         View convertView,
                         ViewGroup parent)

getChildView

public View getChildView(int groupPosition,
                         int childPosition,
                         boolean isLastChild,
                         View convertView,
                         ViewGroup parent)

getGroupCount

public int getGroupCount()

getChildrenCount

public int getChildrenCount(int groupPosition)

getGroup

public Object getGroup(int groupPosition)

getChild

public Object getChild(int groupPosition,
                       int childPosition)

getEvaluationResult

public EvaluationResult getEvaluationResult(int groupPosition)
Getter for the evaluation result at a given group position

Parameters:
groupPosition - the group position
Returns:
the evaluation result for the given group position

getGroupId

public long getGroupId(int groupPosition)

getChildId

public long getChildId(int groupPosition,
                       int childPosition)

hasStableIds

public boolean hasStableIds()

isChildSelectable

public boolean isChildSelectable(int groupPosition,
                                 int childPosition)