|
|
@ -106,6 +106,9 @@ public class SearchActivity extends ActionBarActivity implements ActionBar.OnNav |
|
|
|
@AfterViews |
|
|
|
@AfterViews |
|
|
|
protected void init() { |
|
|
|
protected void init() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setSupportActionBar(searchToolbar); |
|
|
|
|
|
|
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
|
|
|
|
|
|
|
|
|
|
|
// Get the user query, as coming from the standard SearchManager
|
|
|
|
// Get the user query, as coming from the standard SearchManager
|
|
|
|
handleIntent(getIntent()); |
|
|
|
handleIntent(getIntent()); |
|
|
|
|
|
|
|
|
|
|
@ -128,17 +131,17 @@ public class SearchActivity extends ActionBarActivity implements ActionBar.OnNav |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Allow site selection via list (on large screens) or action bar spinner
|
|
|
|
// Allow site selection via list (on large screens) or action bar spinner
|
|
|
|
setSupportActionBar(searchToolbar); |
|
|
|
|
|
|
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
|
|
|
|
|
|
|
if (searchsitesList != null) { |
|
|
|
if (searchsitesList != null) { |
|
|
|
// The current layout has a dedicated list view to select the search site
|
|
|
|
// The current layout has a dedicated list view to select the search site
|
|
|
|
SearchSitesAdapter searchSitesAdapter = SearchSitesAdapter_.getInstance_(this); |
|
|
|
SearchSitesAdapter searchSitesAdapter = SearchSitesAdapter_.getInstance_(this); |
|
|
|
searchSitesAdapter.update(searchSites); |
|
|
|
searchSitesAdapter.update(searchSites); |
|
|
|
searchsitesList.setAdapter(searchSitesAdapter); |
|
|
|
searchsitesList.setAdapter(searchSitesAdapter); |
|
|
|
searchsitesList.setOnItemClickListener(onSearchSiteClicked); |
|
|
|
searchsitesList.setOnItemClickListener(onSearchSiteClicked); |
|
|
|
// Select the last used site; this also starts the search!
|
|
|
|
// Select the last used site and start the search
|
|
|
|
if (lastUsedPosition >= 0) { |
|
|
|
if (lastUsedPosition >= 0) { |
|
|
|
searchsitesList.setItemChecked(lastUsedPosition, true); |
|
|
|
searchsitesList.setItemChecked(lastUsedPosition, true); |
|
|
|
|
|
|
|
lastUsedSite = searchSites.get(lastUsedPosition); |
|
|
|
|
|
|
|
refreshSearch(); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// Use the action bar spinner to select sites
|
|
|
|
// Use the action bar spinner to select sites
|
|
|
|