9

How to display n- level of expandable list view android, I am getting only examples for 3-Levels expandable.

Referring this :link

Please guideline or share me suitable example for Multi-level expandable display in android.

Thanks,

4

1 回答 1

9

根据这个例子

   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 并将其设置为适配器。
同样的方法,你可以创建一个新的 Class 并在Class方法BaseExpandableListAdapter中设置它。CustExpListviewgetChildView

于 2012-10-22T11:32:24.370 回答