From 96456cb5c4d5f7916ac7174d261e876ca087ab79 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Wed, 20 May 2020 12:14:25 +0300 Subject: [PATCH] not count show and render headers --- .../settings/fragments/ConfigureMenuRootFragment.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureMenuRootFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureMenuRootFragment.java index c30afeba9c..860cded20b 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureMenuRootFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureMenuRootFragment.java @@ -51,6 +51,8 @@ import java.util.Iterator; import java.util.List; import static net.osmand.aidlapi.OsmAndCustomizationConstants.DRAWER_DIVIDER_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_RENDERING_CATEGORY_ID; +import static net.osmand.aidlapi.OsmAndCustomizationConstants.SHOW_CATEGORY_ID; public class ConfigureMenuRootFragment extends BaseOsmAndFragment { @@ -291,10 +293,13 @@ public class ConfigureMenuRootFragment extends BaseOsmAndFragment { } int hiddenCount = ConfigureMenuItemsFragment.getSettingForScreen(app, type).getModeValue(appMode).getHiddenIds().size(); List allItems = ConfigureMenuItemsFragment.getCustomizableDefaultItems(contextMenuAdapter.getDefaultItems()); - if (type == ScreenType.DRAWER) { + if (type == ScreenType.DRAWER || type == ScreenType.CONFIGURE_MAP) { Iterator iterator = allItems.iterator(); while (iterator.hasNext()) { - if (DRAWER_DIVIDER_ID.equals(iterator.next().getId())) { + String id = iterator.next().getId(); + if (DRAWER_DIVIDER_ID.equals(id) + || SHOW_CATEGORY_ID.equals(id) + || MAP_RENDERING_CATEGORY_ID.equals(id)) { iterator.remove(); } }