Issue:
When navigating back and forth quickly in the Search Fragment, the MenuProvider setup is not fully re-executed, causing the SearchView to remain uninitialized or missing. This results in the search bar not showing up.
Steps to Reproduce:
Navigate to the Search Fragment.
Quickly navigate away and then back to the Search Fragment.
Observe that the SearchView does not appear.
Expected Behavior:
The SearchView should always be displayed when returning to the Search Fragment, regardless of navigation speed.
Actual Behavior:
The SearchView sometimes fails to appear due to incomplete re-execution of the MenuProvider setup.
Proposed Solution:
Ensure that the MenuProvider setup is consistently executed even during quick navigation transitions to properly initialize the SearchView.
The issue occurs because of the toolbar being detached via onDestroy() which resulted interfere with the toolbar state. As a result, detached toolbar moved to the MainActivity
Issue: When navigating back and forth quickly in the Search Fragment, the MenuProvider setup is not fully re-executed, causing the SearchView to remain uninitialized or missing. This results in the search bar not showing up.
Steps to Reproduce:
Expected Behavior: The SearchView should always be displayed when returning to the Search Fragment, regardless of navigation speed.
Actual Behavior: The SearchView sometimes fails to appear due to incomplete re-execution of the MenuProvider setup.
Proposed Solution: Ensure that the MenuProvider setup is consistently executed even during quick navigation transitions to properly initialize the SearchView.