Search in sources :

Example 96 with OsmandSettings

use of net.osmand.plus.settings.backend.OsmandSettings in project Osmand by osmandapp.

the class AppVersionUpgradeOnInit method migratePreferences.

public void migratePreferences() {
    OsmandSettings settings = app.getSettings();
    migrateEnumPreferences();
    SharedPreferences globalSharedPreferences = (SharedPreferences) settings.getGlobalPreferences();
    Map<String, ?> globalPrefsMap = globalSharedPreferences.getAll();
    for (Map.Entry<String, ?> entry : globalPrefsMap.entrySet()) {
        String key = entry.getKey();
        OsmandPreference<?> pref = settings.getPreference(key);
        if (pref instanceof CommonPreference) {
            CommonPreference<?> commonPreference = (CommonPreference<?>) pref;
            if (!commonPreference.isGlobal()) {
                for (ApplicationMode mode : ApplicationMode.allPossibleValues()) {
                    if (!commonPreference.isSetForMode(mode) && !commonPreference.hasDefaultValueForMode(mode)) {
                        settings.setPreference(key, entry.getValue(), mode);
                    }
                }
            }
        }
    }
    SharedPreferences defaultProfilePreferences = (SharedPreferences) settings.getProfilePreferences(ApplicationMode.DEFAULT);
    Map<String, ?> defaultPrefsMap = defaultProfilePreferences.getAll();
    for (Map.Entry<String, ?> entry : defaultPrefsMap.entrySet()) {
        String key = entry.getKey();
        OsmandPreference<?> pref = settings.getPreference(key);
        if (pref instanceof CommonPreference) {
            CommonPreference<?> commonPreference = (CommonPreference<?>) pref;
            if (commonPreference.isGlobal() && !commonPreference.isSet()) {
                settings.setPreference(key, entry.getValue());
            }
        }
    }
    for (OsmandPreference<?> pref : getGeneralPrefs()) {
        if (pref instanceof CommonPreference) {
            CommonPreference<?> commonPref = (CommonPreference<?>) pref;
            Object defaultVal = commonPref.getModeValue(ApplicationMode.DEFAULT);
            for (ApplicationMode mode : ApplicationMode.allPossibleValues()) {
                if (!commonPref.isSetForMode(mode) && !commonPref.hasDefaultValueForMode(mode)) {
                    settings.setPreference(commonPref.getId(), defaultVal, mode);
                }
            }
        }
    }
    String json = settings.getSettingsAPI().getString(settings.getGlobalPreferences(), "custom_app_profiles", "");
    if (!Algorithms.isEmpty(json)) {
        Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
        Type t = new TypeToken<ArrayList<ApplicationMode.ApplicationModeBean>>() {
        }.getType();
        List<ApplicationMode.ApplicationModeBean> customProfiles = gson.fromJson(json, t);
        if (!Algorithms.isEmpty(customProfiles)) {
            for (ApplicationMode.ApplicationModeBean modeBean : customProfiles) {
                ApplicationMode.ApplicationModeBuilder builder = ApplicationMode.fromModeBean(app, modeBean);
                ApplicationMode.saveProfile(builder, app);
            }
        }
    }
}
Also used : CommonPreference(net.osmand.plus.settings.backend.preferences.CommonPreference) SharedPreferences(android.content.SharedPreferences) GsonBuilder(com.google.gson.GsonBuilder) ArrayList(java.util.ArrayList) Gson(com.google.gson.Gson) ApplicationMode(net.osmand.plus.settings.backend.ApplicationMode) OsmandSettings(net.osmand.plus.settings.backend.OsmandSettings) SpecialPointType(net.osmand.data.FavouritePoint.SpecialPointType) Type(java.lang.reflect.Type) HashMap(java.util.HashMap) Map(java.util.Map)

Example 97 with OsmandSettings

use of net.osmand.plus.settings.backend.OsmandSettings in project Osmand by osmandapp.

the class AppVersionUpgradeOnInit method upgradeVersion.

