Android 快速搜索框

Android 快速搜索框,android,android-layout,Android,Android Layout,我正在尝试为qsb实现自定义建议。我添加了createtable IF notexists suggestion\u TABLE\u id INTEGER主键自动递增、suggestive\u text\u 1varchar50、suggestive\u intent\u data INTEGER作为建议表。intent.getDataString的输出仅为content://com.simple.search.SuggestionProvider/tests. 我真的很困惑。我想它会给出建议意

我正在尝试为qsb实现自定义建议。我添加了createtable IF notexists suggestion\u TABLE\u id INTEGER主键自动递增、suggestive\u text\u 1varchar50、suggestive\u intent\u data INTEGER作为建议表。intent.getDataString的输出仅为content://com.simple.search.SuggestionProvider/tests. 我真的很困惑。我想它会给出建议意图数据的价值。如何从意向中获取“建议意向”列数据的内容

定义内部每个建议的数据 建议表中的建议列、意图列和数据列

为项目中的每个目的提供所有必要的数据信息 建议表,包括“建议”列“意图”数据列 然后用每行的唯一数据填充它。数据来自 此列与您在本文档中定义的意图完全一致 柱然后,您可以使用getData或 getDataString

searchable.xml

if (Intent.ACTION_VIEW.equals(intent.getAction())) {
    Log.d(Tag.getTag(this), (intent.getDataString()));
    };
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
    android:hint="@string/search_hint" 
    android:label="@string/app_label"
    android:searchSuggestAuthority="com.simple.search.SuggestionProvider"
    android:searchSuggestIntentAction="android.intent.action.VIEW"
    android:searchSuggestIntentData="content://com.simple.search.SuggestionProvider/tests" //yeah, I thought this was causing the problem too. But after removing this line no change. 
    android:searchSuggestThreshold="1"
    android:searchSuggestSelection=" ?"
    />