Hi Spiral,

with search dialog I mean the search bar that came up at the top of
the current activity if it is searchable when the user hits the device
search button. The user hits this button then onSearchRequested() of
my map activity will be called. I use startSearch(). Don't forget, the
map activity is "searchable" so it is instantiated new and onCreate()
will be called. But this is not the same activity where the search was
requestet, its a new instance. When the user goes back using the
device back button for example, the second map activity (opened for
display the search results) will be closed and the first is shown
again - this is not really nice and I don't want to use a lit view to
display the search result, I want to mark the first found result
within the map and ste the center to it and when the user wants to
return he should come back to the very first activity that opened the
map activity.

Yesterday, late night, I thought about this... should I finish() the
"search result" activity within the onCreate() and give back the
results to the first one? But how can I do this, I not called it using
startActivityForResult().

Thank you very much!
-Danny

On Apr 22, 12:46 am, Spiral123 <[email protected]> wrote:
> hi danny.
>
> If you have a dialog where the user can search for an address, then
> show the results of that search within the dialog - then the back
> button will quit the dialog with the search results and return to the
> original map activity - which is what I think you want to achieve.
>
> It does make the search dialog more complex though.
>
> On Apr 21, 6:13 pm, "Danny S." <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > i have a map activity and added a search dialog where the user can
> > search for an address. The map activity is searchable. The search
> > works very well, but when the search is started the activity startet a
> > new instance of map activity.
>
> > Is there a way to show search results in the same activity where the
> > search was executed? Because when the user uses the back button the
> > same (map) view is shown again, but he should go to the activity where
> > the map activity was called from.
>
> > Hope you can help!
> > Thanks a lot!
>
> > -Danny Schimke

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to