Searchable activity being called twice

后端 未结 2 394
野性不改
野性不改 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:47

    I think methods onNewIntent and onCreate are mutually exclusive. You set launchMode to "singleTop", so the method onNewIntent would be called and not the onCreate.

    I have a similar problem when one search request is processed twice. Working with the SearchableDictionary sample in the WXGA 10.1 tablet emulator I found that the first search call works fine, but consequent calls create two SEARCH events, so they are processed twice. Somebody mentioned about a bug in Ti. (http://developer.appcelerator.com/question/127166/android-search-keyboardtype-fires-return-event-twice )

    I tested apps on a real Samsung tablet and I didn’t see two SEARCH events, so I guess it’s an emulator problem, not a code problem.

提交回复
热议问题