From 1f65840dd4334f2f29e16007015668773d076bf1 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 23 Sep 2020 16:29:16 +0300 Subject: [PATCH] Fix button width in plan route and divider in follow track --- OsmAnd/res/layout/fragment_measurement_tool.xml | 6 ++++-- .../plus/routepreparationmenu/FollowTrackFragment.java | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/layout/fragment_measurement_tool.xml b/OsmAnd/res/layout/fragment_measurement_tool.xml index fe1ba9b1d7..d4b7f7ea57 100644 --- a/OsmAnd/res/layout/fragment_measurement_tool.xml +++ b/OsmAnd/res/layout/fragment_measurement_tool.xml @@ -216,10 +216,12 @@ + android:minWidth="@dimen/measurement_tool_button_width" /> + diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java index ee2bf6b38e..42ff2f94e6 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java @@ -205,7 +205,6 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca SelectTrackCard selectTrackCard = new SelectTrackCard(mapActivity); selectTrackCard.setListener(this); cardsContainer.addView(selectTrackCard.build(mapActivity)); - cardsContainer.addView(buildDividerView(cardsContainer, false)); ApplicationMode mode = app.getRoutingHelper().getAppMode(); @@ -213,13 +212,16 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca GPXRouteParamsBuilder rparams = routingHelper.getCurrentGPXRoute(); boolean osmandRouter = mode.getRouteService() == RouteProvider.RouteService.OSMAND; if (rparams != null && osmandRouter) { - if (!gpxFile.hasRoute() || gpxFile.hasRtePt()) { + boolean showReverseCard = !gpxFile.hasRoute() || gpxFile.hasRtePt(); + if (showReverseCard) { + cardsContainer.addView(buildDividerView(cardsContainer, false)); + ReverseTrackCard reverseTrackCard = new ReverseTrackCard(mapActivity, rparams.isReverse()); reverseTrackCard.setListener(this); cardsContainer.addView(reverseTrackCard.build(mapActivity)); } if (!gpxFile.hasRtePt() && !gpxFile.hasRoute()) { - cardsContainer.addView(buildDividerView(cardsContainer, true)); + cardsContainer.addView(buildDividerView(cardsContainer, showReverseCard)); AttachTrackToRoadsCard attachTrackCard = new AttachTrackToRoadsCard(mapActivity); attachTrackCard.setListener(this);