I have inflated searchItem as menuItem in the toolbar, my problem whenever orientation changes and if my searchView is in expanded mode then automatically its getting focus even though before orientation focus in on another view.
How can I prevent searchView from getting focus automatically?
Before Orientation Change:
After orientation change:
Create a dummy view above your recyclerView then after rotation automatically, first focus will taken by that view so search view won't takes focus, try like this