From 481b713c0e8c0aa949afcd2f636d8e830c96ccee Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Fri, 15 Dec 2017 11:41:21 +0200 Subject: [PATCH] Make divider match parent --- OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java index 836aa82652..8c146aefb2 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java @@ -76,6 +76,7 @@ public class MenuBuilder { protected OsmandApplication app; protected LinkedList plainMenuItems; private boolean firstRow; + private boolean matchWidthDivider; protected boolean light; private long objectId; private LatLon latLon; @@ -291,6 +292,7 @@ public class MenuBuilder { if (routes.size() > 0) { buildRow(view, 0, app.getString(R.string.transport_Routes), 0, true, getCollapsableTransportStopRoutesView(view.getContext(), false), false, 0, false, null); + matchWidthDivider = true; } buildInternal(view); if (showOnlinePhotos) { @@ -625,6 +627,10 @@ public class MenuBuilder { } public void buildRowDivider(View view, boolean matchWidth) { + if (matchWidthDivider) { + matchWidth = true; + matchWidthDivider = false; + } View horizontalLine = new View(view.getContext()); LinearLayout.LayoutParams llHorLineParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, dpToPx(1f)); llHorLineParams.gravity = Gravity.BOTTOM;