Merge pull request #11127 from osmandapp/Plan-route-issues
Remove "Swap" button from RP if "Follow track"
This commit is contained in:
commit
56a033dc60
1 changed files with 8 additions and 1 deletions
|
@ -98,9 +98,9 @@ import net.osmand.plus.routepreparationmenu.cards.PublicTransportNotFoundSetting
|
||||||
import net.osmand.plus.routepreparationmenu.cards.PublicTransportNotFoundWarningCard;
|
import net.osmand.plus.routepreparationmenu.cards.PublicTransportNotFoundWarningCard;
|
||||||
import net.osmand.plus.routepreparationmenu.cards.SimpleRouteCard;
|
import net.osmand.plus.routepreparationmenu.cards.SimpleRouteCard;
|
||||||
import net.osmand.plus.routepreparationmenu.cards.TracksCard;
|
import net.osmand.plus.routepreparationmenu.cards.TracksCard;
|
||||||
|
import net.osmand.plus.routing.GPXRouteParams.GPXRouteParamsBuilder;
|
||||||
import net.osmand.plus.routing.IRouteInformationListener;
|
import net.osmand.plus.routing.IRouteInformationListener;
|
||||||
import net.osmand.plus.routing.RouteCalculationResult;
|
import net.osmand.plus.routing.RouteCalculationResult;
|
||||||
import net.osmand.plus.routing.GPXRouteParams.GPXRouteParamsBuilder;
|
|
||||||
import net.osmand.plus.routing.RoutingHelper;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import net.osmand.plus.routing.RoutingHelperUtils;
|
import net.osmand.plus.routing.RoutingHelperUtils;
|
||||||
import net.osmand.plus.routing.TransportRoutingHelper;
|
import net.osmand.plus.routing.TransportRoutingHelper;
|
||||||
|
@ -1831,6 +1831,13 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
||||||
});
|
});
|
||||||
|
|
||||||
FrameLayout fromButton = (FrameLayout) mainView.findViewById(R.id.from_button);
|
FrameLayout fromButton = (FrameLayout) mainView.findViewById(R.id.from_button);
|
||||||
|
boolean isFollowTrack = app.getRoutingHelper().getCurrentGPXRoute() != null;
|
||||||
|
|
||||||
|
if (isFollowTrack) {
|
||||||
|
fromButton.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
fromButton.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
LinearLayout fromButtonContainer = (LinearLayout) mainView.findViewById(R.id.from_button_container);
|
LinearLayout fromButtonContainer = (LinearLayout) mainView.findViewById(R.id.from_button_container);
|
||||||
setupButtonBackground(fromButton, fromButtonContainer);
|
setupButtonBackground(fromButton, fromButtonContainer);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue