@Test public void testCreateWithQuery() { Intent intent = new Intent(); intent.putExtra(SearchManager.QUERY, "filter"); controller = Robolectric.buildActivity(SearchActivity.class, intent); controller.create().start().resume(); activity = controller.get(); assertThat(ShadowSearchRecentSuggestions.recentQueries).contains("filter"); assertEquals(activity.getString(R.string.title_activity_search), activity.getDefaultTitle()); assertEquals("filter", activity.getSupportActionBar().getSubtitle()); }
@Override protected String getDefaultTitle() { return getString(R.string.title_activity_search); }
SearchActivity extends BaseListActivity { @Override protected String getDefaultTitle() { return getString(R.string.title_activity_search); } }
SearchActivity extends BaseListActivity { @Override protected String getDefaultTitle() { return getString(R.string.title_activity_search); }  }
SearchActivity extends BaseListActivity { @Override protected String getDefaultTitle() { return getString(R.string.title_activity_search); }  @Override boolean onCreateOptionsMenu(Menu menu); @Override boolean onPrepareOptionsMenu(Menu menu); @Override boolean onOptionsItemSelected(MenuItem item); }
SearchActivity extends BaseListActivity { @Override protected String getDefaultTitle() { return getString(R.string.title_activity_search); }  @Override boolean onCreateOptionsMenu(Menu menu); @Override boolean onPrepareOptionsMenu(Menu menu); @Override boolean onOptionsItemSelected(MenuItem item);  }