Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

n level Expandable Listview

Tags:

android

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,

like image 859
user991429 Avatar asked Oct 22 '12 11:10

user991429


1 Answers

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.

like image 75
Md Abdul Gafur Avatar answered Oct 16 '22 21:10

Md Abdul Gafur