Android SearchView Hide Keyboard on Start up
问题 I'm having a minor issue I'm trying to solve. When I open my application, the keyboard shows to enter a query for the search view. However I just want the keyboard to appear when I click on the search view. How do I fix this? Thanks! 回答1: This worked for me. /* Code used to hide focus */ searchView =(SearchView)view.findViewById(R.id.searchView); searchView.setFocusable(false); 回答2: Use this attributes in your layout tag in XML file: android:focusable="true" android:focusableInTouchMode="true