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..681c03e560 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 @@ -1,12 +1,16 @@ + android:paddingStart="@dimen/content_padding" + android:paddingEnd="@dimen/content_padding" + android:paddingRight="@dimen/content_padding" + android:paddingLeft="@dimen/content_padding"> @@ -40,8 +46,8 @@ android:layout_gravity="center_vertical" android:layout_marginStart="@dimen/bottom_sheet_content_margin" android:layout_marginLeft="@dimen/bottom_sheet_content_margin" - android:layout_marginEnd="@dimen/content_padding_half" - android:layout_marginRight="@dimen/content_padding_half" + android:layout_marginEnd="@dimen/bottom_sheet_content_margin" + android:layout_marginRight="@dimen/bottom_sheet_content_margin" tools:checked="true" /> @@ -62,11 +68,11 @@ diff --git a/OsmAnd/res/layout/trip_recording_fragment.xml b/OsmAnd/res/layout/trip_recording_fragment.xml index a460193cd5..8c43e98d5f 100644 --- a/OsmAnd/res/layout/trip_recording_fragment.xml +++ b/OsmAnd/res/layout/trip_recording_fragment.xml @@ -1,89 +1,114 @@ + 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..54b444ff30 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java @@ -31,7 +31,6 @@ 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.DividerSpaceItem; import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.helpers.FontCache; import net.osmand.plus.settings.backend.OsmandSettings; @@ -50,8 +49,9 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment { private ImageView upDownBtn; private SwitchCompat confirmEveryRun; + private RangeSlider intervalSlider; private TextView intervalValueView; - + private LinearLayout container; private boolean infoExpanded; @Override @@ -66,11 +66,8 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment { .setCustomView(itemView) .create()); - int padding = getResources().getDimensionPixelSize(R.dimen.content_padding_small); final int paddingSmall = getResources().getDimensionPixelSize(R.dimen.content_padding_small); - items.add(new DividerSpaceItem(context, padding)); - LinearLayout showTrackOnMapView = itemView.findViewById(R.id.show_track_on_map); TextView showTrackOnMapTitle = showTrackOnMapView.findViewById(R.id.title); showTrackOnMapTitle.setText(R.string.show_track_on_map); @@ -110,8 +107,10 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment { intervalValueView = itemView.findViewById(R.id.interval_value); updateIntervalLegend(); - RangeSlider intervalSlider = itemView.findViewById(R.id.interval_slider); + container = itemView.findViewById(R.id.always_ask_and_range_slider_container); + intervalSlider = itemView.findViewById(R.id.interval_slider); intervalSlider.setValueTo(secondsLength + minutesLength - 1); + container.setVisibility(View.GONE); intervalSlider.addOnChangeListener(new RangeSlider.OnChangeListener() { @Override @@ -218,7 +217,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment { private void toggleInfoView() { infoExpanded = !infoExpanded; - AndroidUiHelper.updateVisibility(confirmEveryRun, infoExpanded); + AndroidUiHelper.updateVisibility(container, infoExpanded); updateUpDownBtn(); }