首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

expandablelistview与此同时展开一个group

2012-08-28 
expandablelistview同时展开一个groupExAdapter adapter ExpandableListView exList?。。。。。。。。。。。。。。 ada

expandablelistview同时展开一个group

ExAdapter adapter;

ExpandableListView exList;

?

。。。。。。。。。。。。。。

adapter=new ExAdapter(DiseaseDetail.this);
??????? exList = (ExpandableListView) findViewById(R.id.list2);
??? ??? exList.setAdapter(adapter);
??? ??? exList.setGroupIndicator(null);
??? ??? exList.setDivider(null);
??? ??? exList.setOnGroupExpandListener(new OnGroupExpandListener(){

??? ??? ??? @Override
??? ??? ??? public void onGroupExpand(int arg0) {
??? ??? ??? ??????? // TODO Auto-generated method stub
??? ??? ??? ??????? for(int i=0;i<adapter.getGroupCount();i++)
??? ??? ??? ??????? {
??? ??? ??? ??????????????? if(arg0!=i)
??? ??? ??? ??????????????? {
??? ??? ??? ??????????????? ??? exList.collapseGroup(i);
??? ??? ??? ??????????????? }
??? ??? ??? ??????? }
??? ??? ??? ??????????????????????????????
??? ??? ??? }
??? ??? ??? ??????????????
??? ??? ??? ? });

热点排行