Adapter中函数的调用顺序
2016-05-06 15:03
344 查看
1.BaseExpandableListAdapter
使用BaseExpandableListAdapter来创建一个只有一个group,并且组中只有一个item的ExpandableListView,方法的调用情况如下
[html] view
plain copy
05-29 15:54:16.048: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupId
05-29 15:54:16.055: D/adapter(17066): getGroupId
05-29 15:54:16.055: D/adapter(17066): getGroupId
05-29 15:54:16.055: D/adapter(17066): getChildrenCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupId
05-29 15:54:16.055: D/adapter(17066): getChildrenCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.087: D/adapter(17066): getGroupCount
05-29 15:54:16.165: D/adapter(17066): getGroupCount
05-29 15:54:16.165: D/adapter(17066): getGroupView
05-29 15:54:16.173: D/adapter(17066): getGroupId
05-29 15:54:16.173: D/adapter(17066): getChildView
05-29 15:54:16.173: D/adapter(17066): getGroupId
05-29 15:54:16.173: D/adapter(17066): getChildId
05-29 15:54:16.212: D/adapter(17066): getGroupCount
05-29 15:54:16.212: D/adapter(17066): getGroupCount
05-29 15:54:16.274: D/adapter(17066): getGroupCount
05-29 15:54:16.274: D/adapter(17066): getGroupId
05-29 15:54:16.274: D/adapter(17066): getChildrenCount
05-29 15:54:16.274: D/adapter(17066): getGroupCount
05-29 15:54:16.274: D/adapter(17066): getGroupCount
05-29 15:54:16.274: D/adapter(17066): getGroupId
05-29 15:54:16.274: D/adapter(17066): getGroupCount
05-29 15:54:16.290: D/adapter(17066): getGroupCount
05-29 15:54:16.290: D/adapter(17066): getGroupCount
05-29 15:54:16.290: D/adapter(17066): getGroupId
05-29 15:54:16.290: D/adapter(17066): getChildView
05-29 15:54:16.290: D/adapter(17066): getGroupId
05-29 15:54:16.290: D/adapter(17066): getChildId
从上边可以看出来调用顺序 getGroupCount -> getGroupId -> getChildrenCount -> getGroupView -> getChildrenView -> getChildId
使用BaseExpandableListAdapter来创建一个只有一个group,并且组中只有一个item的ExpandableListView,方法的调用情况如下
[html] view
plain copy
05-29 15:54:16.048: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupId
05-29 15:54:16.055: D/adapter(17066): getGroupId
05-29 15:54:16.055: D/adapter(17066): getGroupId
05-29 15:54:16.055: D/adapter(17066): getChildrenCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupId
05-29 15:54:16.055: D/adapter(17066): getChildrenCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.055: D/adapter(17066): getGroupCount
05-29 15:54:16.087: D/adapter(17066): getGroupCount
05-29 15:54:16.165: D/adapter(17066): getGroupCount
05-29 15:54:16.165: D/adapter(17066): getGroupView
05-29 15:54:16.173: D/adapter(17066): getGroupId
05-29 15:54:16.173: D/adapter(17066): getChildView
05-29 15:54:16.173: D/adapter(17066): getGroupId
05-29 15:54:16.173: D/adapter(17066): getChildId
05-29 15:54:16.212: D/adapter(17066): getGroupCount
05-29 15:54:16.212: D/adapter(17066): getGroupCount
05-29 15:54:16.274: D/adapter(17066): getGroupCount
05-29 15:54:16.274: D/adapter(17066): getGroupId
05-29 15:54:16.274: D/adapter(17066): getChildrenCount
05-29 15:54:16.274: D/adapter(17066): getGroupCount
05-29 15:54:16.274: D/adapter(17066): getGroupCount
05-29 15:54:16.274: D/adapter(17066): getGroupId
05-29 15:54:16.274: D/adapter(17066): getGroupCount
05-29 15:54:16.290: D/adapter(17066): getGroupCount
05-29 15:54:16.290: D/adapter(17066): getGroupCount
05-29 15:54:16.290: D/adapter(17066): getGroupId
05-29 15:54:16.290: D/adapter(17066): getChildView
05-29 15:54:16.290: D/adapter(17066): getGroupId
05-29 15:54:16.290: D/adapter(17066): getChildId
从上边可以看出来调用顺序 getGroupCount -> getGroupId -> getChildrenCount -> getGroupView -> getChildrenView -> getChildId
相关文章推荐
- hust——1010F - The Minimum Length(kmp专练)
- Activity 的启动流程分析
- Ubuntu下mysql的安装以及简单的命令操作
- 【转】测试思考之——思想有多远,你就能走多远
- 关于Java和.NET之间的通信问题(JSON)
- 笔记-集合
- crontab 定时任务
- Android LayoutInflater深度解析 给你带来全新的认识
- handleCmd_SETUP 函数
- Android Parcelable
- TextView 单行显示长文本
- indexOf() lastIndexOf() 与 jQuery.inArray()
- 提取视频文件首帧为jpeg 图片
- androidstudio连接夜神模拟器
- 苹果多线程网络编程之-GCD队列与任务的理解
- inner join、outer join和cross join的区别
- 进程和线程
- win8升级win8.1系统无效的隐藏分区删除方法
- 面试题14
- XMG 自动提示宏 #define keyPath(objc,keyPath) @(((void)objc.keyPath,#keyPath));