I have a situation where I open SearchActivity and I want to have cursor in SearchView (keeping focus) while not showing keyboard at first. When and ONLY when user presses SearchView I want to show keyboard (cursor should be intact)
Add this below line in your activity.xml file's main layout
<LinearLayout
...
android:focusableInTouchMode="true"
...
>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With