use of net.osmand.search.SearchUICore.SearchResultCollection in project Osmand by osmandapp.
the class QuickSearchDialogFragment method reloadCategories.
public void reloadCategories() {
try {
SearchResultCollection res = searchUICore.shallowSearch(SearchAmenityTypesAPI.class, "", null);
if (res != null) {
List<QuickSearchListItem> rows = new ArrayList<>();
for (SearchResult sr : res.getCurrentSearchResults()) {
rows.add(new QuickSearchListItem(app, sr));
}
categoriesSearchFragment.updateListAdapter(rows, false);
}
} catch (IOException e) {
e.printStackTrace();
}
}
Aggregations