Remove icon from parameters

This commit is contained in:
PavelRatushny 2017-11-22 18:33:13 +02:00
parent 204b6f8310
commit ec80872974
4 changed files with 6 additions and 6 deletions

View file

@ -436,7 +436,7 @@ public abstract class MenuController extends BaseMenuController {
return true;
}
protected Drawable getShowOnTopBarIcon() {
public Drawable getShowOnTopBarIcon() {
if (showOnTopBarIcon == null) {
IconsCache ic = getMapActivity().getMyApplication().getIconsCache();
Drawable background = ic.getIcon(R.drawable.ic_action_device_top,

View file

@ -33,7 +33,7 @@ public class FavouritePointMenuController extends MenuController {
final MapMarker mapMarker = markersHelper.getMapMarker(fav);
if (mapMarker != null) {
MapMarkerMenuController.createMarkerButtons(this, mapActivity, mapMarker, getShowOnTopBarIcon());
MapMarkerMenuController.createMarkerButtons(this, mapActivity, mapMarker);
}
}

View file

@ -22,7 +22,7 @@ public class MapMarkerMenuController extends MenuController {
super(new MenuBuilder(mapActivity), pointDescription, mapActivity);
this.mapMarker = mapMarker;
builder.setShowNearestWiki(true);
createMarkerButtons(this, mapActivity, mapMarker, getShowOnTopBarIcon());
createMarkerButtons(this, mapActivity, mapMarker);
}
@Override
@ -76,7 +76,7 @@ public class MapMarkerMenuController extends MenuController {
return R.string.rename_marker;
}
public static void createMarkerButtons(MenuController menuController, final MapActivity mapActivity, final MapMarker mapMarker, Drawable leftIcon) {
public static void createMarkerButtons(MenuController menuController, final MapActivity mapActivity, final MapMarker mapMarker) {
final MapMarkersHelper markersHelper = mapActivity.getMyApplication().getMapMarkersHelper();
TitleButtonController leftTitleButtonController = menuController.new TitleButtonController() {
@ -99,7 +99,7 @@ public class MapMarkerMenuController extends MenuController {
}
};
leftSubtitleButtonController.caption = mapActivity.getString(R.string.show_on_top_bar);
leftSubtitleButtonController.leftIcon = leftIcon;
leftSubtitleButtonController.leftIcon = menuController.getShowOnTopBarIcon();
menuController.setLeftSubtitleButtonController(leftSubtitleButtonController);
}
}

View file

@ -28,7 +28,7 @@ public class WptPtMenuController extends MenuController {
final MapMarker mapMarker = markersHelper.getMapMarker(wpt);
if (mapMarker != null) {
MapMarkerMenuController.createMarkerButtons(this, mapActivity, mapMarker, getShowOnTopBarIcon());
MapMarkerMenuController.createMarkerButtons(this, mapActivity, mapMarker);
}
}