Add ids
This commit is contained in:
parent
4fc9ccff64
commit
a468877245
3 changed files with 9 additions and 2 deletions
|
@ -2,8 +2,6 @@ package net.osmand.plus;
|
|||
|
||||
public interface OsmAndCustomizationConstants {
|
||||
|
||||
// TODO: add ids for category items
|
||||
|
||||
// Navigation Drawer:
|
||||
|
||||
String DRAWER_ITEM_ID_SCHEME = "drawer.action.";
|
||||
|
@ -21,6 +19,7 @@ public interface OsmAndCustomizationConstants {
|
|||
String DRAWER_PLUGINS_ID = DRAWER_ITEM_ID_SCHEME + "plugins";
|
||||
String DRAWER_SETTINGS_ID = DRAWER_ITEM_ID_SCHEME + "settings";
|
||||
String DRAWER_HELP_ID = DRAWER_ITEM_ID_SCHEME + "help";
|
||||
String DRAWER_DIVIDER_ID = DRAWER_ITEM_ID_SCHEME + "divider";
|
||||
|
||||
// Configure Map:
|
||||
|
||||
|
@ -31,6 +30,7 @@ public interface OsmAndCustomizationConstants {
|
|||
|
||||
String APP_PROFILES_ID = ITEM_ID_SCHEME + "app_profiles";
|
||||
|
||||
String SHOW_CATEGORY_ID = SHOW_ITEMS_ID_SCHEME + "category";
|
||||
String FAVORITES_ID = SHOW_ITEMS_ID_SCHEME + "favorites";
|
||||
String POI_OVERLAY_ID = SHOW_ITEMS_ID_SCHEME + "poi_overlay";
|
||||
String POI_OVERLAY_LABELS_ID = SHOW_ITEMS_ID_SCHEME + "poi_overlay_labels";
|
||||
|
@ -39,6 +39,7 @@ public interface OsmAndCustomizationConstants {
|
|||
String MAP_MARKERS_ID = SHOW_ITEMS_ID_SCHEME + "map_markers";
|
||||
String MAP_SOURCE_ID = SHOW_ITEMS_ID_SCHEME + "map_source";
|
||||
|
||||
String MAP_RENDERING_CATEGORY_ID = RENDERING_ITEMS_ID_SCHEME + "category";
|
||||
String MAP_STYLE_ID = RENDERING_ITEMS_ID_SCHEME + "map_style";
|
||||
String MAP_MODE_ID = RENDERING_ITEMS_ID_SCHEME + "map_mode";
|
||||
String MAP_MAGNIFIER_ID = RENDERING_ITEMS_ID_SCHEME + "map_marnifier";
|
||||
|
|
|
@ -83,6 +83,7 @@ import static net.osmand.plus.OsmAndCustomizationConstants.DRAWER_CONFIGURE_MAP_
|
|||
import static net.osmand.plus.OsmAndCustomizationConstants.DRAWER_CONFIGURE_SCREEN_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.DRAWER_DASHBOARD_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.DRAWER_DIRECTIONS_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.DRAWER_DIVIDER_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.DRAWER_DOWNLOAD_MAPS_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.DRAWER_HELP_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.DRAWER_MAP_MARKERS_ID;
|
||||
|
@ -918,6 +919,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
}
|
||||
|
||||
ItemBuilder divider = new ItemBuilder().setLayout(R.layout.drawer_divider);
|
||||
divider.setId(DRAWER_DIVIDER_ID);
|
||||
divider.setPosition(dividerItemIndex >= 0 ? dividerItemIndex : 8);
|
||||
optionsMenuHelper.addItem(divider.createItem());
|
||||
|
||||
|
|
|
@ -78,12 +78,14 @@ import static net.osmand.plus.OsmAndCustomizationConstants.MAP_LANGUAGE_ID;
|
|||
import static net.osmand.plus.OsmAndCustomizationConstants.MAP_MAGNIFIER_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.MAP_MARKERS_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.MAP_MODE_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.MAP_RENDERING_CATEGORY_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.MAP_SOURCE_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.MAP_STYLE_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.POI_OVERLAY_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.POI_OVERLAY_LABELS_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.ROAD_STYLE_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.ROUTES_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.SHOW_CATEGORY_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.TEXT_SIZE_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.TRANSPORT_ID;
|
||||
import static net.osmand.plus.OsmAndCustomizationConstants.TRANSPORT_RENDERING_ID;
|
||||
|
@ -272,6 +274,7 @@ public class ConfigureMapMenu {
|
|||
final OsmandSettings settings = app.getSettings();
|
||||
LayerMenuListener l = new LayerMenuListener(activity, adapter);
|
||||
adapter.addItem(new ContextMenuItem.ItemBuilder()
|
||||
.setId(SHOW_CATEGORY_ID)
|
||||
.setTitleId(R.string.shared_string_show, activity)
|
||||
.setCategory(true).setLayout(R.layout.list_group_title_with_switch).createItem());
|
||||
// String appMode = " [" + settings.getApplicationMode().toHumanString(view.getApplication()) +"] ";
|
||||
|
@ -529,6 +532,7 @@ public class ConfigureMapMenu {
|
|||
private void createRenderingAttributeItems(List<RenderingRuleProperty> customRules,
|
||||
final ContextMenuAdapter adapter, final MapActivity activity) {
|
||||
adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.map_widget_map_rendering, activity)
|
||||
.setId(MAP_RENDERING_CATEGORY_ID)
|
||||
.setCategory(true).setLayout(R.layout.list_group_title_with_switch).createItem());
|
||||
adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.map_widget_renderer, activity)
|
||||
.setId(MAP_STYLE_ID)
|
||||
|
|
Loading…
Reference in a new issue