注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

民主与科学

独立之人格,自由之思想

 
 
 

日志

 
 

ExpandableListAdapter  

2010-06-03 10:37:09|  分类: 数据适配器 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
public interface
ExpandableListAdapter
Class Overview
An adapter that links a ExpandableListView with the underlying data.
The implementation of this interface will provide access to the data of the children (categorized by groups), 
and also instantiate Views for children and groups.

ExpandableListAdapter接口是data和可展开视图ExpandableListView连接的桥梁
ExpandableListAdapter主要和ExpandableListViewExpandableListActivity一起使用。
申明的主要接口有:getChild系列和getGroup系列及getCombined系列
Public Methods
abstract booleanareAllItemsEnabled()
abstract ObjectgetChild(int groupPosition, int childPosition)
Gets the data associated with the given child within the given group.
abstract longgetChildId(int groupPosition, int childPosition)
Gets the ID for the given child within the given group.
abstract ViewgetChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
Gets a View that displays the data for the given child within the given group.
abstract intgetChildrenCount(int groupPosition)
Gets the number of children in a specified group.
abstract longgetCombinedChildId(long groupId, long childId)
Gets an ID for a child that is unique across any item (either group or child) that is in this list.
该函数用于产生child的id。注意id一定要是唯一
abstract longgetCombinedGroupId(long groupId)
Gets an ID for a group that is unique across any item (either group or child) that is in this list.
该函数用于产生group的id。注意id一定要是唯一.
abstract ObjectgetGroup(int groupPosition)
Gets the data associated with the given group.
abstract intgetGroupCount()
Gets the number of groups.
abstract longgetGroupId(int groupPosition)
Gets the ID for the group at the given position.
abstract ViewgetGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent)
Gets a View that displays the given group.
abstract booleanhasStableIds()
Indicates whether the child and group IDs are stable across changes to the underlying data.
abstract booleanisChildSelectable(int groupPosition, int childPosition)
Whether the child at the specified position is selectable.
abstract booleanisEmpty()
abstract voidonGroupCollapsed(int groupPosition)
Called when a group is collapsed.
当Group收缩时调用。它只是个监听接口。当Group收缩时,ExpandableListView回调用它。
abstract voidonGroupExpanded(int groupPosition)
Called when a group is expanded.
当Group展开时调用。它只是个监听接口。当Group展开时,ExpandableListView回调用它
abstract voidregisterDataSetObserver(DataSetObserver observer)
abstract voidunregisterDataSetObserver(DataSetObserver observer)
更多参考《BaseExpandableListAdapter


  评论这张
 
阅读(2003)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017