Android7.0中文文档(API)-- SimpleExpandableListAdapter

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/SimpleExpandableListAdapter.html

SimpleExpandableListAdapter

public class SimpleExpandableListAdapter
extends BaseExpandableListAdapter

java.lang.Object
   ↳ android.widget.BaseExpandableListAdapter
     ↳ android.widget.SimpleExpandableListAdapter


An easy adapter to map static data to group and child views defined in an XML file. You can separately specify the data backing the group as a List of Maps. Each entry in the ArrayList corresponds to one group in the expandable list. The Maps contain the data for each row. You also specify an XML file that defines the views used to display a group, and a mapping from keys in the Map to specific views. This process is similar for a child, except it is one-level deeper so the data backing is specified as a List>, where the first List corresponds to the group of the child, the second List corresponds to the position of the child within the group, and finally the Map holds the data for that particular child.
一个简单的适配器,映射数据到定义在一个XML文件中的组视图和子视图。你可以将组中的数据指定为Maps的List。可扩展列表中的每个条目对应列表中的每一个组。Maps中包含每行的数据。你还需要指定了一个XML文件,它的定义用于视图显示的组项,以及从Map中Key映射特定的视图。这个过程与子项类似,只不过它的更深一层,所以数据由指定一个列表来支持。第一个List对应于子项的组,第二个List对应于子项在组中的位置,最后的Map为特定的子项保存数据。

摘要


Public构造方法

SimpleExpandableListAdapter(Context context, List> groupData, int groupLayout, String[] groupFrom, int[] groupTo, List>> childData, int childLayout, String[] childFrom, int[] childTo)

Constructor
构造方法

SimpleExpandableListAdapter(Context context, List> groupData, int expandedGroupLayout, int collapsedGroupLayout, String[] groupFrom, int[] groupTo, List>> childData, int childLayout, String[] childFrom, int[] childTo)

Constructor
构造方法

SimpleExpandableListAdapter(Context context, List> groupData, int expandedGroupLayout, int collapsedGroupLayout, String[] groupFrom, int[] groupTo, List>> childData, int childLayout, int lastChildLayout, String[] childFrom, int[] childTo)

Constructor
构造方法

Public方法

Object getChild(int groupPosition, int childPosition)
long getChildId(int groupPosition, int childPosition)
View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
int getChildrenCount(int groupPosition)
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)
View newChildView(boolean isLastChild, ViewGroup parent)

Instantiates a new View for a child.
为子项实例化一个新视图。

View newGroupView(boolean isExpanded, ViewGroup parent)

Instantiates a new View for a group.
为组项实例化一个新视图。

你可能感兴趣的:(Android,android7.0中文API,android中文文档)