當下平臺的quick search box支持搜索setting下的選項嗎

[DESCRIPTION]


android官方文檔上的 search manager的有這個標誌:
public static final String INTENT_ACTION_SEARCH_SETTINGS
Added in API level 8
Intent action for starting the global search settings activity. The global search provider should handle this intent.
Constant Value: "android.search.action.SEARCH_SETTINGS"
請問這個是不是支持search settings 的標誌?由於在平臺的quick search box 和貴司的QSB文檔上沒有看到search setttings的描述,不知道底層是否支持search settings?


[SOLUTION]


Intent action for starting the global search settings activity. The global search provider should handle this intent.
Constant Value: "android.search.action.SEARCH_SETTINGS"
這句話的意思是說用這個intent能夠啓動 global search(quick search box) 的search 相關設置的Activity.
能夠在quickSearchBox的AndroidManifest有響應這個intent,
<activity android:name=".preferences.SearchSettingsActivityChooser"
android:label="@string/search_settings"
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.search.action.SEARCH_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.search.action.WEB_SEARCH_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
因此啓動的是SearchSettingsActivityChooser 這個Activity,可是看SearchSettingsActivityChooser
的實現,他在新的版本會啓動SearchSettingsActivity.
protected Class<?> getHoneycombActivityClass() {
return SearchSettingsActivity.class;
}
因此一直以來都並無search Setting的功能, 只是啓動SearchSettingsActivity而已.html


原文連接:http://bbs.×××/thread-55076-1-1.htmlandroid

相關文章
相關標籤/搜索