Skip to content

Commit e78c8eb

Browse files
authoredOct 3, 2021
Merge pull request osmandapp#12909 from osmandapp/wrong_visibility
Fix empty space in plan route
2 parents 9f0fbe4 + a0097e0 commit e78c8eb

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed
 

‎OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java

+12-17
Original file line numberDiff line numberDiff line change
@@ -1927,23 +1927,18 @@ private void enterMeasurementMode() {
19271927

19281928
private OnGlobalLayoutListener getWidgetsLayoutListener() {
19291929
if (widgetsLayoutListener == null) {
1930-
widgetsLayoutListener = new OnGlobalLayoutListener() {
1931-
@Override
1932-
public void onGlobalLayout() {
1933-
MapActivity mapActivity = getMapActivity();
1934-
if (mapActivity != null) {
1935-
int visibility = portrait ? View.INVISIBLE : View.GONE;
1936-
View rightWidgetsPanel = mapActivity.findViewById(R.id.map_right_widgets_panel);
1937-
if (rightWidgetsPanel.getVisibility() != visibility) {
1938-
AndroidUiHelper.setVisibility(mapActivity, visibility,
1939-
R.id.map_left_widgets_panel,
1940-
R.id.map_right_widgets_panel,
1941-
R.id.map_center_info);
1942-
AndroidUiHelper.setVisibility(mapActivity, View.GONE,
1943-
R.id.map_route_info_button,
1944-
R.id.map_menu_button,
1945-
R.id.map_quick_actions_button);
1946-
}
1930+
widgetsLayoutListener = () -> {
1931+
MapActivity mapActivity = getMapActivity();
1932+
if (mapActivity != null) {
1933+
View rightWidgetsPanel = mapActivity.findViewById(R.id.map_right_widgets_panel);
1934+
if (rightWidgetsPanel.getVisibility() != View.GONE) {
1935+
AndroidUiHelper.setVisibility(mapActivity, View.GONE,
1936+
R.id.map_left_widgets_panel,
1937+
R.id.map_right_widgets_panel,
1938+
R.id.map_center_info,
1939+
R.id.map_route_info_button,
1940+
R.id.map_menu_button,
1941+
R.id.map_quick_actions_button);;
19471942
}
19481943
}
19491944
};

0 commit comments

Comments
 (0)