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

when expanding or Collapsing, never calling renderParent #7

Open
xiayu98020214 opened this issue Sep 26, 2017 · 2 comments
Open

when expanding or Collapsing, never calling renderParent #7

xiayu98020214 opened this issue Sep 26, 2017 · 2 comments

Comments

@xiayu98020214
Copy link

when expanding or Collapsing, never calling renderParent

@norrisboat
Copy link

I have the same issue.....can't change the collapse image

@sanxy
Copy link

sanxy commented Mar 31, 2020

Swap the arrow in the setRenderer to this:

view.findViewById(R.id.arrow).setBackgroundResource(isExpanded ? R.drawable.arrow_down : R.drawable.arrow_up);

Then you can can this two functions already available in the library with this:

sectionLinearLayout.setExpandListener((ExpandCollapseListener.ExpandListener<FruitCategory>) (parentIndex, parent, view) -> { /* change arrow when expanded */ view.findViewById(R.id.arrow).setBackgroundResource( R.drawable.arrow_down); });

sectionLinearLayout.setCollapseListener((ExpandCollapseListener.CollapseListener<FruitCategory>) (parentIndex, parent, view) -> { /* change arrow when collapsed */ view.findViewById(R.id.arrow).setBackgroundResource( R.drawable.arrow_up); });

That is the way to change the arrow up and arrow down

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

3 participants