deleted unused view in onItemClick

This commit is contained in:
Chumva 2018-03-13 17:38:37 +02:00
parent e3c91c0567
commit 35bc18bb42
3 changed files with 5 additions and 6 deletions

View file

@ -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) {

View file

@ -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;

View file

@ -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();