Android 利用 onSearchRequested() 调用内部搜索ui组件
2010-04-21 15:47:00 来源:WEB开发网< intent-filter >
< action android:name="android.intent.action.SEARCH" / >
< category android:name="android.intent.category.DEFAULT" / >
< /intent-filter >
< meta-data android:name="android.app.searchable"
android:resource="@xml/searchable" / >
< /activity >
< /application >
searchable.xml文件:
< ?xml version="1.0" encoding="utf-8"? >
< searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/search_label"
android:hint="@string/search_hint"
android:searchMode="showSearchLabelAsBadge"
android:voiceSearchMode="showVoiceSearchButton|launchRecognizer"
android:voiceLanguageModel="free_form"
android:voicePromptText="@string/search_invoke"
android:searchSuggestAuthority="com.example.android.apis.SuggestionProvider"
android:searchSuggestSelection=" ? "
/ >
Tags:Android 利用 onSearchRequested
编辑录入:coldstar [复制链接] [打 印]更多精彩
赞助商链接