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

ExpandAll not working after filter() #746

Open
Voiteh opened this issue Sep 13, 2019 · 0 comments
Open

ExpandAll not working after filter() #746

Voiteh opened this issue Sep 13, 2019 · 0 comments

Comments

@Voiteh
Copy link

Voiteh commented Sep 13, 2019

  • Checked on 5.1.0 version of library with android 6.0 (emulator)
  • I have single times exapandable items containing lists of not expandable sub items in FlexibleAdapter.
  • All items there are static once added they are not reordered during lifetime of FlexibleAdapter
  • Whenever user inputs filter into TextView filterInput TextWatcher.afterTextChanged is calling FlexibleAdapter.filter. All expandable filtered views are expanded (this is correct behavior), it is done automatically by library.
  • Then, I have a button which clears filter input. Whenever button is clicked filterInpt text is set to "" and TextWatcher.afterTextChanged is also called, so filter again occurs. It finishes with all closed restored views.
  • I need now to expand all expandable views to show sub items, but whenever i call Flexible.expandAll after filter is finished it is not working. I tried with delay to expand views (500 ms) but this either do not expand views (for some items they are expanded but not all ).
  • I also tried with FlexibleAdapter.OnFilterListener (with delay or without) but this does behave the same.
  • This seems like expand does work as, when i click on expandable item it is shown as expanded. but There are not subitems there so i need to collapse it and expand manually and then subitems are there agian
  • Calling FlexibleAdapter.collapseAll and then FlexibleAdapter.expandAll with delay workarounds the issue.
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

1 participant