我怎么能叫上搜索按钮点击对话框中的Android? [英] How can I call search dialog on button click in android?
问题描述
我想提出一个小的应用程序,我要呼吁搜索按钮点击搜索对话框
请给我简单的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
这篇关于我怎么能叫上搜索按钮点击对话框中的Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!