diff --git a/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml b/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml index f0ff17170d..ac484e30f3 100644 --- a/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml +++ b/OsmAnd/res/layout/bottom_sheet_with_switch_divider_and_additional_button.xml @@ -6,6 +6,10 @@ android:layout_height="wrap_content" android:gravity="center_vertical" android:minHeight="@dimen/bottom_sheet_selected_item_title_height" + android:paddingStart="@dimen/content_padding" + android:paddingLeft="@dimen/content_padding" + android:paddingEnd="@dimen/content_padding" + android:paddingRight="@dimen/content_padding" android:baselineAligned="false"> + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:osmand="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> - + - + - + - + - + - + + - - + - + - + + + + diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java index f33f7dfa38..4f581b51b7 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java @@ -31,6 +31,7 @@ import net.osmand.plus.UiUtilities.DialogButtonType; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription; +import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem; import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.helpers.FontCache; @@ -50,6 +51,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment { private ImageView upDownBtn; private SwitchCompat confirmEveryRun; + private RangeSlider intervalSlider; private TextView intervalValueView; private boolean infoExpanded; @@ -110,8 +112,9 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment { intervalValueView = itemView.findViewById(R.id.interval_value); updateIntervalLegend(); - RangeSlider intervalSlider = itemView.findViewById(R.id.interval_slider); + intervalSlider = itemView.findViewById(R.id.interval_slider); intervalSlider.setValueTo(secondsLength + minutesLength - 1); + intervalSlider.setVisibility(View.GONE); intervalSlider.addOnChangeListener(new RangeSlider.OnChangeListener() { @Override @@ -218,6 +221,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment { private void toggleInfoView() { infoExpanded = !infoExpanded; + AndroidUiHelper.updateVisibility(intervalSlider, infoExpanded); AndroidUiHelper.updateVisibility(confirmEveryRun, infoExpanded); updateUpDownBtn(); }