When clicking the SearchView the keyboard opens, and when I type the first letter it closes. On the second click and further it works well.
What I found related:
The SearchView is inside a fragment (didn't happen when placed in an activity)
I am using
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);in theonCreatemethod of the activity. If I remove this line, strangely enough, the keyboard is hidden as soon as the SearchView is clicked, rather than after typing the first letter. On the second click and further it works well.
Any help appreciated.