变态问题常有,今年特别多,,, - - # 今天遇到的这个非处理不可,不然没法在HTC One S使用SearchView,其软键盘不支持action设置。
问题设备:
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后调用,记得判断API Level。
作者:cnblogs 农民伯伯
查看本栏目更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索键盘
, 问题
, 软键盘
, 支持
, searchview hint字体
, qt软键盘android
, android隐藏软键盘
, android软键盘遮挡
, SearchView
, android软键盘
, android实现软键盘
, android软键盘焦点
android显示软键盘
actionbar searchview、webview 软键盘遮挡、webview弹出软键盘、scrollview 软键盘、webview 软键盘不弹出,以便于您获取更多的相关知识。