diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/LanesWidget.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/LanesWidget.java index ddefb1ef140..f024842a1f5 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/LanesWidget.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/LanesWidget.java @@ -173,12 +173,9 @@ public void updateColors(@NonNull TextState textState) { } @Override - public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel widgetsPanel, - @NonNull List followingWidgets) { + public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel panel, @NonNull List followingWidgets) { ViewGroup specialContainer = getSpecialContainer(); - specialContainer.removeAllViews(); - - specialPosition = followingWidgets.isEmpty(); + specialPosition = panel == WidgetsPanel.TOP && followingWidgets.isEmpty(); if (specialPosition) { specialContainer.removeAllViews(); specialContainer.addView(view); diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/MapWidget.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/MapWidget.java index b8581877894..b41be67c4b8 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/MapWidget.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/MapWidget.java @@ -82,8 +82,7 @@ public void copySettings(@NonNull ApplicationMode appMode, @Nullable String cust public void copySettingsFromMode(@NonNull ApplicationMode sourceAppMode, @NonNull ApplicationMode appMode, @Nullable String customId) { } - public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel widgetsPanel, - @NonNull List followingWidgets) { + public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel panel, @NonNull List followingWidgets) { container.addView(view); } diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/StreetNameWidget.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/StreetNameWidget.java index c4a184c7c2f..8225d95d162 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/StreetNameWidget.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/widgets/StreetNameWidget.java @@ -370,10 +370,9 @@ protected boolean updateVisibility(boolean visible) { } @Override - public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel widgetsPanel, - @NonNull List followingWidgets) { + public void attachView(@NonNull ViewGroup container, @NonNull WidgetsPanel panel, @NonNull List followingWidgets) { ViewGroup specialContainer = getSpecialContainer(); - boolean useSpecialPosition = widgetsPanel == WidgetsPanel.TOP && specialContainer != null; + boolean useSpecialPosition = panel == WidgetsPanel.TOP && specialContainer != null; if (useSpecialPosition) { specialContainer.removeAllViews();