org.android.activityminer.app.recording
Class LabelAdapter

Package class diagram package LabelAdapter
java.lang.Object
  extended by android.widget.BaseAdapter
      extended by android.widget.ArrayAdapter<String>
          extended by org.android.activityminer.app.recording.LabelAdapter
All Implemented Interfaces:
Adapter, Filterable, ListAdapter, SpinnerAdapter

public class LabelAdapter
extends ArrayAdapter<String>

The activity label list adapter.


Field Summary
private  int selectedPos
          The position of the current selected entry.
 
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
 
Constructor Summary
LabelAdapter(Context context, int resource, int textViewResourceId, List<String> labels)
          Constructor
 
Method Summary
 int getSelectedLabelPos()
          Getter for the selected activityLabel position
 View getView(int position, View convertView, ViewGroup parent)
           
 void setSelectedPos(int selectedPos)
          Setter for the selected entry position
 
Methods inherited from class android.widget.ArrayAdapter
add, addAll, addAll, 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

selectedPos

private int selectedPos
The position of the current selected entry.

Constructor Detail

LabelAdapter

public LabelAdapter(Context context,
                    int resource,
                    int textViewResourceId,
                    List<String> labels)
Constructor

Parameters:
context - the context
resource - the layout resource id
textViewResourceId - the text view resource id in the layout
labels - the labels
Method Detail

getSelectedLabelPos

public final int getSelectedLabelPos()
Getter for the selected activityLabel position

Returns:
the selected activityLabel position

setSelectedPos

public final void setSelectedPos(int selectedPos)
Setter for the selected entry position

Parameters:
selectedPos - the selected entry position to set

getView

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