完整内容,请查看: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> groupData, int groupLayout, String[] groupFrom, int[] groupTo, List<? extends List<? extends Map>> childData, int childLayout, String[] childFrom, int[] childTo)

Constructor
构造方法

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

Constructor
构造方法

SimpleExpandableListAdapter(Context context, List<? extends Map> groupData, int expandedGroupLayout, int collapsedGroupLayout, String[] groupFrom, int[] groupTo, List<? extends List<? extends Map>> 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.
为组项实例化一个新视图。

更多相关文章

  1. Android隐藏状态栏和标题栏
  2. android 中发送短信
  3. Android(安卓)之 GrideView网格视图
  4. android layout 属性大全
  5. Android(安卓)layout属性大全
  6. Android(安卓)限制EditText只能输入数字、限制输入类型、限制输
  7. android 向webview传值
  8. android 的常标签和方法 android 初学者
  9. Android给TextView添加点击事件的实现方法

随机推荐

  1. 在android屏幕上 上 下 左 右 四个方向移
  2. Android(安卓)P 图形显示系统(九) Android
  3. 想抢先体验Android操作系统的魅力吗?那就
  4. Android系统下C语言hello world
  5. Android(安卓)创建与解析XML(一)—— 概述
  6. 第二章 如何分析 Android(安卓)程序
  7. 自动 Android* 应用测试
  8. Android(安卓)如何自定义共享库
  9. 写给Android(安卓)App开发人员看的Androi
  10. PPT:解析 Android(安卓)用户的内容消费行