react 展开菜单组件[Android]可展开的列表组件ExpandableListView

[Android]可展开的列表组件 ExpandableListView,ExadaleLitView继承自LitVie,它把应用中的列表分为几组,每组又包含多个列表项,实现可展开的列表。列表项由ExadaleLitAdater提供。实现ExadaleAdater的三种方式1.扩展BaeExadaleLitAdter实现ExadaleAdater。2.使用Simle...
ExpandableListView继承自ListVie,它把应用中的列表分为几组,每组又包含多个列表项,实现可展开的列表。列表项由ExpandableListAdapter提供。实现ExpandableAdapter的三种方式 1.扩展BaseExpandableListAdpter实现ExpandableAdapter。2.使用SimpleExpandableListAdpater将两个List集合包装成ExpandableAdapter3.是使用simpleCursorTreeAdapter将Cursor中的数据包装成SimpleCuroTreeAdapt本例采用第一种方式实现工具/原料AndroidStudio方法/步骤1ExpandableListView额外支持的xml属性步骤阅读2编写布局文件步骤阅读3建立数组,用于列表展示步骤阅读4创建私有方法,用于各级列表项的显示步骤阅读5扩展BaseExpandableListAdapter来实现ExpandableListAdapter关键是实现getGroupView(),getChildView()两方法步骤阅读6完整代码及部分说明步骤阅读步骤阅读步骤阅读7效果图步骤阅读END注意事项每组中图片为资源图片,需要另行添加,数组中引用资源文件本步骤需要一定代码基础

本文来自投稿,不代表长河网立场,转载请注明出处: http://www.changhe99.com/a/lxr2J7Ark0.html

(0)

相关推荐