From 551dd084ad53d00c4b0e0a0a6d70376db4a0acf4 Mon Sep 17 00:00:00 2001 From: cepprice Date: Tue, 20 Apr 2021 12:01:27 +0500 Subject: [PATCH] Fix jumping map controls --- .../layout-land/fragment_measurement_tool.xml | 32 +- .../res/layout/fragment_measurement_tool.xml | 535 +++++++++--------- .../MeasurementToolFragment.java | 5 +- 3 files changed, 303 insertions(+), 269 deletions(-) diff --git a/OsmAnd/res/layout-land/fragment_measurement_tool.xml b/OsmAnd/res/layout-land/fragment_measurement_tool.xml index 505e680262..54ba1513ec 100644 --- a/OsmAnd/res/layout-land/fragment_measurement_tool.xml +++ b/OsmAnd/res/layout-land/fragment_measurement_tool.xml @@ -16,20 +16,34 @@ android:focusable="true" android:orientation="vertical" android:clickable="true" - tools:background="@drawable/bg_bottom_menu_dark"> + tools:ignore="UselessParent"> - + android:layout_height="wrap_content"> + + + + + + + android:layout_height="match_parent" + android:background="?attr/list_background_color"> - - - - - - - - - - - - - - - - - - - + android:focusable="true" + tools:ignore="UselessParent"> - + android:layout_height="0dp" + android:background="@drawable/bg_contextmenu_shadow_top_light" /> + + - - - - + android:layout_height="wrap_content" + android:background="?attr/list_background_color" + android:orientation="vertical"> - + - + + + + + + + + - + android:textColor="?android:textColorSecondary" + android:textSize="@dimen/default_desc_text_size" + tools:text=" – 700 m" /> - + - + + + android:id="@+id/info_type_buttons_container" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + layout="@layout/custom_radio_buttons" + android:layout_width="match_parent" + android:layout_height="@dimen/measurement_tool_button_height" + android:layout_marginStart="@dimen/content_padding" + android:layout_marginEnd="@dimen/content_padding" + android:layout_marginBottom="@dimen/measurement_tool_content_padding_medium" /> - - - - - - - - - - - - + + android:id="@+id/bottom_panel_divider" + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="?attr/dashboard_divider" /> - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index 49815c05dd..4ae798967b 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -261,7 +261,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route @Override public void hideProgressBar() { - ((ProgressBar) mainView.findViewById(R.id.snap_to_road_progress_bar)).setVisibility(View.GONE); + ((ProgressBar) mainView.findViewById(R.id.snap_to_road_progress_bar)).setVisibility(View.INVISIBLE); progressBarVisible = false; updateInfoView(); updateCardContainerSize(); @@ -287,7 +287,6 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route .inflate(R.layout.fragment_measurement_tool, container, false); mainView = view.findViewById(R.id.main_view); - AndroidUtils.setBackground(mapActivity, mainView, nightMode, R.drawable.bg_bottom_menu_light, R.drawable.bg_bottom_menu_dark); detailsMenu = new GraphDetailsMenu(); if (portrait) { cardsContainer = mainView.findViewById(R.id.cards_container); @@ -1390,7 +1389,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route editingCtx.cancelSnapToRoad(); MapActivity mapActivity = getMapActivity(); if (mapActivity != null) { - mainView.findViewById(R.id.snap_to_road_progress_bar).setVisibility(View.GONE); + mainView.findViewById(R.id.snap_to_road_progress_bar).setVisibility(View.INVISIBLE); mapActivity.refreshMap(); } }