This commit is contained in:
Chumva 2018-07-20 17:05:25 +03:00
parent 12748cb857
commit bc0bdcf99c

View file

@ -1135,18 +1135,21 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
for (SearchResult sr : res.getCurrentSearchResults()) {
rows.add(new QuickSearchListItem(app, sr));
}
if (OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) != null) {
rows.add(new QuickSearchButtonListItem(app, R.drawable.ic_world_globe_dark,
app.getString(R.string.search_online_address), new OnClickListener() {
@Override
public void onClick(View view) {
final OsmandSettings settings = app.getSettings();
if (!settings.isInternetConnectionAvailable()) {
Toast.makeText(app, R.string.internet_not_available, Toast.LENGTH_LONG).show();
return;
}
startOnlineSearch();
mainSearchFragment.getAdapter().clear();
updateTabbarVisibility(false);
openKeyboard();
}
}));
}
rows.add(new QuickSearchButtonListItem(app, R.drawable.ic_action_search_dark,
app.getString(R.string.custom_search), new OnClickListener() {
@Override