禁用Android的搜索按钮(快速搜索框) [英] Disable the Search Button (Quick Search Box) in Android

查看:168
本文介绍了禁用Android的搜索按钮(快速搜索框)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个应用程序,现在我需要禁用快速搜索框,不知何故,驳回了请求信息,以保持谁是不应该用我的应用程序了[其发展的人我的对话框,其在市场上 - 这使得它更容易让人们保持最新。为各类驳回对话框听众永远不会触发 - 我不知道为什么。我看着无处不在,我获得有关如何禁用此没有结果。 (2.1及以上)。
如何禁用QSB ..?是一个良好的开端,但它不工作。我不知道为什么谷歌坚持我用这个...我有我的应用程序完全没有必要为此。
我该如何去解决这个......还是我不得不尝试另外一种DRM的?

I'm developing an application right now and I need to disable the quick-search-box as somehow it dismisses my dialog boxes that request info to keep people who are not supposed to be using my application out [its in development, and its on the market - it makes it much easier to keep people up to date]. Listeners for all types of dismissing dialogs are never triggered - and I don't know why. I've looked everywhere and I get no result on how to disable this. (2.1 and up). How to disable QSB..? was a good start, but it doesn't work. I don't know why google insists I use this... I have absolutely no need for this in my application. How can I go about fixing this... or do I have to try another sort of DRM?

推荐答案

您可以通过实现这一点,并返回false阻止您的活动或对话的搜索:

You can block the search on your activity or dialog by implementing this and returning false:

public boolean onSearchRequested() {
    return false;
}

更新:

code工作在对话框中,太

UPDATE:
Code works on dialogs, too

这篇关于禁用Android的搜索按钮(快速搜索框)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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