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

How to disable manual/onClick collapsing of an ExpandableViewHolder? #601

Closed
r-elbouhi opened this issue Apr 24, 2018 · 4 comments
Closed

Comments

@r-elbouhi
Copy link

r-elbouhi commented Apr 24, 2018

How to disable manual/onClick collapsing of an ExpandableViewHolder to be enable to expand item only
But should keep auto collapsing from setAutoCollapseOnExpand method.

@davideas
Copy link
Owner

davideas commented Apr 24, 2018

@r-elbouhi, I do not understand your question.
Please, also, write in the body of the issue, not in the title.

EDIT: maybe I understood, check the ExpandableViewHolder, you need to override some functions.

@r-elbouhi
Copy link
Author

thanks for reply
i am asking for a way to do like this overriding function do "isViewCollapsibleOnLongClick() { return false;}"
but in the normal click not in the long click.
the purpose of my question to make the user unable to collapse Expandable list manually.

@davideas
Copy link
Owner

davideas commented Apr 26, 2018

@r-elbouhi, at the moment you still need to override some key functions, unfortunately all of them have @CallSuper that you need to ignore. You can override for example the function toggleExpansion() to skip the collapse when called from onClick or to extend from FlexibleViewHolder and to copy everything from ExpandableViewHolder.

I'm ok to improve the series of calls, by inserting a new check with isViewCollapsibleOnClick.

@davideas davideas changed the title How to disable manual collapsing of an FlexibleAdapter to be enable to expand item only. but keep collapse automatically using setAutoCollapseOnExpand method. How to disable manual/onClick collapsing of an ExpandableViewHolder? Apr 26, 2018
@r-elbouhi
Copy link
Author

thanks for your effort @davideas

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

No branches or pull requests

2 participants