我怎么能叫上搜索按钮点击对话框中的Andr​​oid?按钮、对话框中、我怎么能、oid

2023-09-07 12:01:37 作者:放聲大哭ヮ

我想提出一个小的应用程序,我要呼吁搜索按钮点击搜索对话框请给我简单的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