n level Expandable Listview

前端 未结 1 1777
迷失自我
迷失自我 2020-12-30 12:02

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 m

相关标签:
1条回答
  • 2020-12-30 12:25

    According to this 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;
    
          }
    

    Here the getChildView method creates a new adapter by CustExpListview Class and sets is as an Adapter.
    The same way you can create a new BaseExpandableListAdapter Class and set it in CustExpListview Class getChildView method.

    0 讨论(0)
提交回复
热议问题