From a1aeb9953b4de1e84f32405f1d984a2d0ce33df8 Mon Sep 17 00:00:00 2001 From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:40:54 +0200 Subject: [PATCH] Fix rtl, icon, color tick, visible container --- ...eet_with_switch_divider_and_additional_button.xml | 12 +++++++----- OsmAnd/res/layout/trip_recording_fragment.xml | 2 +- .../plus/monitoring/TripRecordingBottomSheet.java | 10 ++++------ 3 files changed, 12 insertions(+), 12 deletions(-) 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 7e522baa0d..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 @@ -8,6 +8,8 @@ android:gravity="center_vertical" android:minHeight="@dimen/bottom_sheet_selected_item_title_height" android:paddingStart="@dimen/content_padding" + android:paddingEnd="@dimen/content_padding" + android:paddingRight="@dimen/content_padding" android:paddingLeft="@dimen/content_padding"> @@ -66,11 +68,11 @@ diff --git a/OsmAnd/res/layout/trip_recording_fragment.xml b/OsmAnd/res/layout/trip_recording_fragment.xml index 62bde11259..f34545e7f2 100644 --- a/OsmAnd/res/layout/trip_recording_fragment.xml +++ b/OsmAnd/res/layout/trip_recording_fragment.xml @@ -83,6 +83,7 @@ app:thumbRadius="@dimen/content_padding_small_half" app:trackColorActive="@color/profile_icon_color_blue_light" app:trackColorInactive="#4D007EB3" + app:tickColorInactive="#007EB3" app:trackHeight="@dimen/slider_track_height" tools:visibility="visible" /> @@ -97,7 +98,6 @@ android:text="@string/confirm_every_run" android:textColor="?android:textColorPrimary" android:textSize="@dimen/default_list_text_size" - android:visibility="gone" osmand:typeface="@string/font_roboto_regular" tools:visibility="visible" /> diff --git a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java index acad56bfb0..54b444ff30 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/TripRecordingBottomSheet.java @@ -31,8 +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.DividerItem; -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; @@ -53,7 +51,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment { private SwitchCompat confirmEveryRun; private RangeSlider intervalSlider; private TextView intervalValueView; - + private LinearLayout container; private boolean infoExpanded; @Override @@ -109,9 +107,10 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment { intervalValueView = itemView.findViewById(R.id.interval_value); updateIntervalLegend(); + container = itemView.findViewById(R.id.always_ask_and_range_slider_container); intervalSlider = itemView.findViewById(R.id.interval_slider); intervalSlider.setValueTo(secondsLength + minutesLength - 1); - intervalSlider.setVisibility(View.GONE); + container.setVisibility(View.GONE); intervalSlider.addOnChangeListener(new RangeSlider.OnChangeListener() { @Override @@ -218,8 +217,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment { private void toggleInfoView() { infoExpanded = !infoExpanded; - AndroidUiHelper.updateVisibility(intervalSlider, infoExpanded); - AndroidUiHelper.updateVisibility(confirmEveryRun, infoExpanded); + AndroidUiHelper.updateVisibility(container, infoExpanded); updateUpDownBtn(); }