Search in sources :

Example 1 with OtherSettingsRoutingParameter

use of net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.OtherSettingsRoutingParameter in project Osmand by osmandapp.

the class RouteOptionsBottomSheet method createMenuItems.

@Override
public void createMenuItems(Bundle savedInstanceState) {
    items.add(new TitleItem(app.getString(R.string.shared_string_settings), ColorUtilities.getActiveColorId(nightMode)));
    OsmAndAppCustomization customization = app.getAppCustomization();
    List<LocalRoutingParameter> list = getRoutingParameters(applicationMode);
    for (final LocalRoutingParameter optionsItem : list) {
        if (!dialogMode.isAvailableParameter(optionsItem) || !customization.isFeatureEnabled(optionsItem.getKey())) {
            continue;
        }
        if (optionsItem instanceof DividerItem) {
            if (isDividerRequired()) {
                items.add(new DividerStartItem(app));
            }
        } else if (optionsItem instanceof MuteSoundRoutingParameter) {
            items.add(createMuteSoundItem(optionsItem));
        } else if (optionsItem instanceof ShowAlongTheRouteItem) {
            items.add(createShowAlongTheRouteItem(optionsItem));
        } else if (optionsItem instanceof RouteSimulationItem) {
            items.add(createRouteSimulationItem(optionsItem));
        } else if (optionsItem instanceof AvoidPTTypesRoutingParameter) {
            items.add(createAvoidPTTypesItem(optionsItem));
        } else if (optionsItem instanceof AvoidRoadsRoutingParameter) {
            items.add(createAvoidRoadsItem(optionsItem));
        } else if (optionsItem instanceof GpxLocalRoutingParameter) {
            items.add(createGpxRoutingItem(optionsItem));
        } else if (optionsItem instanceof TimeConditionalRoutingItem) {
            items.add(createTimeConditionalRoutingItem(optionsItem));
        } else if (optionsItem instanceof OtherSettingsRoutingParameter) {
            items.add(createOtherSettingsRoutingItem(optionsItem));
        } else if (optionsItem instanceof CustomizeRouteLineRoutingParameter) {
            items.add(createCustomizeRouteLineRoutingItem(optionsItem));
        } else if (USE_HEIGHT_OBSTACLES.equals(optionsItem.getKey()) && hasReliefParameters()) {
            items.add(inflateElevationParameter(optionsItem));
        } else {
            inflateRoutingParameter(optionsItem);
        }
    }
}
Also used : OtherSettingsRoutingParameter(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.OtherSettingsRoutingParameter) MuteSoundRoutingParameter(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.MuteSoundRoutingParameter) AvoidPTTypesRoutingParameter(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.AvoidPTTypesRoutingParameter) TimeConditionalRoutingItem(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.TimeConditionalRoutingItem) RouteSimulationItem(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.RouteSimulationItem) TitleItem(net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem) GpxLocalRoutingParameter(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.GpxLocalRoutingParameter) LocalRoutingParameter(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.LocalRoutingParameter) AvoidRoadsRoutingParameter(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.AvoidRoadsRoutingParameter) GpxLocalRoutingParameter(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.GpxLocalRoutingParameter) DividerStartItem(net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerStartItem) CustomizeRouteLineRoutingParameter(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.CustomizeRouteLineRoutingParameter) OsmAndAppCustomization(net.osmand.plus.settings.backend.OsmAndAppCustomization) ShowAlongTheRouteItem(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.ShowAlongTheRouteItem) DividerItem(net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.DividerItem)

Aggregations

DividerStartItem (net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerStartItem)1 TitleItem (net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem)1 AvoidPTTypesRoutingParameter (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.AvoidPTTypesRoutingParameter)1 AvoidRoadsRoutingParameter (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.AvoidRoadsRoutingParameter)1 CustomizeRouteLineRoutingParameter (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.CustomizeRouteLineRoutingParameter)1 DividerItem (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.DividerItem)1 GpxLocalRoutingParameter (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.GpxLocalRoutingParameter)1 LocalRoutingParameter (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.LocalRoutingParameter)1 MuteSoundRoutingParameter (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.MuteSoundRoutingParameter)1 OtherSettingsRoutingParameter (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.OtherSettingsRoutingParameter)1 RouteSimulationItem (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.RouteSimulationItem)1 ShowAlongTheRouteItem (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.ShowAlongTheRouteItem)1 TimeConditionalRoutingItem (net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.TimeConditionalRoutingItem)1 OsmAndAppCustomization (net.osmand.plus.settings.backend.OsmAndAppCustomization)1