Merge pull request #11475 from osmandapp/fix_jumping_map_controls
Fix jumping map controls
This commit is contained in:
commit
cc70fcede4
3 changed files with 303 additions and 269 deletions
|
@ -16,7 +16,16 @@
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
tools:background="@drawable/bg_bottom_menu_dark">
|
tools:ignore="UselessParent">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@drawable/bg_contextmenu_shadow_top_light" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/snap_to_road_progress_bar"
|
android:id="@+id/snap_to_road_progress_bar"
|
||||||
|
@ -24,12 +33,17 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minHeight="0dp"
|
android:minHeight="0dp"
|
||||||
android:visibility="gone"
|
android:background="?attr/list_background_color"
|
||||||
|
android:visibility="invisible"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/main_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="?attr/list_background_color">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/up_down_row"
|
android:id="@+id/up_down_row"
|
||||||
|
|
|
@ -13,10 +13,19 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:background="@drawable/bg_bottom_menu_dark"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true">
|
android:focusable="true"
|
||||||
|
tools:ignore="UselessParent">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@drawable/bg_contextmenu_shadow_top_light" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/snap_to_road_progress_bar"
|
android:id="@+id/snap_to_road_progress_bar"
|
||||||
|
@ -24,9 +33,19 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minHeight="0dp"
|
android:minHeight="0dp"
|
||||||
android:visibility="gone"
|
android:background="?attr/list_background_color"
|
||||||
|
android:visibility="invisible"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/main_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/list_background_color"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/up_down_row"
|
android:id="@+id/up_down_row"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -305,4 +324,6 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
|
@ -261,7 +261,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void hideProgressBar() {
|
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;
|
progressBarVisible = false;
|
||||||
updateInfoView();
|
updateInfoView();
|
||||||
updateCardContainerSize();
|
updateCardContainerSize();
|
||||||
|
@ -287,7 +287,6 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
|
||||||
.inflate(R.layout.fragment_measurement_tool, container, false);
|
.inflate(R.layout.fragment_measurement_tool, container, false);
|
||||||
|
|
||||||
mainView = view.findViewById(R.id.main_view);
|
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();
|
detailsMenu = new GraphDetailsMenu();
|
||||||
if (portrait) {
|
if (portrait) {
|
||||||
cardsContainer = mainView.findViewById(R.id.cards_container);
|
cardsContainer = mainView.findViewById(R.id.cards_container);
|
||||||
|
@ -1390,7 +1389,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
|
||||||
editingCtx.cancelSnapToRoad();
|
editingCtx.cancelSnapToRoad();
|
||||||
MapActivity mapActivity = getMapActivity();
|
MapActivity mapActivity = getMapActivity();
|
||||||
if (mapActivity != null) {
|
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();
|
mapActivity.refreshMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue