I have a SearchView button in my Toolbar and whenever I click the button, the SearchView expands and the keyboard pops up like it should. However, when it is in this initial state, there is no blinking cursor. I can type something and it will display the inputted text but it won't show the cursor. But once I touch the text area, then it displays the blinking cursor.
So how can I get SearchView to display the blinking cursor when the icon is clicked, without ever touching the text area?
By touching the "text area" I mean the area pointed by the arrow just to avoid confusion:
And here is my SearchView xml code if it's any help:
<android.support.v7.widget.SearchView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/search_view_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:queryHint="@string/search">
</android.support.v7.widget.SearchView>
I'm accessing the SearchView as a MenuItem object in OnCreateOptionsMenu(). Any help is appreciated.
