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<? extends Map<String, ?>> groupData, int groupLayout, String[] groupFrom, int[] groupTo, List<? extends List<? extends Map<String, ?>>> childData, int childLayout, String[] childFrom, int[] childTo)

Constructor
构造方法

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

Constructor
构造方法

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

Constructor
构造方法

Public方法

ObjectgetChild(int groupPosition, int childPosition)
longgetChildId(int groupPosition, int childPosition)
ViewgetChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
intgetChildrenCount(int groupPosition)
ObjectgetGroup(int groupPosition)
intgetGroupCount()
longgetGroupId(int groupPosition)
ViewgetGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent)
booleanhasStableIds()
booleanisChildSelectable(int groupPosition, int childPosition)
ViewnewChildView(boolean isLastChild, ViewGroup parent)

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

ViewnewGroupView(boolean isExpanded, ViewGroup parent)

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值