HighscoreExpandableListAdapter

com.j0h1.contour

## Class HighscoreExpandableListAdapter

- java.lang.Object
- - BaseExpandableListAdapter
  - - com.j0h1.contour.HighscoreExpandableListAdapter

-     public class HighscoreExpandableListAdapter
      extends BaseExpandableListAdapter

  Custom ExpandableListAdapter for the ExpandableListView that displays the top10 track sessions for each track.
  Author:
    Johannes Riedmann

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Context` | `context`
    `private <any>` | `listDataChild`
    `private java.util.List<Track>` | `listDataHeader`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HighscoreExpandableListAdapter(Context context, java.util.List<Track> listDataHeader, <any> listChildData)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.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)`
    `java.lang.Object` | `getGroup(int groupPosition)`
    `int` | `getGroupCount()`
    `long` | `getGroupId(int groupPosition)`
    `int` | `getGroupPositionByTrackId(int trackId)` Reverse function to getTrackIdByGroupPosition.
    `View` | `getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent)`
    `private int` | `getTrackIdByGroupPosition(int groupPosition)` Since trackId is used as the key for the session lists and only indexes are passed to the methods, the trackId to a given groupPosition has to be found.
    `boolean` | `hasStableIds()`
    `boolean` | `isChildSelectable(int groupPosition, int childPosition)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### context

          private Context context

    - #### listDataHeader

          private java.util.List<Track> listDataHeader

    - #### listDataChild

          private <any> listDataChild

  - ### Constructor Detail

    - #### HighscoreExpandableListAdapter

          public HighscoreExpandableListAdapter(Context context,
                                                java.util.List<Track> listDataHeader,
                                                <any> listChildData)

  - ### Method Detail

    - #### getChild

          public java.lang.Object getChild(int groupPosition,
                                           int childPosition)

    - #### getChildId

          public long getChildId(int groupPosition,
                                 int childPosition)

    - #### getChildView

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

    - #### getTrackIdByGroupPosition

          private int getTrackIdByGroupPosition(int groupPosition)

      Since trackId is used as the key for the session lists and only indexes are passed to the methods, the trackId to a given groupPosition has to be found.
      Parameters:
        `groupPosition` - Index of group.
      Returns:
        trackId of the Track object at the given groupPosition.

    - #### getChildrenCount

          public int getChildrenCount(int groupPosition)

    - #### getGroup

          public java.lang.Object getGroup(int groupPosition)

    - #### getGroupPositionByTrackId

          public int getGroupPositionByTrackId(int trackId)

      Reverse function to getTrackIdByGroupPosition.
      Parameters:
        `trackId` - TrackId of Track to find groupPosition of.
      Returns:
        GroupPosition of Track in the header list. Integer.MAX_VALUE if trackId was not found.

    - #### getGroupCount

          public int getGroupCount()

    - #### getGroupId

          public long getGroupId(int groupPosition)

    - #### getGroupView

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

    - #### hasStableIds

          public boolean hasStableIds()

    - #### isChildSelectable

          public boolean isChildSelectable(int groupPosition,
                                           int childPosition)