开发者

Search to show a new intent? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

maybe some one can help me with this... I have a custom search button (i do have the google search as well but I need this)..

here is the scenario:

  • on main page I have list of records

  • I click on the search button which shows list of tags that I can click on for the system to search

-I return to the main page with a string telling me which records to view

-the main page shows those records

this is all fine, but the problem is if I click back the app quits, which is understandable and what is suppose to happen. what I want is the same as the android search function where it opens the result in a new page and when I click back it takes me to my full list

Cursor notesCursor3 = mDbHelper.fetchSearchTagNotes(matchNotes);
startManagingCursor(notesCursor3);

String[] from = new String[]{NotesDbAdapter.KEY_TITLE,NotesDbAdapter.KEY_CREATEDON};

int[] to = new int[]{R.id.text1,R.id.date};

SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.notes_row, notesCursor3, 开发者_如何学运维from, to);
setListAdapter(notes);

this is my simple code after getting the search result, which is simply changing the adapter to the list (I do the same for the default android search which works like I said).


Never mind the question. I had to succumb to my inability to find an answer and create a custom intent to do this

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