charlest
charlest

Reputation: 935

which method gets control when you do a search and don't specify android:launchMode="singleTop"

I am invoking a standard search, with the Activity that invokes the search being the same as the activity that processes the search (the 'searchable activity'). If I include android:launchMode="singleTop" in the Activity definition, the search invokes the Activity's onNewIntent method and I pick up the search parm specified: no problem. If you don't specify android:launchMode, or specify a different value for launchMode, which method of the Activity gets invokes, or do you always specify android:launchMode="singleTop" in the searchable activity definition in the Manifest file? Here's what I have specified:

/res/xml/searchable.xml:

Upvotes: 0

Views: 86

Answers (1)

whlk
whlk

Reputation: 15635

The same Activity gets started again. So there are two instances of the same Activity in the ActivityStack.

Upvotes: 1

Related Questions