I am trying to add “Close” button functionality to Filters i.e. whenever a user clicks the close button on filters screen, all applied filters should be cleared and user can go back to previous fragment.
But I was only able to:
- Either clear all filters using:
onClearAllThenClearFilters(filterState, btnClearAll, connection)
- Go back to previous fragment
I want to do both on button click.