Android7.0中文文档(API)-- SimpleExpandableListAdapter
2017-06-21 14:13
579 查看
完整内容,请查看: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 |
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方法 | |
---|---|
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. 为组项实例化一个新视图。 |
相关文章推荐
- Android7.0中文文档(API)-- ExpandableListAdapter
- Android7.0中文文档(API)--- BaseExpandableListAdapter
- Android 3.0 r1 API中文文档(108) —— ExpandableListAdapter
- Android7.0中文文档(API)-- HeaderViewListAdapter
- Android7.0中文文档(API)-- SimpleCursorAdapter
- android7.0中文文档(API)-- HeterogeneousExpandableList
- Android中文API(95)——SimpleExpandableListAdapter
- Android7.0中文文档(API)-- SimpleAdapter
- Android中文API(95)——SimpleExpandableListAdapter
- Android 3.0 r1 API中文文档(108) —— ExpandableListAdapter
- Android7.0中文文档(API)-- SimpleCursorTreeAdapter
- Android 3.0 r1 API中文文档(108) —— ExpandableListAdapter
- Android 中文 API (93) —— BaseExpandableListAdapter
- Android 3.0 r1 API中文文档(106) —— SimpleCursorAdapter
- Android 3.0 r1 API中文文档(106) —— SimpleCursorAdapter
- Android7.0中文文档(API)-- AdapterView.AdapterContextMenuInfo
- Android7.0中文文档(API) -- ListPopupWindow
- Android7.0中文文档(API) -- CursorTreeAdapter
- Android 3.0 r1 API中文文档(106) —— SimpleCursorAdapter
- Android7.0中文文档(API)-- ResourceCursorTreeAdapter