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

No reload children if layout is expanded #15

Open
ghost opened this issue Sep 14, 2018 · 2 comments
Open

No reload children if layout is expanded #15

ghost opened this issue Sep 14, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 14, 2018

HI I've tried to reload the view after an event occur(Button). I call notifyParentChanged(index), this affects only the parent, no the children. If someone have the same issue, as a workaround I save all the views while renderChild and call my private reloadChildren after notifiParentChanged.

@xPryds
Copy link

xPryds commented Mar 9, 2019

Same issue here

@emadPirayesh
Copy link

emadPirayesh commented Oct 13, 2019

in ExpandableLayout.java line 237 if condition must remove and change code to this

     //if (section.expanded) {   // remove if  this for avoid render childe when for first time expanded 
                                             //flag is false
       for (int i = 0; i < section.children.size(); i++) {
        Object child = section.children.get(i);
        View childView = layoutInflater.inflate(childLayout, null);
        renderer.renderChild(childView, child, sections.size() - 1, i);
        sectionLayout.addView(childView);
        // }

    }
    addView(sectionLayout);
    if (section.expanded) {// add this code 
        this.expand(section.parent);
    } else {
        this.collapse(section.parent);
    }

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