From 35bc18bb42ab720ecf1abb9ee71da9644cf102b3 Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 13 Mar 2018 17:38:37 +0200 Subject: [PATCH] deleted unused view in onItemClick --- .../src/net/osmand/plus/helpers/WaypointDialogHelper.java | 2 +- .../other/FavouritesBottomSheetMenuFragment.java | 3 +-- .../osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index eada4a31e7..66ef194e0d 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -1086,7 +1086,7 @@ public class WaypointDialogHelper { @Override public void onItemClick(AdapterView parent, View view, int position, long id) { if (id == MapRouteInfoMenu.SPINNER_FAV_ID) { - routeMenu.selectFavorite(null, false, true); + routeMenu.selectFavorite(false, true); } else if (id == MapRouteInfoMenu.SPINNER_MAP_ID) { routeMenu.selectOnScreen(false, true); } else if (id == MapRouteInfoMenu.SPINNER_ADDRESS_ID) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java index 4ff8c0a763..ffd307ab33 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesBottomSheetMenuFragment.java @@ -8,7 +8,6 @@ import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; -import android.widget.Toast; import net.osmand.Location; import net.osmand.data.FavouritePoint; @@ -32,7 +31,7 @@ public class FavouritesBottomSheetMenuFragment extends MenuBottomSheetDialogFrag public static final String TARGET = "target"; public static final String INTERMEDIATE = "intermediate"; - public static final String TAG = "AddGroupBottomSheetDialogFragment"; + public static final String TAG = "FavouritesBottomSheetMenuFragment"; private MapActivity mapActivity; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java index 7ff163b108..ed19b63d1c 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java @@ -338,7 +338,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { @Override public void run() { if (id == SPINNER_FAV_ID) { - selectFavorite(parentView, true, false); + selectFavorite(true, false); } else if (id == SPINNER_MAP_ID) { selectOnScreen(true, false); } else if (id == SPINNER_ADDRESS_ID) { @@ -408,7 +408,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { } updateFromIcon(parentView); } else if (id == SPINNER_FAV_ID) { - selectFavorite(parentView, false, false); + selectFavorite(false, false); } else if (id == SPINNER_MAP_ID) { selectOnScreen(false, false); } else if (id == SPINNER_ADDRESS_ID) { @@ -470,7 +470,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { updateMenu(); } - public void selectFavorite(@Nullable final View parentView, final boolean target, final boolean intermediate) { + public void selectFavorite(final boolean target, final boolean intermediate) { FragmentManager fragmentManager = mapActivity.getSupportFragmentManager(); FavouritesBottomSheetMenuFragment fragment = new FavouritesBottomSheetMenuFragment(); Bundle args = new Bundle();