Expandable ListView

后端 未结 3 1660
[愿得一人]
[愿得一人] 2020-12-18 01:30

I am using expandableListView for UI design, so I am wondering for Android expandable listview, is there a way to allow only one list item expanded, i.e. when you click and

3条回答
  •  生来不讨喜
    2020-12-18 01:59

    First of all implement OnGroupExpandListener in your Activity that will allow you to add its default method, and after add that default method you need to do like this:

    @Override
        public void onGroupExpand(int groupPosition) {
            // TODO Auto-generated method stub
            int len = expadapter.getGroupCount();           
            for(int i=0;i

提交回复
热议问题