Expand all children in expandable list view

后端 未结 5 1664
谎友^
谎友^ 2020-12-15 02:21

I would like to expand all children while the expandable list view is populated. Currently my code looks like this:

ExpandableListView listView = (Expandable         


        
5条回答
  •  萌比男神i
    2020-12-15 02:56

    first fill the adapter than put this code in your oncreate method

       int count = adapter.getGroupCount();
                    for ( int i = 0; i < count; i++ ) 
                        listView.expandGroup(i);
    

提交回复
热议问题