Searchable activity being called twice

后端 未结 2 373
野性不改
野性不改 2021-02-04 08:25

I\'m trying to create my first Android app and in the process of adding to it SEARCH functionality. I\'ve followed the Android Developer documentation to add both the Search dia

2条回答
  •  长情又很酷
    2021-02-04 08:54

    Try to remove super.OnNewIntent(intent) in your SearchableActivity.

    According to your manifest you are trying to use search dialog

    
    

    and in the same time you use SearchView in your Menu. If you use SearchView you should use

        
    

    like in http://developer.android.com/guide/topics/search/searchable-config.html.

    That is my example of xml/searchable.xml:

    
    
    

提交回复
热议问题