@SuppressLint("ApplySharedPref")
void upgradeVersion(SharedPreferences startPrefs, int lastVersion) {
    if (!startPrefs.contains(NUMBER_OF_STARTS)) {
        startPrefs.edit().putInt(NUMBER_OF_STARTS, 1).commit();
    } else {
        startPrefs.edit().putInt(NUMBER_OF_STARTS, startPrefs.getInt(NUMBER_OF_STARTS, 0) + 1).commit();
    }
    if (!startPrefs.contains(FIRST_INSTALLED)) {
        startPrefs.edit().putLong(FIRST_INSTALLED, System.currentTimeMillis()).commit();
    }
    if (!startPrefs.contains(FIRST_TIME_APP_RUN)) {
        firstTime = true;
        startPrefs.edit().putBoolean(FIRST_TIME_APP_RUN, true).commit();
        startPrefs.edit().putString(VERSION_INSTALLED, Version.getFullVersion(app)).commit();
        startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, lastVersion).commit();
    } else {
        prevAppVersion = startPrefs.getInt(VERSION_INSTALLED_NUMBER, 0);
        if (needsUpgrade(startPrefs, lastVersion)) {
            OsmandSettings settings = app.getSettings();
            if (prevAppVersion < VERSION_2_2) {
                settings.SHOW_DASHBOARD_ON_START.set(true);
                settings.SHOW_DASHBOARD_ON_MAP_SCREEN.set(true);
                settings.SHOW_CARD_TO_CHOOSE_DRAWER.set(true);
            }
            if (prevAppVersion < VERSION_3_2) {
                settings.BILLING_PURCHASE_TOKENS_SENT.set("");
            }
            if (prevAppVersion < VERSION_3_5 || Version.getAppVersion(app).equals("3.5.3") || Version.getAppVersion(app).equals("3.5.4")) {
                migratePreferences();
                app.getAppInitializer().addListener(new AppInitializeListener() {

                    @Override
                    public void onStart(AppInitializer init) {
                    }

                    @Override
                    public void onProgress(AppInitializer init, InitEvents event) {
                        if (event.equals(InitEvents.FAVORITES_INITIALIZED)) {
                            migrateHomeWorkParkingToFavorites();
                        }
                    }

                    @Override
                    public void onFinish(AppInitializer init) {
                    }
                });
            }
            if (prevAppVersion < VERSION_3_6) {
                migratePreferences();
            }
            if (prevAppVersion < VERSION_3_7) {
                migrateEnumPreferences();
            }
            if (prevAppVersion < VERSION_3_7_01) {
                app.getAppInitializer().addListener(new AppInitializeListener() {

                    @Override
                    public void onStart(AppInitializer init) {
                    }

                    @Override
                    public void onProgress(AppInitializer init, InitEvents event) {
                        if (event.equals(InitEvents.FAVORITES_INITIALIZED)) {
                            app.getFavoritesHelper().fixBlackBackground();
                        }
                    }

                    @Override
                    public void onFinish(AppInitializer init) {
                    }
                });
            }
            if (prevAppVersion < VERSION_3_8_00) {
                migrateQuickActionStates();
            }
            if (prevAppVersion < VERSION_4_0_00) {
                app.getAppInitializer().addListener(new AppInitializeListener() {

                    @Override
                    public void onStart(AppInitializer init) {
                        new MarkersDb39HelperLegacy(app).migrateMarkersGroups();
                    }

                    @Override
                    public void onProgress(AppInitializer init, InitEvents event) {
                    }

                    @Override
                    public void onFinish(AppInitializer init) {
                    }
                });
            }
            startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, lastVersion).commit();
            startPrefs.edit().putString(VERSION_INSTALLED, Version.getFullVersion(app)).commit();
            appVersionChanged = true;
        }
    }
}
Also used : AppInitializeListener(net.osmand.plus.AppInitializer.AppInitializeListener) InitEvents(net.osmand.plus.AppInitializer.InitEvents) OsmandSettings(net.osmand.plus.settings.backend.OsmandSettings) MarkersDb39HelperLegacy(net.osmand.plus.mapmarkers.MarkersDb39HelperLegacy) SuppressLint(android.annotation.SuppressLint)

Example 98 with OsmandSettings

use of net.osmand.plus.settings.backend.OsmandSettings in project Osmand by osmandapp.

the class AppInitializer method initNativeCore.

