我怎么能叫上搜索按钮点击对话框中的Andr​​oid? [英] How can I call search dialog on button click in android?

查看:125
本文介绍了我怎么能叫上搜索按钮点击对话框中的Andr​​oid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出一个小的应用程序,我要呼吁搜索按钮点击搜索对话框
请给我简单的code或简单的教程,因为我看过很多例子,但我不会因此专家呼吁搜索对话框,请帮助我
在此先感谢

I am making a small application where I have to call search dialog on search button click please give me simple code or simple tutorial because I have seen many example but I am not so expert to call the search dialog please help me thanks in advance

推荐答案

更​​新:(因为我们正在谈论的硬件按钮)

UPDATE: (since we're talking about the hardware button)

声明一个可搜索的配置: http://developer.android.com /guide/topics/search/searchable-config.html 。有在链接页面的底部,例如,

Declare a searchable configuration: http://developer.android.com/guide/topics/search/searchable-config.html. There is an example at the bottom of the linked page.

然后创建一个可搜索的活动:的http://developer.android.com/guide/topics/search/search-dialog.html#SearchableActivity

Then create a searchable activity: http://developer.android.com/guide/topics/search/search-dialog.html#SearchableActivity

然后,对于应的搜索按钮时pressed反应的任何活动,这样做:的http://developer.android.com/guide/topics/search/search-dialog.html#SearchDialog

And then, for any activity that should react to the search button being pressed, do this: http://developer.android.com/guide/topics/search/search-dialog.html#SearchDialog

这篇关于我怎么能叫上搜索按钮点击对话框中的Andr​​oid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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