最佳答案
根据这个example .
public View getChildView(int groupPosition, int childPosition,
boolean isLastChild, View convertView, ViewGroup parent) {
CustExpListview SecondLevelexplv = new CustExpListview(Vincent_ThreeelevellistActivity.this);
SecondLevelexplv.setAdapter(new SecondLevelAdapter());
SecondLevelexplv.setGroupIndicator(null);
return SecondLevelexplv;
}
这里的getChildView
方法通过CustExpListview
类创建一个新的适配器,并将它设置为适配器。
同样的方法你可以创建一个新的 BaseExpandableListAdapter
类,并在 CustExpListview
类的 getChildView
方法中设置它。
关于android - n 级可扩展 ListView ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13010366/