控制器调用活动的query方法,以响应用户的文本输入(对于某个搜索):
// inside FinchVideoActivity...// sends the query to the finch video content providerprivate void query { if (!mSearchText.searchEmpty) { String queryString = FinchVideo.Videos.QUERY_PARAM_NAME + "=" + Uri.encode(mSearchText.getText.toString); Uri queryUri = Uri.parse(FinchVideo.Videos.CONTENT_URI + "?" + queryString); Cursor c = managedQuery(queryUri, null, null, null, null); mAdapter.changeCursor(c); }}