es.ugr.swad.swadroid
Class ImageExpandableListAdapter

java.lang.Object
  extended by SimpleExpandableListAdapter
      extended by es.ugr.swad.swadroid.ImageExpandableListAdapter

public class ImageExpandableListAdapter
extends SimpleExpandableListAdapter

Author:
Juan Miguel Boyero Corral , Helena Rodriguez Gijon

Field Summary
(package private)  java.util.ArrayList<java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>>> childData
           
(package private)  Context context
           
(package private)  java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>> groupData
           
(package private)  java.lang.String IMAGE
           
(package private)  LayoutInflater layoutInflater
           
(package private)  java.lang.String NAME
           
 
Constructor Summary
ImageExpandableListAdapter(Context context, java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>> groupData, int expandedGroupLayout, java.lang.String[] groupFrom, int[] groupTo, java.util.ArrayList<java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>>> childData, int childLayout, java.lang.String[] childFrom, int[] childTo)
           
 
Method Summary
 boolean addChild(int groupPosition, int childPosition, java.util.HashMap<java.lang.String,java.lang.Object> child)
           
 boolean addGroup(int groupPosition, java.util.HashMap<java.lang.String,java.lang.Object> group, java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>> childs)
           
 View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
           
 View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent)
           
 View newChildView(boolean isLastChild, ViewGroup parent)
           
 View newGroupView(boolean isExpanded, ViewGroup parent)
           
 boolean removeChild(int groupPosition, int childPosition)
          Removes the child which located at childPosition under the group located at groupPosition.
 boolean removeGroup(int groupPosition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

final java.lang.String NAME
See Also:
Constant Field Values

IMAGE

final java.lang.String IMAGE
See Also:
Constant Field Values

layoutInflater

final LayoutInflater layoutInflater

groupData

java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>> groupData

childData

java.util.ArrayList<java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>>> childData

context

Context context
Constructor Detail

ImageExpandableListAdapter

public ImageExpandableListAdapter(Context context,
                                  java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>> groupData,
                                  int expandedGroupLayout,
                                  java.lang.String[] groupFrom,
                                  int[] groupTo,
                                  java.util.ArrayList<java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>>> childData,
                                  int childLayout,
                                  java.lang.String[] childFrom,
                                  int[] childTo)
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)

newGroupView

public View newGroupView(boolean isExpanded,
                         ViewGroup parent)

newChildView

public View newChildView(boolean isLastChild,
                         ViewGroup parent)

removeChild

public boolean removeChild(int groupPosition,
                           int childPosition)
Removes the child which located at childPosition under the group located at groupPosition. If it is removed, it will not be shown.

Parameters:
groupPosition -
childPosition -
Returns:
true if the child was removed;

addChild

public boolean addChild(int groupPosition,
                        int childPosition,
                        java.util.HashMap<java.lang.String,java.lang.Object> child)

addGroup

public boolean addGroup(int groupPosition,
                        java.util.HashMap<java.lang.String,java.lang.Object> group,
                        java.util.ArrayList<java.util.HashMap<java.lang.String,java.lang.Object>> childs)

removeGroup

public boolean removeGroup(int groupPosition)