Search in sources :

Example 1 with OsmandDevelopmentPlugin

use of net.osmand.plus.plugins.development.OsmandDevelopmentPlugin in project Osmand by osmandapp.

the class DashPluginsFragment method addPluginsToLimit.

private void addPluginsToLimit(Iterator<OsmandPlugin> it, int l) {
    while (plugins.size() < l && it.hasNext()) {
        OsmandPlugin plugin = it.next();
        if (plugin instanceof OsmandDevelopmentPlugin) {
            continue;
        }
        plugins.add(plugin);
    }
}
Also used : OsmandDevelopmentPlugin(net.osmand.plus.plugins.development.OsmandDevelopmentPlugin) OsmandPlugin(net.osmand.plus.plugins.OsmandPlugin)

Example 2 with OsmandDevelopmentPlugin

use of net.osmand.plus.plugins.development.OsmandDevelopmentPlugin in project Osmand by osmandapp.

the class ConfigureProfileFragment method setupResetToDefaultPref.

private void setupResetToDefaultPref() {
    Preference resetToDefault = findPreference(RESET_TO_DEFAULT);
    ApplicationMode mode = getSelectedAppMode();
    if (mode.isCustomProfile() && !getBackupFileForCustomMode(app, mode.getStringKey()).exists()) {
        resetToDefault.setVisible(false);
    } else {
        OsmandDevelopmentPlugin plugin = OsmandPlugin.getActivePlugin(OsmandDevelopmentPlugin.class);
        if (plugin != null && mode.getParent() != null) {
            String baseProfile = "(" + mode.getParent().toHumanString() + ")";
            String title = getString(R.string.ltr_or_rtl_combine_via_space, getString(R.string.reset_to_default), baseProfile);
            resetToDefault.setTitle(title);
        }
        resetToDefault.setIcon(app.getUIUtilities().getIcon(R.drawable.ic_action_reset_to_default_dark, ColorUtilities.getActiveColorId(isNightMode())));
    }
}
Also used : Preference(androidx.preference.Preference) OsmandDevelopmentPlugin(net.osmand.plus.plugins.development.OsmandDevelopmentPlugin) ApplicationMode(net.osmand.plus.settings.backend.ApplicationMode)

Example 3 with OsmandDevelopmentPlugin

use of net.osmand.plus.plugins.development.OsmandDevelopmentPlugin in project Osmand by osmandapp.

the class OsmandPlugin method initPlugins.

public static void initPlugins(@NonNull OsmandApplication app) {
    Set<String> enabledPlugins = app.getSettings().getEnabledPlugins();
    allPlugins.clear();
    allPlugins.add(new WikipediaPlugin(app));
    allPlugins.add(new OsmandRasterMapsPlugin(app));
    allPlugins.add(new OsmandMonitoringPlugin(app));
    checkMarketPlugin(app, new SRTMPlugin(app));
    checkMarketPlugin(app, new NauticalMapsPlugin(app));
    checkMarketPlugin(app, new SkiMapsPlugin(app));
    allPlugins.add(new AudioVideoNotesPlugin(app));
    checkMarketPlugin(app, new ParkingPositionPlugin(app));
    allPlugins.add(new OsmEditingPlugin(app));
    allPlugins.add(new OpenPlaceReviewsPlugin(app));
    allPlugins.add(new MapillaryPlugin(app));
    allPlugins.add(new AccessibilityPlugin(app));
    allPlugins.add(new OsmandDevelopmentPlugin(app));
    loadCustomPlugins(app);
    registerAppInitializingDependedProperties(app);
    enablePluginsByDefault(app, enabledPlugins);
    activatePlugins(app, enabledPlugins);
}
Also used : SRTMPlugin(net.osmand.plus.plugins.srtm.SRTMPlugin) AudioVideoNotesPlugin(net.osmand.plus.plugins.audionotes.AudioVideoNotesPlugin) OpenPlaceReviewsPlugin(net.osmand.plus.plugins.openplacereviews.OpenPlaceReviewsPlugin) OsmandMonitoringPlugin(net.osmand.plus.plugins.monitoring.OsmandMonitoringPlugin) OsmEditingPlugin(net.osmand.plus.plugins.osmedit.OsmEditingPlugin) MapillaryPlugin(net.osmand.plus.plugins.mapillary.MapillaryPlugin) SkiMapsPlugin(net.osmand.plus.plugins.skimaps.SkiMapsPlugin) ParkingPositionPlugin(net.osmand.plus.plugins.parking.ParkingPositionPlugin) OsmandDevelopmentPlugin(net.osmand.plus.plugins.development.OsmandDevelopmentPlugin) NauticalMapsPlugin(net.osmand.plus.plugins.openseamaps.NauticalMapsPlugin) WikipediaPlugin(net.osmand.plus.wikipedia.WikipediaPlugin) AccessibilityPlugin(net.osmand.plus.plugins.accessibility.AccessibilityPlugin) OsmandRasterMapsPlugin(net.osmand.plus.plugins.rastermaps.OsmandRasterMapsPlugin)

Aggregations

OsmandDevelopmentPlugin (net.osmand.plus.plugins.development.OsmandDevelopmentPlugin)3 Preference (androidx.preference.Preference)1 OsmandPlugin (net.osmand.plus.plugins.OsmandPlugin)1 AccessibilityPlugin (net.osmand.plus.plugins.accessibility.AccessibilityPlugin)1 AudioVideoNotesPlugin (net.osmand.plus.plugins.audionotes.AudioVideoNotesPlugin)1 MapillaryPlugin (net.osmand.plus.plugins.mapillary.MapillaryPlugin)1 OsmandMonitoringPlugin (net.osmand.plus.plugins.monitoring.OsmandMonitoringPlugin)1 OpenPlaceReviewsPlugin (net.osmand.plus.plugins.openplacereviews.OpenPlaceReviewsPlugin)1 NauticalMapsPlugin (net.osmand.plus.plugins.openseamaps.NauticalMapsPlugin)1 OsmEditingPlugin (net.osmand.plus.plugins.osmedit.OsmEditingPlugin)1 ParkingPositionPlugin (net.osmand.plus.plugins.parking.ParkingPositionPlugin)1 OsmandRasterMapsPlugin (net.osmand.plus.plugins.rastermaps.OsmandRasterMapsPlugin)1 SkiMapsPlugin (net.osmand.plus.plugins.skimaps.SkiMapsPlugin)1 SRTMPlugin (net.osmand.plus.plugins.srtm.SRTMPlugin)1 ApplicationMode (net.osmand.plus.settings.backend.ApplicationMode)1 WikipediaPlugin (net.osmand.plus.wikipedia.WikipediaPlugin)1