private void initNativeCore() {
    if (!"qnx".equals(System.getProperty("os.name"))) {
        OsmandSettings osmandSettings = app.getSettings();
        if (osmandSettings.NATIVE_RENDERING_FAILED.get()) {
            osmandSettings.SAFE_MODE.set(true);
            osmandSettings.NATIVE_RENDERING_FAILED.set(false);
            warnings.add(app.getString(R.string.native_library_not_supported));
        } else {
            osmandSettings.SAFE_MODE.set(false);
            osmandSettings.NATIVE_RENDERING_FAILED.set(true);
            startTask(app.getString(R.string.init_native_library), -1);
            RenderingRulesStorage storage = app.getRendererRegistry().getCurrentSelectedRenderer();
            NativeOsmandLibrary lib = NativeOsmandLibrary.getLibrary(storage, app);
            boolean initialized = lib != null;
            osmandSettings.NATIVE_RENDERING_FAILED.set(false);
            if (!initialized) {
                LOG.info("Native library could not be loaded!");
            } else {
                File ls = app.getAppPath("fonts");
                lib.loadFontData(ls);
            }
        }
        app.getResourceManager().initMapBoundariesCacheNative();
    }
}
Also used : NativeOsmandLibrary(net.osmand.plus.render.NativeOsmandLibrary) File(java.io.File) OsmandSettings(net.osmand.plus.settings.backend.OsmandSettings) RenderingRulesStorage(net.osmand.render.RenderingRulesStorage)

Example 99 with OsmandSettings

use of net.osmand.plus.settings.backend.OsmandSettings in project Osmand by osmandapp.

the class ConfigureMapMenu method createLayersItems.

private void createLayersItems(@NonNull List<RenderingRuleProperty> customRules, @NonNull ContextMenuAdapter adapter, @NonNull MapActivity activity, boolean nightMode) {
    OsmandApplication app = activity.getMyApplication();
    OsmandSettings settings = app.getSettings();
    int selectedProfileColor = settings.getApplicationMode().getProfileColor(nightMode);
    MapLayerMenuListener listener = new MapLayerMenuListener(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());
    boolean selected = settings.SHOW_FAVORITES.get();
    adapter.addItem(new ContextMenuItem.ItemBuilder().setId(FAVORITES_ID).setTitleId(R.string.shared_string_favorites, activity).setSelected(settings.SHOW_FAVORITES.get()).setColor(app, selected ? R.color.osmand_orange : INVALID_ID).setIcon(R.drawable.ic_action_favorite).setItemDeleteAction(makeDeleteAction(settings.SHOW_FAVORITES)).setListener(listener).createItem());
    ResourceManager resourceManager = app.getResourceManager();
    boolean hasPoiData = !Algorithms.isEmpty(resourceManager.getAmenityRepositories()) || !Algorithms.isEmpty(resourceManager.getTravelRepositories());
    if (hasPoiData) {
        PoiUIFilter wiki = app.getPoiFilters().getTopWikiPoiFilter();
        selected = app.getPoiFilters().isShowingAnyPoi(wiki);
        adapter.addItem(new ContextMenuItem.ItemBuilder().setId(POI_OVERLAY_ID).setTitleId(R.string.layer_poi, activity).setSelected(selected).setDescription(app.getPoiFilters().getSelectedPoiFiltersName(wiki)).setColor(app, selected ? R.color.osmand_orange : INVALID_ID).setIcon(R.drawable.ic_action_info_dark).setSecondaryIcon(R.drawable.ic_action_additional_option).setListener(listener).createItem());
    }
    selected = settings.SHOW_POI_LABEL.get();
    adapter.addItem(new ContextMenuItem.ItemBuilder().setId(POI_OVERLAY_LABELS_ID).setTitleId(R.string.layer_amenity_label, activity).setSelected(settings.SHOW_POI_LABEL.get()).setColor(app, selected ? R.color.osmand_orange : INVALID_ID).setIcon(R.drawable.ic_action_text_dark).setItemDeleteAction(makeDeleteAction(settings.SHOW_POI_LABEL)).setListener(listener).createItem());
    selected = TransportLinesMenu.isShowLines(app);
    adapter.addItem(new ContextMenuItem.ItemBuilder().setId(TRANSPORT_ID).setTitleId(R.string.rendering_category_transport, activity).setIcon(R.drawable.ic_action_transport_bus).setSecondaryIcon(R.drawable.ic_action_additional_option).setSelected(selected).setColor(selected ? selectedProfileColor : null).setListener(listener).createItem());
    selected = app.getSelectedGpxHelper().isShowingAnyGpxFiles();
    adapter.addItem(new ContextMenuItem.ItemBuilder().setId(GPX_FILES_ID).setTitleId(R.string.layer_gpx_layer, activity).setSelected(app.getSelectedGpxHelper().isShowingAnyGpxFiles()).setDescription(app.getSelectedGpxHelper().getGpxDescription()).setColor(app, selected ? R.color.osmand_orange : INVALID_ID).setIcon(R.drawable.ic_action_polygom_dark).setSecondaryIcon(R.drawable.ic_action_additional_option).setListener(listener).createItem());
    selected = settings.SHOW_MAP_MARKERS.get();
    adapter.addItem(new ContextMenuItem.ItemBuilder().setId(MAP_MARKERS_ID).setTitleId(R.string.map_markers, activity).setSelected(selected).setColor(app, selected ? R.color.osmand_orange : INVALID_ID).setIcon(R.drawable.ic_action_flag).setItemDeleteAction(makeDeleteAction(settings.SHOW_MAP_MARKERS)).setListener(listener).createItem());
    adapter.addItem(new ContextMenuItem.ItemBuilder().setId(MAP_SOURCE_ID).setTitleId(R.string.layer_map, activity).setIcon(R.drawable.ic_world_globe_dark).setDescription(settings.MAP_ONLINE_DATA.get() ? settings.MAP_TILE_SOURCES.get().replace(IndexConstants.SQLITE_EXT, "") : null).setItemDeleteAction(makeDeleteAction(settings.MAP_ONLINE_DATA, settings.MAP_TILE_SOURCES)).setListener(listener).createItem());
    OsmandPlugin.registerLayerContextMenu(adapter, activity, customRules);
    app.getAidlApi().registerLayerContextMenu(adapter, activity);
}
Also used : ItemBuilder(net.osmand.plus.ContextMenuItem.ItemBuilder) OsmandApplication(net.osmand.plus.OsmandApplication) ContextMenuItem(net.osmand.plus.ContextMenuItem) ResourceManager(net.osmand.plus.resources.ResourceManager) OsmandSettings(net.osmand.plus.settings.backend.OsmandSettings) ItemBuilder(net.osmand.plus.ContextMenuItem.ItemBuilder) PoiUIFilter(net.osmand.plus.poi.PoiUIFilter)

