From b703536bfecd9fd0984cd70e9efea26fd655e22f Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 9 Sep 2020 12:13:46 +0300 Subject: [PATCH] Fix route between points scroll --- ...ute_between_points_bottom_sheet_dialog.xml | 104 +++++++++--------- ...etweenPointsBottomSheetDialogFragment.java | 7 ++ 2 files changed, 56 insertions(+), 55 deletions(-) diff --git a/OsmAnd/res/layout/fragment_route_between_points_bottom_sheet_dialog.xml b/OsmAnd/res/layout/fragment_route_between_points_bottom_sheet_dialog.xml index 99b4cf41ff..cb7cca0488 100644 --- a/OsmAnd/res/layout/fragment_route_between_points_bottom_sheet_dialog.xml +++ b/OsmAnd/res/layout/fragment_route_between_points_bottom_sheet_dialog.xml @@ -1,70 +1,64 @@ - + android:layout_height="wrap_content" + android:background="?attr/bg_color" + android:orientation="vertical"> + android:orientation="vertical" + android:paddingBottom="@dimen/bottom_sheet_content_padding_small"> - + android:gravity="center_vertical" + android:paddingStart="@dimen/content_padding" + android:paddingLeft="@dimen/content_padding" + android:paddingTop="@dimen/measurement_tool_menu_title_padding_top" + android:paddingEnd="@dimen/content_padding" + android:paddingRight="@dimen/content_padding" + android:paddingBottom="@dimen/measurement_tool_menu_title_padding_bottom" + android:text="@string/route_between_points" + android:textAppearance="@style/TextAppearance.ListItemTitle" + osmand:typeface="@string/font_roboto_medium" /> - + - - - - - - + + - \ 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 f57cbd4e04..d611bf83be 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/RouteBetweenPointsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/RouteBetweenPointsBottomSheetDialogFragment.java @@ -13,6 +13,7 @@ import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; +import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; @@ -29,6 +30,7 @@ import java.util.List; import static net.osmand.plus.UiUtilities.CustomRadioButtonType.LEFT; 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 { @@ -225,6 +227,11 @@ public class RouteBetweenPointsBottomSheetDialogFragment extends MenuBottomSheet items.add(new BaseBottomSheetItem.Builder().setCustomView(mainView).create()); } + @Override + protected int getCustomHeight() { + return AndroidUtils.dpToPx(getContext(), BOTTOM_SHEET_HEIGHT_DP); + } + @Override protected int getDismissButtonTextId() { return R.string.shared_string_close;