您的位置:首页 > 其它

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: