禁用Android的全球快速搜索框最近查询建议? [英] Disable recent query suggestions in Android's global Quick Search Box?

查看:134
本文介绍了禁用Android的全球快速搜索框最近查询建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实现ContentProvider的自定义建议添加到我的应用程序快速搜索框。据我的应用程序中的伟大工程。不过,我也包括它变成全局搜索和它的作品不同在那里。每当我开始在全局搜索搜索,我选择我的建议之一,这个建议被保存,presented下一次我打开全局搜索。我不喜欢的是,我目前的建议是低于我之前单击了的。

I've implemented a ContentProvider to add custom suggestions to my applications Quick Search Box. It works great within my app. However I also included it into the global search and it works different there. Whenever I start a search in the global search and I select one of my suggestions, this suggestion is saved and presented the next time I open the global search. What I don't like is that my current suggestions are below the ones I clicked before.

有没有一种方法来禁用此行为?

Is there a way to disable this behavior?

我目前想在我的ContentProvider整合最近建议,同时提供的 - 最近的和定制的建议。虽然这恐怕会导致具有相同的建议两次 - 第一次从全局搜索,然后从我的ContentProvider ...

I am currently thinking of integrating recent suggestions in my ContentProvider to provide both - recent and custom suggestions. Though I am afraid this will result in having the same suggestions twice - first from the global search and then from my ContentProvider...

任何意见?

推荐答案

要回答我的问题,可以通过提供<一个href=\"http://developer.android.com/reference/android/app/SearchManager.html#SUGGEST_NEVER_MAKE_SHORTCUT\"相对=nofollow> SUGGEST_NEVER_MAKE_SHORTCUT 在<值href=\"http://developer.android.com/reference/android/app/SearchManager.html#SUGGEST_COLUMN_SHORTCUT_ID\"相对=nofollow> SUGGEST_COLUMN_SHORTCUT_ID 列。

To answer my own question, it is possible by providing the SUGGEST_NEVER_MAKE_SHORTCUT value in the SUGGEST_COLUMN_SHORTCUT_ID column.

像往常一样,这是Android开发者文档中描述的<一个href=\"http://developer.android.com/guide/topics/search/adding-custom-suggestions.html#ManagingShortcuts\"相对=nofollow>这里。

As usual this is described in the Android developer documentation here.

这篇关于禁用Android的全球快速搜索框最近查询建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