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 da5f1dff61..362dacf2c6 100644 --- a/OsmAnd/res/layout/bottom_sheet_plan_route_select_file.xml +++ b/OsmAnd/res/layout/bottom_sheet_plan_route_select_file.xml @@ -1,66 +1,59 @@ - - + + + + + android:clipToPadding="false" + android:orientation="horizontal" + android:paddingStart="@dimen/content_padding" + android:paddingLeft="@dimen/content_padding" + android:paddingEnd="@dimen/content_padding" + android:paddingRight="@dimen/content_padding" + tools:itemCount="3" + tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" + tools:listitem="@layout/point_editor_icon_category_item" + tools:orientation="horizontal" /> - + - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/RouteBetweenPointsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/RouteBetweenPointsBottomSheetDialogFragment.java index d611bf83be..b1ab024ea9 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/RouteBetweenPointsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/RouteBetweenPointsBottomSheetDialogFragment.java @@ -18,7 +18,7 @@ import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; -import net.osmand.plus.base.MenuBottomSheetDialogFragment; +import net.osmand.plus.base.BottomSheetBehaviourDialogFragment; import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; import net.osmand.plus.settings.backend.ApplicationMode; @@ -32,7 +32,7 @@ import static net.osmand.plus.UiUtilities.CustomRadioButtonType.RIGHT; import static net.osmand.plus.measurementtool.MeasurementEditingContext.DEFAULT_APP_MODE; import static net.osmand.plus.measurementtool.SelectFileBottomSheet.BOTTOM_SHEET_HEIGHT_DP; -public class RouteBetweenPointsBottomSheetDialogFragment extends MenuBottomSheetDialogFragment { +public class RouteBetweenPointsBottomSheetDialogFragment extends BottomSheetBehaviourDialogFragment { private static final Log LOG = PlatformUtil.getLog(RouteBetweenPointsBottomSheetDialogFragment.class); public static final String TAG = RouteBetweenPointsBottomSheetDialogFragment.class.getSimpleName(); @@ -228,7 +228,7 @@ public class RouteBetweenPointsBottomSheetDialogFragment extends MenuBottomSheet } @Override - protected int getCustomHeight() { + protected int getPeekHeight() { return AndroidUtils.dpToPx(getContext(), BOTTOM_SHEET_HEIGHT_DP); } diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/SelectFileBottomSheet.java b/OsmAnd/src/net/osmand/plus/measurementtool/SelectFileBottomSheet.java index d9619de9d1..0f1920c7e6 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/SelectFileBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/SelectFileBottomSheet.java @@ -15,7 +15,7 @@ import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; -import net.osmand.plus.base.MenuBottomSheetDialogFragment; +import net.osmand.plus.base.BottomSheetBehaviourDialogFragment; import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; import net.osmand.plus.helpers.GpxTrackAdapter; import net.osmand.plus.helpers.GpxTrackAdapter.OnItemClickListener; @@ -32,7 +32,7 @@ import java.util.Map; import static net.osmand.plus.helpers.GpxUiHelper.getSortedGPXFilesInfo; import static net.osmand.util.Algorithms.collectDirs; -public class SelectFileBottomSheet extends MenuBottomSheetDialogFragment { +public class SelectFileBottomSheet extends BottomSheetBehaviourDialogFragment { enum Mode { OPEN_TRACK(R.string.plan_route_open_existing_track, R.string.plan_route_select_track_file_for_open), @@ -173,8 +173,8 @@ public class SelectFileBottomSheet extends MenuBottomSheetDialogFragment { } @Override - protected int getCustomHeight() { - return AndroidUtils.dpToPx(mainView.getContext(), BOTTOM_SHEET_HEIGHT_DP); + protected int getPeekHeight() { + return AndroidUtils.dpToPx(getContext(), BOTTOM_SHEET_HEIGHT_DP); } public static void showInstance(FragmentManager fragmentManager, SelectFileListener listener, Mode mode) {