1
我在我的应用程序中实现了自定义搜索建议。我找到了有关添加自定义建议的开发者文档。 http://developer.android.com/guide/topics/search/adding-custom-suggestions.html如何构建自定义搜索建议的建议表?
到目前为止,我已经创建了像这样的searchable.xml。
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_label"
android:hint="@string/search_hint"
android:searchSuggestAuthority="com.example.MyCustomSuggestionProvider">
</searchable>
我现在正在实现MyCustomSuggestionProvider,但是我发现很难构建建议表。如何使用MatrixCursor构建建议表而不实际构建文档中提到的表?请提供代码以便于理解。
谢谢。有效。 – user2230793 2013-04-26 20:42:10