Always return to same activity in android with extras after search

OK, here we go:

I have a search interface/ dialog (the type that gets created by the system) This calls FilesList, an activity that when called without a search intent will show all of a users items (This works fine when it is called from the main activity)

The query from the search filters these results fine, but when the user selects one of these results it will return to the previous activity, whereas I want it to always return to the main activity, passing the id of the selected item (Which I can get fine)

Also, in whichever activity I call the search from, onActivityResult is not called (Because the search intent isn't for a result?)

Basically, always return to main activity after search, returning an item selected in FilesList

EDIT:

To select an item the user clicks a listview and calls this method:

protected void onListItemClick(ListView l, View v, int position, long id) {
    Log.d("onclick ID", ((Note)data.get(position)).ID);
    Note array=(Note)data.get(position);
    intent.putExtra("id", array.ID);
    intent.putExtra("tag", currentTag);
    setResult(RESULT_OK, intent);
    finish();
}

And the search is launched like this: http://developer.android.com/guide/topics/search/search-dialog.html

Answers


Ok, Instead of trying to return to that activity, I simply make the search point to my main activity and from there I get the query, sort the results and return it to my main activity to be opened.

Basically re-arranged the program flow, this post kinda helped: Android: Return search query to current activity


Need Your Help

Pattern fills for graphs

r ggplot2

As ggplot2 produces nice colored graphs but sometimes it is required to have black and white graphs with pattern fills. I wonder how to do this in ggplot2, say for this code:

Generate single-file HTML code documentation

html pdf documentation doxygen

How can I use Doxygen to create the HTML documentation as a single, very long file? I want something like the RTF output, but as HTML.