diff --git a/OsmAnd/res/layout/bottom_sheet_plan_route_select_file.xml b/OsmAnd/res/layout/bottom_sheet_plan_route_select_file.xml
index 2e00611e3d..da5f1dff61 100644
--- a/OsmAnd/res/layout/bottom_sheet_plan_route_select_file.xml
+++ b/OsmAnd/res/layout/bottom_sheet_plan_route_select_file.xml
@@ -1,60 +1,66 @@
-
-
-
-
-
-
+ android:orientation="vertical">
-
+
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/bottom_sheet_plan_route_start.xml b/OsmAnd/res/layout/bottom_sheet_plan_route_start.xml
index 84900e29d2..a4aa9f312e 100644
--- a/OsmAnd/res/layout/bottom_sheet_plan_route_start.xml
+++ b/OsmAnd/res/layout/bottom_sheet_plan_route_start.xml
@@ -1,41 +1,47 @@
-
+ android:orientation="vertical">
-
+ android:orientation="horizontal"
+ android:paddingStart="@dimen/content_padding"
+ android:paddingLeft="@dimen/content_padding"
+ android:paddingTop="@dimen/bottom_sheet_title_padding_top"
+ android:paddingEnd="@dimen/content_padding"
+ android:paddingRight="@dimen/content_padding"
+ android:paddingBottom="@dimen/bottom_sheet_title_padding_bottom">
+
+
+
+
+
+
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/fragment_gpx_approximation_bottom_sheet_dialog.xml b/OsmAnd/res/layout/fragment_gpx_approximation_bottom_sheet_dialog.xml
index 086fb5a66f..d43c0435ad 100644
--- a/OsmAnd/res/layout/fragment_gpx_approximation_bottom_sheet_dialog.xml
+++ b/OsmAnd/res/layout/fragment_gpx_approximation_bottom_sheet_dialog.xml
@@ -11,7 +11,25 @@
android:layout_height="wrap_content"
android:orientation="vertical">
-
+
+
+
+
+
+
+
+
+
-
-
diff --git a/OsmAnd/src/net/osmand/plus/base/ContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/base/ContextMenuFragment.java
index 664c2a8afe..57928eac50 100644
--- a/OsmAnd/src/net/osmand/plus/base/ContextMenuFragment.java
+++ b/OsmAnd/src/net/osmand/plus/base/ContextMenuFragment.java
@@ -66,6 +66,7 @@ public abstract class ContextMenuFragment extends BaseOsmAndFragment {
private View view;
private OnLayoutChangeListener containerLayoutListener;
private View topShadow;
+ private ViewGroup topView;
private View bottomScrollView;
private LinearLayout cardsContainer;
private FrameLayout bottomContainer;
@@ -167,6 +168,11 @@ public abstract class ContextMenuFragment extends BaseOsmAndFragment {
return mainView;
}
+ @Nullable
+ public ViewGroup getTopView() {
+ return topView;
+ }
+
public boolean isNightMode() {
return nightMode;
}
@@ -290,7 +296,7 @@ public abstract class ContextMenuFragment extends BaseOsmAndFragment {
final int touchSlop = vc.getScaledTouchSlop();
if (getTopViewId() != 0) {
- View topView = view.findViewById(getTopViewId());
+ topView = view.findViewById(getTopViewId());
AndroidUtils.setBackground(app, topView, nightMode, R.color.card_and_list_background_light, R.color.card_and_list_background_dark);
}
if (!portrait) {
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
index 7c19d0db33..4217faf1c9 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/GpxApproximationFragment.java
@@ -61,6 +61,11 @@ public class GpxApproximationFragment extends ContextMenuScrollFragment
return R.layout.fragment_gpx_approximation_bottom_sheet_dialog;
}
+ @Override
+ public int getTopViewId() {
+ return R.id.gpx_approximation_top_shadow_all;
+ }
+
@Override
public int getHeaderViewHeight() {
return menuTitleHeight;
@@ -259,9 +264,11 @@ public class GpxApproximationFragment extends ContextMenuScrollFragment
ViewGroup cardsContainer = getCardsContainer();
cardsContainer.removeAllViews();
- SliderCard sliderCard = new SliderCard(mapActivity, distanceThreshold);
- sliderCard.setListener(this);
- cardsContainer.addView(sliderCard.build(mapActivity));
+ if (getTopView() != null) {
+ SliderCard sliderCard = new SliderCard(mapActivity, distanceThreshold);
+ sliderCard.setListener(this);
+ getTopView().addView(sliderCard.build(mapActivity));
+ }
ProfileCard profileCard = new ProfileCard(mapActivity, snapToRoadAppMode);
profileCard.setListener(this);
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/ProfileCard.java b/OsmAnd/src/net/osmand/plus/measurementtool/ProfileCard.java
index 27245d92f4..98d180e48f 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/ProfileCard.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/ProfileCard.java
@@ -15,6 +15,7 @@ import net.osmand.plus.routepreparationmenu.cards.BaseCard;
import net.osmand.plus.settings.backend.ApplicationMode;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
public class ProfileCard extends BaseCard {
@@ -34,9 +35,15 @@ public class ProfileCard extends BaseCard {
@Override
protected void updateContent() {
-
final List modes = new ArrayList<>(ApplicationMode.values(app));
modes.remove(ApplicationMode.DEFAULT);
+ Iterator iterator = modes.iterator();
+ while (iterator.hasNext()) {
+ ApplicationMode mode = iterator.next();
+ if ("public_transport".equals(mode.getRoutingProfile())) {
+ iterator.remove();
+ }
+ }
for (int i = 0; i < modes.size(); i++) {
ApplicationMode mode = modes.get(i);
LinearLayout container = view.findViewById(R.id.content_container);
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/RouteBetweenPointsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/RouteBetweenPointsBottomSheetDialogFragment.java
index a6348963ca..29f1294a42 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/RouteBetweenPointsBottomSheetDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/RouteBetweenPointsBottomSheetDialogFragment.java
@@ -34,7 +34,8 @@ import org.apache.commons.logging.Log;
import java.util.ArrayList;
import java.util.List;
-import static net.osmand.plus.UiUtilities.CustomRadioButtonType.*;
+import static net.osmand.plus.UiUtilities.CustomRadioButtonType.LEFT;
+import static net.osmand.plus.UiUtilities.CustomRadioButtonType.RIGHT;
import static net.osmand.plus.measurementtool.MeasurementEditingContext.CalculationMode.NEXT_SEGMENT;
import static net.osmand.plus.measurementtool.MeasurementEditingContext.CalculationMode.WHOLE_TRACK;
import static net.osmand.plus.measurementtool.MeasurementEditingContext.DEFAULT_APP_MODE;
@@ -120,8 +121,10 @@ public class RouteBetweenPointsBottomSheetDialogFragment extends BottomSheetDial
for (int i = 0; i < modes.size(); i++) {
ApplicationMode mode = modes.get(i);
- icon = app.getUIUtilities().getIcon(mode.getIconRes(), mode.getIconColorInfo().getColor(nightMode));
- addProfileView(navigationType, onClickListener, i, icon, mode.toHumanString(), mode.equals(appMode));
+ if (!"public_transport".equals(mode.getRoutingProfile())) {
+ icon = app.getUIUtilities().getIcon(mode.getIconRes(), mode.getIconColorInfo().getColor(nightMode));
+ addProfileView(navigationType, onClickListener, i, icon, mode.toHumanString(), mode.equals(appMode));
+ }
}
segmentBtn.setOnClickListener(new View.OnClickListener() {
diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java
index 0f7f812f48..65f1bab915 100644
--- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java
+++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java
@@ -477,8 +477,8 @@ public class MapRouteInfoMenuFragment extends ContextMenuFragment {
AndroidUtils.setBackground(ctx, getCardsContainer(), isNightMode(),
R.color.activity_background_light, R.color.activity_background_dark);
- if (getTopViewId() != 0) {
- View topView = view.findViewById(getTopViewId());
+ if (getTopView() != null) {
+ View topView = getTopView();
AndroidUtils.setBackground(ctx, topView, isNightMode(), R.color.card_and_list_background_light, R.color.card_and_list_background_dark);
}