Expandable listview with selectall checkbox : group itemclick and scrolling bug

后端 未结 1 1509
情书的邮戳
情书的邮戳 2021-01-19 06:20

I have an ExpandableListView with a checkbox next to group name and when expanded, child items with checkbox as well.

Let\'s suppose I have 4 groups with 50 childs.

1条回答
  •  感情败类
    2021-01-19 06:47

    I've found the solution. Instead of using OnCheckedChangeListener on the groupcheckbox, I used OnClickListener and it solved everything like this :

    gholder.groupcheckbox.setChecked(array.get(groupPosition).isCheck());
    gholder.groupcheckbox.setOnClickListener(new OnClickListener() {
    
                @Override
                public void onClick(View v) {
    
                    for(int i = 0;i

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