【Android】使用SearchView时软键盘不支持actionSearch的问题
问题设备: HTC One S searchable.xml < searchable xmlns:android ="http://schemas.android.com/apk/res/android" android:label ="@string/search_label" android:hint ="@string/search_hint" android:voiceSearchMode ="showVoiceSearchButton|launchRecognizer" android:imeOptions ="actionSearch" android:searchSuggestAuthority ="com.xxx.provider.searchsuggestion" android:searchSuggestSelection ="?" /> 解决办法: SearchView有一个setSubmitButtonEnabled方法,设置为true即可,搜索框不为空就会显示。效果如下图: 在onCreateOptionsMenu中inflate后调用,记得...