Example 100 with OsmandSettings

use of net.osmand.plus.settings.backend.OsmandSettings in project Osmand by osmandapp.

the class ConfigureMapMenu method createRouteAttributeItems.

private void createRouteAttributeItems(List<RenderingRuleProperty> customRules, ContextMenuAdapter adapter, MapActivity activity, boolean nightMode) {
    OsmandApplication app = activity.getMyApplication();
    OsmandSettings settings = app.getSettings();
    adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.rendering_category_routes, activity).setId(ROUTES_ID).setCategory(true).setLayout(R.layout.list_group_title_with_switch).createItem());
    for (String attrName : getRoutesDefaultAttrs().keySet()) {
        RenderingRuleProperty property = getPropertyForAttr(customRules, attrName);
        if (SHOW_CYCLE_ROUTES_ATTR.equals(attrName)) {
            adapter.addItem(createCycleRoutesItem(activity, attrName, property, nightMode));
            customRules.remove(getPropertyForAttr(customRules, CYCLE_NODE_NETWORK_ROUTES_ATTR));
        } else if (HIKING_ROUTES_OSMC_ATTR.equals(attrName)) {
            adapter.addItem(createHikingRoutesItem(activity, attrName, property, nightMode));
        } else {
            String id = ROUTES_ID + attrName;
            int drawableId = getIconIdForAttr(attrName);
            String name = AndroidUtils.getRenderingStringPropertyName(activity, attrName, property != null ? property.getName() : attrName);
            CommonPreference<Boolean> pref = settings.getCustomRenderBooleanProperty(attrName);
            ContextMenuItem item = createBooleanRenderingProperty(activity, attrName, name, id, property, drawableId, nightMode, result -> {
                if (property == null) {
                    showRendererSnackbarForAttr(activity, attrName, nightMode, pref);
                }
                return false;
            });
            if (item != null) {
                adapter.addItem(item);
            }
        }
        customRules.remove(property);
    }
    ResourceManager manager = app.getResourceManager();
    if (OsmandPlugin.isDevelopment() && (!Algorithms.isEmpty(manager.getTravelMapRepositories()) || !Algorithms.isEmpty(manager.getTravelRepositories()))) {
        adapter.addItem(createTravelRoutesItem(activity, nightMode));
    }
}
Also used : PoiUIFilter(net.osmand.plus.poi.PoiUIFilter) Arrays(java.util.Arrays) A_ENGINE_V1(net.osmand.render.RenderingRuleStorageProperties.A_ENGINE_V1) NonNull(androidx.annotation.NonNull) HIDE_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.HIDE_ID) ItemClickListener(net.osmand.plus.ContextMenuAdapter.ItemClickListener) APP_PROFILES_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.APP_PROFILES_ID) R(net.osmand.plus.R) FAVORITES_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.FAVORITES_ID) INVALID_ID(net.osmand.plus.ContextMenuItem.INVALID_ID) DrawableRes(androidx.annotation.DrawableRes) RenderingRulesStorage(net.osmand.render.RenderingRulesStorage) MAP_RENDERING_CATEGORY_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_RENDERING_CATEGORY_ID) CUSTOM_RENDERING_ITEMS_ID_SCHEME(net.osmand.aidlapi.OsmAndCustomizationConstants.CUSTOM_RENDERING_ITEMS_ID_SCHEME) POI_OVERLAY_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.POI_OVERLAY_ID) ColorInt(androidx.annotation.ColorInt) ContextMenuAdapter.makeDeleteAction(net.osmand.plus.ContextMenuAdapter.makeDeleteAction) UiUtilities(net.osmand.plus.utils.UiUtilities) CallbackWithObject(net.osmand.CallbackWithObject) IndexConstants(net.osmand.IndexConstants) Locale(java.util.Locale) Map(java.util.Map) MAP_LANGUAGE_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_LANGUAGE_ID) View(android.view.View) TRANSPORT_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.TRANSPORT_ID) RENDERING_CATEGORY_OSM_ASSISTANT(net.osmand.plus.plugins.osmedit.OsmEditingPlugin.RENDERING_CATEGORY_OSM_ASSISTANT) DateFormat(java.text.DateFormat) TEXT_SIZE_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.TEXT_SIZE_ID) OsmandSettings(net.osmand.plus.settings.backend.OsmandSettings) OnRowItemClick(net.osmand.plus.ContextMenuAdapter.OnRowItemClick) OsmandApplication(net.osmand.plus.OsmandApplication) StyleRes(androidx.annotation.StyleRes) OsmandPlugin(net.osmand.plus.plugins.OsmandPlugin) DETAILS_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.DETAILS_ID) MAP_SOURCE_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_SOURCE_ID) StringRes(androidx.annotation.StringRes) List(java.util.List) Nullable(androidx.annotation.Nullable) A_APP_MODE(net.osmand.render.RenderingRuleStorageProperties.A_APP_MODE) DashboardType(net.osmand.plus.dashboard.DashboardOnMap.DashboardType) GPX_FILES_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.GPX_FILES_ID) CONTOUR_DENSITY_ATTR(net.osmand.plus.plugins.srtm.SRTMPlugin.CONTOUR_DENSITY_ATTR) ContextMenuAdapter(net.osmand.plus.ContextMenuAdapter) RENDERING_CATEGORY_TRANSPORT(net.osmand.plus.transport.TransportLinesMenu.RENDERING_CATEGORY_TRANSPORT) Snackbar(com.google.android.material.snackbar.Snackbar) ResourceManager(net.osmand.plus.resources.ResourceManager) MAP_MAGNIFIER_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_MAGNIFIER_ID) SunriseSunset(net.osmand.util.SunriseSunset) RendererRegistry(net.osmand.plus.render.RendererRegistry) SHOW_CATEGORY_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.SHOW_CATEGORY_ID) CommonPreference(net.osmand.plus.settings.backend.preferences.CommonPreference) ROAD_STYLE_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.ROAD_STYLE_ID) POI_OVERLAY_LABELS_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.POI_OVERLAY_LABELS_ID) ArrayList(java.util.ArrayList) MAP_MARKERS_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_MARKERS_ID) RenderingRuleProperty(net.osmand.render.RenderingRuleProperty) LinkedHashMap(java.util.LinkedHashMap) CONTOUR_WIDTH_ATTR(net.osmand.plus.plugins.srtm.SRTMPlugin.CONTOUR_WIDTH_ATTR) A_BASE_APP_MODE(net.osmand.render.RenderingRuleStorageProperties.A_BASE_APP_MODE) PlatformUtil(net.osmand.PlatformUtil) Algorithms(net.osmand.util.Algorithms) TransportLinesMenu(net.osmand.plus.transport.TransportLinesMenu) UI_CATEGORY_HIDE(net.osmand.render.RenderingRuleStorageProperties.UI_CATEGORY_HIDE) UI_CATEGORY_ROUTES(net.osmand.render.RenderingRuleStorageProperties.UI_CATEGORY_ROUTES) AndroidUtils(net.osmand.plus.utils.AndroidUtils) Iterator(java.util.Iterator) MAP_MODE_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_MODE_ID) ItemBuilder(net.osmand.plus.ContextMenuItem.ItemBuilder) DayNightMode(net.osmand.plus.settings.enums.DayNightMode) CONTOUR_LINES_SCHEME_ATTR(net.osmand.plus.plugins.srtm.SRTMPlugin.CONTOUR_LINES_SCHEME_ATTR) MAP_STYLE_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.MAP_STYLE_ID) ROUTES_ID(net.osmand.aidlapi.OsmAndCustomizationConstants.ROUTES_ID) UI_CATEGORY_HIDDEN(net.osmand.render.RenderingRuleStorageProperties.UI_CATEGORY_HIDDEN) ArrayAdapter(android.widget.ArrayAdapter) ContextMenuItem(net.osmand.plus.ContextMenuItem) UI_CATEGORY_DETAILS(net.osmand.render.RenderingRuleStorageProperties.UI_CATEGORY_DETAILS) Log(org.apache.commons.logging.Log) CONTOUR_LINES_ATTR(net.osmand.plus.plugins.srtm.SRTMPlugin.CONTOUR_LINES_ATTR) MapActivity(net.osmand.plus.activities.MapActivity) ItemBuilder(net.osmand.plus.ContextMenuItem.ItemBuilder) OsmandApplication(net.osmand.plus.OsmandApplication) CommonPreference(net.osmand.plus.settings.backend.preferences.CommonPreference) ContextMenuItem(net.osmand.plus.ContextMenuItem) RenderingRuleProperty(net.osmand.render.RenderingRuleProperty) ResourceManager(net.osmand.plus.resources.ResourceManager) OsmandSettings(net.osmand.plus.settings.backend.OsmandSettings)

Aggregations

OsmandSettings (net.osmand.plus.settings.backend.OsmandSettings)154 OsmandApplication (net.osmand.plus.OsmandApplication)52 View (android.view.View)25 ArrayList (java.util.ArrayList)23 LatLon (net.osmand.data.LatLon)17 MapActivity (net.osmand.plus.activities.MapActivity)17 TextView (android.widget.TextView)16 NonNull (androidx.annotation.NonNull)16 AlertDialog (androidx.appcompat.app.AlertDialog)15 ApplicationMode (net.osmand.plus.settings.backend.ApplicationMode)15 ArrayAdapter (android.widget.ArrayAdapter)13 ContextMenuItem (net.osmand.plus.ContextMenuItem)13 TargetPoint (net.osmand.plus.helpers.TargetPointsHelper.TargetPoint)12 OsmandMapTileView (net.osmand.plus.views.OsmandMapTileView)12 Context (android.content.Context)11 ImageView (android.widget.ImageView)11 Intent (android.content.Intent)8 List (java.util.List)8 PointDescription (net.osmand.data.PointDescription)8 DialogInterface (android.content.DialogInterface)7