Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show only one child of expandable list at a time #5

Closed
iosandroiddev opened this issue Apr 24, 2014 · 1 comment
Closed

Show only one child of expandable list at a time #5

iosandroiddev opened this issue Apr 24, 2014 · 1 comment

Comments

@iosandroiddev
Copy link

Hi,

I am trying to Show only one child of expandable list at a time.
I have written this code for that.. for the visible items it's working fine. But, if i expand second row and again expand 48th row. its crashing.

Please check:

private static int prev = -1;
listView.setOnGroupExpandListener(new OnGroupExpandListener() {

        @Override
        public void onGroupExpand(int groupPosition) {
            if (prev != groupPosition) {
                listView.collapseGroupWithAnimation(prev);
            }

            prev = groupPosition;
        }
    });
@idunnololz
Copy link
Owner

Fixed in #10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants