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

ExpandableViewHolder#onClick should always call super #477

Closed
technicalflaw opened this issue Oct 26, 2017 · 1 comment
Closed

ExpandableViewHolder#onClick should always call super #477

technicalflaw opened this issue Oct 26, 2017 · 1 comment

Comments

@technicalflaw
Copy link

Currently, onClick doesn't call super if the item isn't enabled or isViewExpandableOnClick() == false, but this stops any callbacks added to the adapter from being called, which should never be the case if the item is enabled. I think it should be the same as onLongClick().

public void onClick(View view) {
  if (mAdapter.isEnabled(getFlexibleAdapterPosition()) && isViewExpandableOnClick()) {
    toggleExpansion();
  }
  super.onClick(view);
}
@davideas davideas added the bug label Oct 26, 2017
@davideas
Copy link
Owner

@technicalflaw, yes I agree. Thanks.

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