How do I invoke the search dialog using onSearchRequested()

前端 未结 4 1376
执笔经年
执笔经年 2021-02-15 17:51

I\'m trying to implement the search dialog and I am unable to display the search from an Activity.

I have my main activity defined in my manifest file, this activity sho

4条回答
  •  被撕碎了的回忆
    2021-02-15 18:29

    Apart from declaring the SearchActivity in the manifest file you need to include the meta-data info.

    If you want to invoke the search dialog throughout the application then include

    
    

    inside the application tag.

    If you want to invoke the search dialog only in a particular activity then include

    
    

    inside the activity tag.

    for more details please refer http://developer.android.com/guide/topics/search/search-dialog.html.

提交回复
热议问题