diff --git a/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java b/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java index 0c8ec712e6..e6f69d6520 100644 --- a/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java +++ b/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java @@ -685,21 +685,25 @@ public class RouteDataObject { return direction; } - public boolean isStopDirectionOpposite(boolean direction) { - for(int i=0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 0f503af5d0..5a2cefd2bc 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,10 @@ 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + can be imported as Favorites points, or as track file. + Import as GPX file + Import as Favorites + Import file Wrong input Enter new name Back diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index d9956f280e..df74bc3d06 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -87,6 +87,7 @@ import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.helpers.DiscountHelper; import net.osmand.plus.helpers.ExternalApiHelper; import net.osmand.plus.helpers.GpxImportHelper; +import net.osmand.plus.helpers.GpxImportHelper.ImportGpxBottomSheetDialogFragment; import net.osmand.plus.helpers.WakeLockHelper; import net.osmand.plus.inapp.InAppHelper; import net.osmand.plus.mapcontextmenu.MapContextMenu; @@ -319,17 +320,25 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven @Override protected void onSaveInstanceState(Bundle outState) { - FragmentManager fm = getSupportFragmentManager(); - Fragment planRouteFragment = fm.findFragmentByTag(PlanRouteFragment.TAG); - if (planRouteFragment != null) { - fm.beginTransaction() - .remove(planRouteFragment) - .commitNowAllowingStateLoss(); + if (removeFragment(PlanRouteFragment.TAG)) { app.getMapMarkersHelper().getPlanRouteContext().setFragmentVisible(true); } + removeFragment(ImportGpxBottomSheetDialogFragment.TAG); super.onSaveInstanceState(outState); } + private boolean removeFragment(String tag) { + FragmentManager fm = getSupportFragmentManager(); + Fragment fragment = fm.findFragmentByTag(tag); + if (fragment != null) { + fm.beginTransaction() + .remove(fragment) + .commitNowAllowingStateLoss(); + return true; + } + return false; + } + private void checkAppInitialization() { if (app.isApplicationInitializing()) { findViewById(R.id.init_progress).setVisibility(View.VISIBLE); diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java index 4e2dace70c..3d2ade1e96 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java @@ -1,18 +1,37 @@ package net.osmand.plus.helpers; -import android.app.Activity; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.database.Cursor; +import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.AsyncTask; +import android.os.Build; +import android.os.Bundle; import android.os.ParcelFileDescriptor; import android.provider.OpenableColumns; import android.provider.Settings; +import android.support.annotation.DrawableRes; +import android.support.annotation.Nullable; +import android.support.v4.content.ContextCompat; import android.support.v7.app.AlertDialog; +import android.support.v7.app.AppCompatActivity; +import android.text.SpannableStringBuilder; +import android.text.Spanned; +import android.text.style.ForegroundColorSpan; +import android.view.ContextThemeWrapper; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewTreeObserver; +import android.view.Window; +import android.view.WindowManager; +import android.widget.ImageView; +import android.widget.TextView; import android.widget.Toast; +import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.data.FavouritePoint; import net.osmand.plus.FavouritesDbHelper; @@ -21,6 +40,7 @@ import net.osmand.plus.GPXUtilities.GPXFile; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.base.BottomSheetDialogFragment; import net.osmand.plus.myplaces.FavoritesActivity; import net.osmand.plus.views.OsmandMapTileView; @@ -47,7 +67,7 @@ public class GpxImportHelper { public static final String KML_SUFFIX = ".kml"; public static final String KMZ_SUFFIX = ".kmz"; public static final String GPX_SUFFIX = ".gpx"; - private final Activity activity; + private final AppCompatActivity activity; private final OsmandApplication app; private final OsmandMapTileView mapView; private OnGpxImportCompleteListener gpxImportCompleteListener; @@ -56,7 +76,7 @@ public class GpxImportHelper { void onComplete(boolean success); } - public GpxImportHelper(final Activity activity, final OsmandApplication app, final OsmandMapTileView mapView) { + public GpxImportHelper(final AppCompatActivity activity, final OsmandApplication app, final OsmandMapTileView mapView) { this.activity = activity; this.app = app; this.mapView = mapView; @@ -524,26 +544,13 @@ public class GpxImportHelper { if (forceImportFavourites) { importFavoritesImpl(gpxFile, fileName, true); } else { - final DialogInterface.OnClickListener importFavouritesListener = new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - switch (which) { - case DialogInterface.BUTTON_POSITIVE: - importFavoritesImpl(gpxFile, fileName, false); - break; - case DialogInterface.BUTTON_NEGATIVE: - handleResult(gpxFile, fileName, save, useImportDir, false); - break; - } - } - }; - - new AlertDialog.Builder(activity) - .setTitle(R.string.shared_string_import2osmand) - .setMessage(R.string.import_file_favourites) - .setPositiveButton(R.string.shared_string_import, importFavouritesListener) - .setNegativeButton(R.string.shared_string_save, importFavouritesListener) - .show(); + ImportGpxBottomSheetDialogFragment fragment = new ImportGpxBottomSheetDialogFragment(); + fragment.setGpxImportHelper(this); + fragment.setGpxFile(gpxFile); + fragment.setFileName(fileName); + fragment.setSave(save); + fragment.setUseImportDir(useImportDir); + fragment.show(activity.getSupportFragmentManager(), ImportGpxBottomSheetDialogFragment.TAG); } } @@ -597,4 +604,142 @@ public class GpxImportHelper { } return false; } + + public static class ImportGpxBottomSheetDialogFragment extends BottomSheetDialogFragment { + + public static final String TAG = "ImportGpxBottomSheetDialogFragment"; + + private GpxImportHelper gpxImportHelper; + private boolean portrait; + private boolean night; + + private GPXFile gpxFile; + private String fileName; + private boolean save; + private boolean useImportDir; + + public void setGpxImportHelper(GpxImportHelper gpxImportHelper) { + this.gpxImportHelper = gpxImportHelper; + } + + public void setGpxFile(GPXFile gpxFile) { + this.gpxFile = gpxFile; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public void setSave(boolean save) { + this.save = save; + } + + public void setUseImportDir(boolean useImportDir) { + this.useImportDir = useImportDir; + } + + @Nullable + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + portrait = AndroidUiHelper.isOrientationPortrait(getActivity()); + night = getMyApplication().getDaynightHelper().isNightModeForMapControls(); + final int themeRes = night ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme; + + final View mainView = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.fragment_import_gpx_bottom_sheet_dialog, container); + if (portrait) { + AndroidUtils.setBackground(getActivity(), mainView, night, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark); + } + + if (night) { + ((TextView) mainView.findViewById(R.id.import_gpx_title)).setTextColor(ContextCompat.getColor(getActivity(), R.color.ctx_menu_info_text_dark)); + } + + ((ImageView) mainView.findViewById(R.id.import_as_favorites_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_fav_dark)); + ((ImageView) mainView.findViewById(R.id.import_as_gpx_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_polygom_dark)); + + int nameColor = ContextCompat.getColor(getContext(), night ? R.color.osmand_orange : R.color.dashboard_blue); + int descrColor = ContextCompat.getColor(getContext(), night ? R.color.dashboard_subheader_text_dark : R.color.dashboard_subheader_text_light); + String descr = getString(R.string.import_gpx_file_description); + SpannableStringBuilder text = new SpannableStringBuilder(fileName).append(" ").append(descr); + text.setSpan(new ForegroundColorSpan(nameColor), 0, fileName.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + text.setSpan(new ForegroundColorSpan(descrColor), fileName.length() + 1, text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + ((TextView) mainView.findViewById(R.id.import_gpx_description)).setText(text); + + mainView.findViewById(R.id.import_as_favorites_row).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + gpxImportHelper.importFavoritesImpl(gpxFile, fileName, false); + dismiss(); + } + }); + mainView.findViewById(R.id.import_as_gpx_row).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + gpxImportHelper.handleResult(gpxFile, fileName, save, useImportDir, false); + dismiss(); + } + }); + + mainView.findViewById(R.id.cancel_row).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + dismiss(); + } + }); + + final int screenHeight = AndroidUtils.getScreenHeight(getActivity()); + final int statusBarHeight = AndroidUtils.getStatusBarHeight(getActivity()); + final int navBarHeight = AndroidUtils.getNavBarHeight(getActivity()); + + mainView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { + @Override + public void onGlobalLayout() { + final View scrollView = mainView.findViewById(R.id.import_gpx_scroll_view); + int scrollViewHeight = scrollView.getHeight(); + int dividerHeight = AndroidUtils.dpToPx(getContext(), 1); + int cancelButtonHeight = getContext().getResources().getDimensionPixelSize(R.dimen.bottom_sheet_cancel_button_height); + int spaceForScrollView = screenHeight - statusBarHeight - navBarHeight - dividerHeight - cancelButtonHeight; + if (scrollViewHeight > spaceForScrollView) { + scrollView.getLayoutParams().height = spaceForScrollView; + scrollView.requestLayout(); + } + + if (!portrait) { + if (screenHeight - statusBarHeight - mainView.getHeight() >= getResources().getDimension(R.dimen.bottom_sheet_content_padding_small)) { + AndroidUtils.setBackground(getActivity(), mainView, night, + R.drawable.bg_bottom_sheet_topsides_landscape_light, R.drawable.bg_bottom_sheet_topsides_landscape_dark); + } else { + AndroidUtils.setBackground(getActivity(), mainView, night, + R.drawable.bg_bottom_sheet_sides_landscape_light, R.drawable.bg_bottom_sheet_sides_landscape_dark); + } + } + + ViewTreeObserver obs = mainView.getViewTreeObserver(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + obs.removeOnGlobalLayoutListener(this); + } else { + obs.removeGlobalOnLayoutListener(this); + } + } + }); + + return mainView; + } + + @Override + public void onStart() { + super.onStart(); + if (!portrait) { + final Window window = getDialog().getWindow(); + WindowManager.LayoutParams params = window.getAttributes(); + params.width = getActivity().getResources().getDimensionPixelSize(R.dimen.landscape_bottom_sheet_dialog_fragment_width); + window.setAttributes(params); + } + } + + @Override + protected Drawable getContentIcon(@DrawableRes int id) { + return getIcon(id, night ? R.color.ctx_menu_info_text_dark : R.color.on_map_icon_color); + } + } } diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index ff210d8fde..972f68a8a9 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -272,24 +272,15 @@ public class WaypointHelper { RouteTypeRule typeRule = reg.quickGetEncodingRule(pointTypes[r]); AlarmInfo info = AlarmInfo.createAlarmInfo(typeRule, 0, loc); - //Check if stop sign is tagged with direction=forward/backward + // For STOP first check if it has directional info + // TODO: Check if this is needed here if (info != null && info.getType() != null && info.getType() == AlarmInfoType.STOP) { - //TODO: better than bearingVsRouteDirection would be routeVsWayDirection analysis - if (ro.isStopDirectionOpposite(ro.bearingVsRouteDirection(loc))) { + if (ro.isStopApplicable(ro.bearingVsRouteDirection(loc)) == -1) { info = null; } - //TODO: Still missing here is analysis if a stop without direction=* tagging is _behind_ an intersection + //Toast.makeText(app.getApplicationContext(), Double.toString(ro.directionRoute(0, true)) + ",\n" + Double.toString(loc.getBearing()) + ",\n" + Double.toString(MapUtils.alignAngleDifference(ro.directionRoute(0, true) - loc.getBearing() / 180f * Math.PI))), Toast.LENGTH_LONG).show(); } - // Issue #2873 may indicate we need some sort of check here if Alarm is in forward direction - // But cannot reproduce the issue for now - //if (loc.hasBearing()) { - // if (Math.abs(MapUtils.alignAngleDifference(bearingTo("actual alarm location") - loc.getBearing() / 180f * Math.PI)) >= Math.PI / 2f) { - // info = null; - // } - //Toast.makeText(app.getApplicationContext(), Double.toString(ro.directionRoute(0, true)) + ",\n" + Double.toString(loc.getBearing()) + ",\n" + Double.toString(MapUtils.alignAngleDifference(ro.directionRoute(0, true) - loc.getBearing() / 180f * Math.PI))), Toast.LENGTH_LONG).show(); - //} - if (info != null) { if (info.getType() != AlarmInfoType.SPEED_CAMERA || showCameras) { long ms = System.currentTimeMillis(); diff --git a/OsmAnd/src/net/osmand/plus/poi/NominatimPoiFilter.java b/OsmAnd/src/net/osmand/plus/poi/NominatimPoiFilter.java index 6030833277..7db492e49d 100644 --- a/OsmAnd/src/net/osmand/plus/poi/NominatimPoiFilter.java +++ b/OsmAnd/src/net/osmand/plus/poi/NominatimPoiFilter.java @@ -95,8 +95,8 @@ public class NominatimPoiFilter extends PoiUIFilter { urlq = NOMINATIM_API + "?format=xml&addressdetails=0&accept-language="+ Locale.getDefault().getLanguage() + "&q=" + URLEncoder.encode(getFilterByName()); } else { - urlq = NOMINATIM_API + URLEncoder.encode(getFilterByName()) + "?format=xml&addressdetails=1&limit=" + LIMIT - + "&bounded=1&" + viewbox; + urlq = NOMINATIM_API + "?format=xml&addressdetails=1&limit=" + LIMIT + + "&bounded=1&" + viewbox + "&q=" + URLEncoder.encode(getFilterByName()); } log.info(urlq); URLConnection connection = NetworkUtils.getHttpURLConnection(urlq); //$NON-NLS-1$ diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index be77bcc001..eb035bf103 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -14,6 +14,7 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.router.RouteSegmentResult; import net.osmand.router.TurnType; +import net.osmand.plus.routing.AlarmInfo.AlarmInfoType; import net.osmand.util.Algorithms; import net.osmand.util.MapUtils; import android.content.Context; @@ -189,7 +190,8 @@ public class RouteCalculationResult { loc.setLatitude(MapUtils.get31LatitudeY(y31)); loc.setLongitude(MapUtils.get31LongitudeX(x31)); AlarmInfo info = AlarmInfo.createAlarmInfo(typeRule, locInd, loc); - if(info != null) { + // For STOP first check if it has directional info + if ((info != null) && !((info.getType() == AlarmInfoType.STOP) && (res.getObject().isStopApplicable(res.isForwardDirection()) == -1))) { alarms.add(info); } } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index 33404e2a5b..6df8afcd5b 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -533,12 +533,10 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC updateClearButtonAndHint(); updateClearButtonVisibility(true); boolean textEmpty = newQueryText.length() == 0; - updateTabbarVisibility(textEmpty); + updateTabbarVisibility(textEmpty && !isOnlineSearch()); if (textEmpty) { if (addressSearch) { startAddressSearch(); - } else if (isOnlineSearch()) { - restoreSearch(); } if (poiFilterApplied) { poiFilterApplied = false; @@ -552,7 +550,10 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC if (!searchQuery.equalsIgnoreCase(newQueryText)) { searchQuery = newQueryText; if (Algorithms.isEmpty(searchQuery)) { + cancelSearch(); + setResultCollection(null); searchUICore.resetPhrase(); + mainSearchFragment.getAdapter().clear(); } else { runSearch(); } @@ -712,6 +713,10 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC return searchEditText.getText().toString(); } + public boolean isTextEmpty() { + return Algorithms.isEmpty(getText()); + } + public AccessibilityAssistant getAccessibilityAssistant() { return accessibilityAssistant; } @@ -999,7 +1004,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC } else { tabToolbarView.setVisibility(View.GONE); buttonToolbarView.setVisibility( - (isOnlineSearch() && getText().length() > 0) + (isOnlineSearch() && !isTextEmpty()) || !searchUICore.getSearchSettings().isCustomSearch() ? View.VISIBLE : View.GONE); tabsView.setVisibility(View.GONE); searchView.setVisibility(View.VISIBLE); @@ -1426,6 +1431,13 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC searchUICore.updateSettings(settings); } + private void cancelSearch() { + cancelPrev = true; + if (!paused) { + hideProgressBar(); + } + } + private void runSearch() { runSearch(searchQuery); } @@ -1511,7 +1523,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC app.runInUIThread(new Runnable() { @Override public void run() { - if(paused) { + if (paused) { return; } searching = false; @@ -1722,7 +1734,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC } private void addMoreButton() { - if (!paused && !cancelPrev && mainSearchFragment != null) { + if (!paused && !cancelPrev && mainSearchFragment != null && !isTextEmpty()) { QuickSearchMoreListItem moreListItem = new QuickSearchMoreListItem(app, null, new SearchMoreItemOnClickListener() { @Override @@ -1744,6 +1756,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC }); moreListItem.setInterruptedSearch(interruptedSearch); moreListItem.setEmptySearch(isResultEmpty()); + moreListItem.setOnlineSearch(isOnlineSearch()); mainSearchFragment.addListItem(moreListItem); } } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java index e243ee34be..26e398f86b 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java @@ -338,7 +338,8 @@ public class QuickSearchHelper implements ResourceListener { double lon = phrase.getSettings().getOriginalLocation().getLongitude(); String text = phrase.getUnknownSearchPhrase(); filter.setFilterByName(text); - publishAmenities(phrase, matcher, filter.initializeNewSearch(lat, lon, -1, null, phrase.getRadiusLevel())); + publishAmenities(phrase, matcher, filter.initializeNewSearch(lat, lon, + -1, null, phrase.getRadiusLevel() + 3)); return true; } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java index 9f1fa9ec39..ab0982ffbd 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java @@ -242,9 +242,7 @@ public class QuickSearchListAdapter extends ArrayAdapter { ((QuickSearchMoreListItem) listItem).increaseRadiusOnClick(); } }); - if (OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) != null - && !app.getSearchUICore().getCore().getSearchSettings().isCustomSearch() - && !app.getSearchUICore().getCore().getSearchSettings().hasCustomSearchType(ObjectType.ONLINE_SEARCH)) { + if (!searchMoreListItem.isOnlineSearch()) { view.findViewById(R.id.online_search_row).setVisibility(View.VISIBLE); view.findViewById(R.id.online_search_row).setOnClickListener(new View.OnClickListener() { @Override diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchMoreListItem.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchMoreListItem.java index c3a6290dc0..141b0e3a5c 100644 --- a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchMoreListItem.java +++ b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchMoreListItem.java @@ -10,6 +10,7 @@ public class QuickSearchMoreListItem extends QuickSearchListItem { private String name; private SearchMoreItemOnClickListener onClickListener; private boolean emptySearch; + private boolean onlineSearch; private boolean interruptedSearch; private String findMore; private String restartSearch; @@ -59,6 +60,14 @@ public class QuickSearchMoreListItem extends QuickSearchListItem { this.emptySearch = emptySearch; } + public boolean isOnlineSearch() { + return onlineSearch; + } + + public void setOnlineSearch(boolean onlineSearch) { + this.onlineSearch = onlineSearch; + } + public void increaseRadiusOnClick() { if (onClickListener != null) { onClickListener.increaseRadiusOnClick();