From 5336b59495c0ccdc69e55d5ab3cd5452e5a27cd2 Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Tue, 5 Apr 2016 12:58:05 +0300 Subject: [PATCH 01/67] Support three turn options for one segment in the result route description --- .../net/osmand/router/RouteResultPreparation.java | 8 ++++++-- OsmAnd-java/src/net/osmand/router/TurnType.java | 4 ++-- OsmAnd-java/test/resources/test_turn_lanes.json | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index ef5331547b..afe7693fb2 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -1006,6 +1006,7 @@ public class RouteResultPreparation { int[] lanes = new int[splitLaneOptions.length]; for (int i = 0; i < splitLaneOptions.length; i++) { String[] laneOptions = splitLaneOptions[i].split(";"); + boolean is_tertiary_turn = false; for (int j = 0; j < laneOptions.length; j++) { int turn; @@ -1039,10 +1040,13 @@ public class RouteResultPreparation { (TurnType.isLeftTurn(calcTurnType) && TurnType.isLeftTurn(turn)) ) { TurnType.setPrimaryTurnShiftOthers(lanes, i, turn); - } else { + } else if (!is_tertiary_turn) { TurnType.setSecondaryTurnShiftOthers(lanes, i, turn); + is_tertiary_turn = true; + } else { + TurnType.setTertiaryTurn(lanes, i, turn); + break; } - break; // Move on to the next lane } } } diff --git a/OsmAnd-java/src/net/osmand/router/TurnType.java b/OsmAnd-java/src/net/osmand/router/TurnType.java index 8fea638dd7..e7928a6b19 100644 --- a/OsmAnd-java/src/net/osmand/router/TurnType.java +++ b/OsmAnd-java/src/net/osmand/router/TurnType.java @@ -180,7 +180,7 @@ public class TurnType { } public static int getSecondaryTurn(int laneValue) { - // Get the primary turn modifier for the lane + // Get the secondary turn modifier for the lane return (laneValue >> 5); } @@ -206,7 +206,7 @@ public class TurnType { } public static int getTertiaryTurn(int laneValue) { - // Get the primary turn modifier for the lane + // Get the tertiary turn modifier for the lane return (laneValue >> 10); } diff --git a/OsmAnd-java/test/resources/test_turn_lanes.json b/OsmAnd-java/test/resources/test_turn_lanes.json index 65908a4011..67ea477150 100644 --- a/OsmAnd-java/test/resources/test_turn_lanes.json +++ b/OsmAnd-java/test/resources/test_turn_lanes.json @@ -216,6 +216,21 @@ "expectedResults": { "14418": "TL, +TL, C, C, TR" } + }, + { + "testName": "11.Figure 8 TL", + "startPoint": { + "latitude": 45.69816447596442, + "longitude": 35.74885922431952 + }, + "endPoint": { + "latitude": 45.700075267731705, + "longitude": 35.7467134571076 + }, + "expectedResults": { + "43906": null, + "43905": "+TL;C;TR" + } } ] \ No newline at end of file From ee3386a64d2b389492495d8bb0bdb35b32573d68 Mon Sep 17 00:00:00 2001 From: josep constanti Date: Tue, 5 Apr 2016 14:18:09 +0200 Subject: [PATCH 02/67] Translated using Weblate (Catalan) Currently translated at 99.4% (1946 of 1956 strings) --- OsmAnd/res/values-ca/strings.xml | 46 +++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index f8af10ece7..81b6d2c43b 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -636,7 +636,7 @@ Vila Esteu a punt de suprimir %1$d preferit(s) i %2$d grup(s) de preferits. N\'esteu segurs? No s\'ha trobat el mapa base del món (el qual cobreix tot el món als nivells de zoom menors). És recomanable que us baixeu el fitxer World_basemap_x.obf per gaudir d\'un entorn complet. - No s\'ha trobat les dades de bord («fora de línia») a la targeta SD. És recomanable que les baixeu per utilitzar els mapes fora de línia. + No s\'ha trobat les dades descarregades («fora de línia») a la targeta SD. És recomanable que les baixeu per utilitzar mapes sense connexió. No hi ha dades instal·lades per la llengua seleccionada. Voleu anar al Market per instal·lar-ne? Passa al llarg de la traça sencera Hi ha un mapa de vectors fora de línia per aquesta localització. @@ -785,7 +785,7 @@ Àudio de trucada de veu Habilita el connector de monitorització (enregistrament GPX, seguiment en viu) per poder utilitzar els serveis de registre d\'ubicació Habiliteu el GPS a les preferències - L\'aplicació ZXing Barcode Scanner no està instal·lada. La voleu cercar al Market? + L\'aplicació ZXing Barcode Scanner no està instal·lada. La voleu cercar a Google Play? Esquema de color de carreteres Mostra la direcció de destinació Calcula possibles rutes no òptimes per a llargues distàncies @@ -1107,7 +1107,7 @@ Preferències de ruta Informació de ruta "Aquest connector proporciona tant corbes de nivell superposades com una capa d\'ombres amb efecte relleu per superposar als mapes de OsmAnd. Corredors, ciclistes, excursionistes i qualsevol interessat en el perfil de relleu del terreny ho agrairan força.\n\nLes dades globals (entre 70 graus nord i 70 graus sud) estan basades en mesures del SRTM (Shuttle Radar Topography Mission) i del ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), un instrument de generació d\'imatges a bord de Terra, el satèl·lit insígnia del Sistema d\'Observació de la Terra de la NASA. ASTER és un esforç de col·laboració entre la NASA, el Ministeri d\'Economia i Comerç del Japó (METI) i la fundació Japan Space Systems (J-spacesystems). " - Afegeix com a punt de destinació + Afegeix com a darrer punt de destinació Calcula un segment de ruta a l\'OsmAnd sense Internet Calcula una ruta a l\'OsmAnd pels seus segments primer i darrer Voleu utilitzar la traça visualitzada per la navegació? @@ -1233,7 +1233,7 @@ Monitorització d\'OpenStreetMap Envia les meves ubicacions Accés ràpid a OsMo - Voleu desar els punts com un fitxer GPX o voleu importar-los als preferits? + Voleu desar les dades com un fitxer GPX o voleu importar les fites als Preferits? Segueix Inicia una sessió Per poder crear grups cal ser un usuari registrat d\'OsMo. @@ -1822,7 +1822,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Macedònic Frisó Albanès (Tosc) - Confirmeu desar el PDI sense indicar el tipus? + Confirmeu que voleu desar el PDI sense indicar el seu tipus? Voleu suprimir la fita GPX? Edita la fita GPX Localització @@ -1883,10 +1883,10 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Actualitza ara Distància: Durada: - L\'aplicació no té autorització per utilitzar la memòria SD -L\'aplicació no té autorització per utilitzar les dades d\'ubicació. - L\'aplicació no té autorització per utilitzar la càmera. - L\'aplicació no té autorització per utilitzar el micròfon. + L\'aplicació no tenia autorització per utilitzar la memòria SD +L\'aplicació no tenia autorització per utilitzar les dades d\'ubicació. + L\'aplicació no tenia autorització per utilitzar la càmera. + L\'aplicació no tenia autorització per utilitzar el micròfon. Indiqueu les vies que voleu evitar en la navegació So Actualitzacions al moment @@ -1971,4 +1971,30 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Informe complert Usuari i contrasenya d\'OpenStreetMap Subscriu - + " • OSM en directe. Recolzament a desenvolupadors i col·laboradors de mapes i obtenció de mapes actualitzats cada hora.. +\n\n • Marcadors de mapa. Una nova opció per seleccionar ràpidament llocs al mapa.\n\n • Els mapes OSM tenen més detalls amb la la simbologia específica de les carreteres del país i moltes noves característiques del mapa.\n\n • S\'ha millorat l\'aspecte i la experiència de la preparació de ruta. +\n\n • Moltes millores al menú contextual de mapa, com la cerca contextual d\'adreces .\n\n i encara més… " + Subscripció a OSM en directe + Ens cal per proporcionar-vos informació d\'aportacions + Zona de suport + Us agraïm haver-vos subscrit a les actualitzacions en directe! + Una part del vostre donatiu s\'enviarà als usuaris d\'OSM que enviïn modificacions del mapa a aquesta regió + Primer hauríeu de subscriure-os a OSM en directe + + Seleccioneu un marcador de mapa + Altres marcadors + Mostreu la transparència de la barra de cerca + Puja una nota OSM + Primer marcador de mapa + Segon marcador de mapa + Voleu afegir tots els punts als marcadors de mapa? + Afegeix als marcadors de mapa + Selecciona marcadors de mapa + Activa l\'opció de marcadors de mapa + Voleu treure tots els marcadors actius? + Voleu netejar l\'historial de marcadors de mapa? + Marcadors actius + Marcadors de mapa + Marcador de mapa + El nom de fitxer inclou un caràcter ilegal + From 56b8c62b5b0ed81a839ad03cf44db650d6afa496 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Tue, 5 Apr 2016 16:51:54 +0300 Subject: [PATCH 03/67] Fixed fonts and changed naming. --- OsmAnd/res/layout/list_group_title_with_switch.xml | 8 ++++---- OsmAnd/res/layout/list_item_icon_and_menu.xml | 2 +- OsmAnd/res/layout/simple_list_menu_item.xml | 2 +- OsmAnd/res/values/styles.xml | 7 ++++++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/OsmAnd/res/layout/list_group_title_with_switch.xml b/OsmAnd/res/layout/list_group_title_with_switch.xml index 4774a6ec5a..e9f039eeee 100644 --- a/OsmAnd/res/layout/list_group_title_with_switch.xml +++ b/OsmAnd/res/layout/list_group_title_with_switch.xml @@ -4,8 +4,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="64dp" - android:orientation="vertical" - android:clickable="false"> + android:clickable="false" + android:orientation="vertical"> @@ -26,12 +26,12 @@ android:paddingLeft="16dp" android:paddingRight="16dp"> - diff --git a/OsmAnd/res/layout/simple_list_menu_item.xml b/OsmAnd/res/layout/simple_list_menu_item.xml index 9f264600ee..2ea55d7033 100644 --- a/OsmAnd/res/layout/simple_list_menu_item.xml +++ b/OsmAnd/res/layout/simple_list_menu_item.xml @@ -13,7 +13,7 @@ android:drawablePadding="24dp" android:gravity="center_vertical" android:paddingLeft="16dp" - android:textAppearance="@style/TextAppearance.OsmandListItemTitle" + android:textAppearance="@style/TextAppearance.ListItemTitle" android:textStyle="normal" tools:drawableLeft="@drawable/ic_action_search_dark" tools:text="@string/layer_poi"/> diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index b818b97366..719047e89a 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -365,7 +365,12 @@ true - + + From a42d54d43e878ba6fe92698597ba065298bf6ce2 Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Tue, 5 Apr 2016 17:35:59 +0300 Subject: [PATCH 04/67] Merge remote-tracking branch 'origin/master' (manually for weblate) --- OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index 3a3e467408..64e094645a 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -1040,9 +1040,9 @@ public class RouteResultPreparation { (TurnType.isLeftTurn(calcTurnType) && TurnType.isLeftTurn(turn)) ) { TurnType.setPrimaryTurnShiftOthers(lanes, i, turn); - } else if (!is_tertiary_turn) { + } else if (!isTertiaryTurn) { TurnType.setSecondaryTurnShiftOthers(lanes, i, turn); - is_tertiary_turn = true; + isTertiaryTurn = true; } else { TurnType.setTertiaryTurn(lanes, i, turn); break; From af982435765fa5a887b4b608f0862d562c6e30b4 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Tue, 5 Apr 2016 17:52:23 +0300 Subject: [PATCH 05/67] Removed duplicating method. --- OsmAnd/src/net/osmand/plus/IconsCache.java | 35 ------------------- .../net/osmand/plus/OsmandApplication.java | 4 +-- .../activities/actions/AppModeDialog.java | 2 +- .../osmand/plus/audionotes/NotesFragment.java | 2 +- .../plus/dashboard/DashWaypointsFragment.java | 6 ++-- .../plus/helpers/MapMarkerDialogHelper.java | 6 ++-- .../plus/helpers/WaypointDialogHelper.java | 6 ++-- .../other/DestinationReachedMenuFragment.java | 8 ++--- .../other/MapRouteInfoMenu.java | 15 ++++---- .../other/RoutePreferencesMenu.java | 8 ++--- .../other/ShareMenuFragment.java | 2 +- .../osmand/plus/osmo/OsMoGroupsActivity.java | 2 +- .../osmand/plus/views/MapControlsLayer.java | 6 ++-- 13 files changed, 33 insertions(+), 69 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/IconsCache.java b/OsmAnd/src/net/osmand/plus/IconsCache.java index 6572b5caa4..34bf3343a4 100644 --- a/OsmAnd/src/net/osmand/plus/IconsCache.java +++ b/OsmAnd/src/net/osmand/plus/IconsCache.java @@ -1,9 +1,6 @@ package net.osmand.plus; import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.PorterDuff; -import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.support.annotation.ColorInt; @@ -24,19 +21,6 @@ public class IconsCache { this.app = app; } - public Drawable scaleImage(Drawable image, float scaleFactor) { - if ((image == null) || !(image instanceof BitmapDrawable)) { - return image; - } - Bitmap b = ((BitmapDrawable)image).getBitmap(); - - int sizeX = Math.round(image.getIntrinsicWidth() * scaleFactor); - int sizeY = Math.round(image.getIntrinsicHeight() * scaleFactor); - - Bitmap bitmapResized = Bitmap.createScaledBitmap(b, sizeX, sizeY, false); - return new BitmapDrawable(app.getResources(), bitmapResized); - } - private Drawable getDrawable(@DrawableRes int resId, @ColorRes int clrId) { long hash = ((long)resId << 31l) + clrId; Drawable d = drawable.get(hash); @@ -44,10 +28,8 @@ public class IconsCache { d = ContextCompat.getDrawable(app, resId); d = DrawableCompat.wrap(d); d.mutate(); - // d.clearColorFilter(); if (clrId != 0) { DrawableCompat.setTint(d, ContextCompat.getColor(app, clrId)); - // d.setColorFilter(ContextCompat.getColor(app, clrId), PorterDuff.Mode.SRC_IN); } drawable.put(hash, d); } @@ -63,9 +45,6 @@ public class IconsCache { d.mutate(); DrawableCompat.setTint(d, color); -// d = app.getResources().getDrawable(resId).mutate(); -// d.clearColorFilter(); -// d.setColorFilter(color, PorterDuff.Mode.SRC_IN); drawable.put(hash, d); } return d; @@ -79,7 +58,6 @@ public class IconsCache { return getDrawable(id, colorId); } - public Drawable getIcon(@DrawableRes int backgroundId, @DrawableRes int id, @ColorRes int colorId) { Drawable b = getDrawable(backgroundId, 0); Drawable f = getDrawable(id, colorId); @@ -93,10 +71,6 @@ public class IconsCache { return getDrawable(id, app.getSettings().isLightContent() ? R.color.icon_color : 0); } - public Drawable getContentIcon(@DrawableRes int id, boolean isLightContent) { - return getDrawable(id, isLightContent ? R.color.icon_color : 0); - } - public Drawable getIcon(@DrawableRes int id) { return getDrawable(id, 0); } @@ -105,15 +79,6 @@ public class IconsCache { return getDrawable(id, light ? R.color.icon_color : 0); } - public Drawable getContentIconCompat(@DrawableRes int id) { - Drawable drawable = ContextCompat.getDrawable(app, id); - @ColorInt int color = ContextCompat.getColor(app, getDefaultColorRes(app)); - drawable = DrawableCompat.wrap(drawable); - drawable.mutate(); - DrawableCompat.setTint(drawable, color); - return drawable; - } - public void paintMenuItem(MenuItem menuItem) { Drawable drawable = menuItem.getIcon(); drawable = DrawableCompat.wrap(drawable); diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 335c7a9432..a632ab7136 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -371,7 +371,7 @@ public class OsmandApplication extends MultiDexApplication { View view = uiContext.getLayoutInflater().inflate(R.layout.select_voice_first, null); ((ImageView) view.findViewById(R.id.icon)) - .setImageDrawable(getIconsCache().getContentIcon(R.drawable.ic_action_volume_up, getSettings().isLightContent())); + .setImageDrawable(getIconsCache().getIcon(R.drawable.ic_action_volume_up, getSettings().isLightContent())); view.findViewById(R.id.spinner).setOnClickListener(new View.OnClickListener() { @Override @@ -392,7 +392,7 @@ public class OsmandApplication extends MultiDexApplication { }); ((ImageView) view.findViewById(R.id.dropDownIcon)) - .setImageDrawable(getIconsCache().getContentIcon(R.drawable.ic_action_arrow_drop_down, getSettings().isLightContent())); + .setImageDrawable(getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, getSettings().isLightContent())); builder.setCancelable(true); builder.setNegativeButton(R.string.shared_string_cancel, null); diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java b/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java index cdcc626d90..3439f65631 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java @@ -80,7 +80,7 @@ public class AppModeDialog { } else { if (useMapTheme) { boolean nightMode = ctx.getDaynightHelper().isNightModeForMapControls(); - iv.setImageDrawable(ctx.getIconsCache().getContentIcon(mode.getSmallIconDark(), !nightMode)); + iv.setImageDrawable(ctx.getIconsCache().getIcon(mode.getSmallIconDark(), !nightMode)); AndroidUtils.setBackground(ctx, iv, nightMode, R.drawable.dashboard_button_light, R.drawable.dashboard_button_dark); } else { iv.setImageDrawable(ctx.getIconsCache().getContentIcon(mode.getSmallIconDark())); diff --git a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java index 25deccb1a7..0e9d2aadd6 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java @@ -368,7 +368,7 @@ public class NotesFragment extends OsmAndListFragment { DashAudioVideoNotesFragment.getNoteView(recording, row, getMyApplication()); } // ((ImageView) row.findViewById(R.id.play)).setImageDrawable(getMyApplication().getIconsCache() -// .getContentIcon(R.drawable.ic_play_dark)); +// .getIcon(R.drawable.ic_play_dark)); row.findViewById(R.id.play).setVisibility(View.GONE); diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java index 91e7238141..261be06acf 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java @@ -161,8 +161,8 @@ public class DashWaypointsFragment extends DashLocationFragment { final boolean optionsVisible = (SHOW_ALL && getMyApplication().getTargetPointsHelper().getIntermediatePoints().size() > 0); options.setImageDrawable(getMyApplication().getIconsCache(). - getContentIcon(optionsVisible? R.drawable.ic_overflow_menu_white : - R.drawable.ic_action_remove_dark)); + getContentIcon(optionsVisible ? R.drawable.ic_overflow_menu_white : + R.drawable.ic_action_remove_dark)); options.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -222,7 +222,7 @@ public class DashWaypointsFragment extends DashLocationFragment { MenuItem item; // item = optionsMenu.getMenu().add( // R.string.shared_string_add_to_favorites).setIcon(getMyApplication().getIconsCache(). -// getContentIcon(R.drawable.ic_action_fav_dark)); +// getIcon(R.drawable.ic_action_fav_dark)); // item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { // @Override // public boolean onMenuItemClick(MenuItem item) { diff --git a/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java index d5e055d300..c260a06986 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java @@ -334,7 +334,7 @@ public class MapMarkerDialogHelper { } else { final ImageButton btn = (ImageButton) v.findViewById(R.id.image_button); - btn.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_overflow_menu_white, !nightMode)); + btn.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_overflow_menu_white, !nightMode)); btn.setVisibility(View.VISIBLE); btn.setOnClickListener(new View.OnClickListener() { @Override @@ -423,7 +423,7 @@ public class MapMarkerDialogHelper { more.setVisibility(View.GONE); if (!marker.history && !sorted) { move.setVisibility(View.VISIBLE); - ((ImageView) move).setImageDrawable(app.getIconsCache().getContentIcon( + ((ImageView) move).setImageDrawable(app.getIconsCache().getIcon( R.drawable.ic_action_reorder, !nightMode)); move.setTag(new DynamicListView.DragIcon() { @Override @@ -513,7 +513,7 @@ public class MapMarkerDialogHelper { .getColor(useCenter ? R.color.color_distance : R.color.color_myloc_distance)); } else { waypointIcon.setImageDrawable(app.getIconsCache() - .getContentIcon(R.drawable.ic_action_flag_dark, !nightMode)); + .getIcon(R.drawable.ic_action_flag_dark, !nightMode)); AndroidUtils.setTextSecondaryColor(ctx, text, nightMode); AndroidUtils.setTextSecondaryColor(ctx, textDist, nightMode); } diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index 5233554f8d..186c16ccb9 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -418,7 +418,7 @@ public class WaypointDialogHelper { remove.setVisibility(View.GONE); move.setVisibility(View.GONE); more.setVisibility(View.VISIBLE); - ((ImageButton) more).setImageDrawable(app.getIconsCache().getContentIcon( + ((ImageButton) more).setImageDrawable(app.getIconsCache().getIcon( R.drawable.map_overflow_menu_white, !nightMode)); more.setOnClickListener(new View.OnClickListener() { @Override @@ -481,7 +481,7 @@ public class WaypointDialogHelper { remove.setVisibility(View.GONE); move.setVisibility(View.VISIBLE); more.setVisibility(View.GONE); - ((ImageView) move).setImageDrawable(app.getIconsCache().getContentIcon( + ((ImageView) move).setImageDrawable(app.getIconsCache().getIcon( R.drawable.ic_action_reorder, !nightMode)); move.setTag(new DragIcon() { @Override @@ -544,7 +544,7 @@ public class WaypointDialogHelper { remove.setVisibility(View.VISIBLE); move.setVisibility(View.GONE); more.setVisibility(View.GONE); - ((ImageButton) remove).setImageDrawable(app.getIconsCache().getContentIcon( + ((ImageButton) remove).setImageDrawable(app.getIconsCache().getIcon( R.drawable.ic_action_remove_dark, !nightMode)); remove.setOnClickListener(new View.OnClickListener() { @Override diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java index 07c0d6c453..a596986580 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/DestinationReachedMenuFragment.java @@ -50,7 +50,7 @@ public class DestinationReachedMenuFragment extends Fragment { IconsCache iconsCache = getMapActivity().getMyApplication().getIconsCache(); ImageButton closeImageButton = (ImageButton) view.findViewById(R.id.closeImageButton); - closeImageButton.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_remove_dark, menu.isLight())); + closeImageButton.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_remove_dark, menu.isLight())); closeImageButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -60,7 +60,7 @@ public class DestinationReachedMenuFragment extends Fragment { Button removeDestButton = (Button) view.findViewById(R.id.removeDestButton); removeDestButton.setCompoundDrawablesWithIntrinsicBounds( - iconsCache.getContentIcon(R.drawable.ic_action_done, menu.isLight()), null, null, null); + iconsCache.getIcon(R.drawable.ic_action_done, menu.isLight()), null, null, null); AndroidUtils.setTextPrimaryColor(view.getContext(), removeDestButton, !menu.isLight()); removeDestButton.setOnClickListener(new View.OnClickListener() { @Override @@ -80,7 +80,7 @@ public class DestinationReachedMenuFragment extends Fragment { Button recalcDestButton = (Button) view.findViewById(R.id.recalcDestButton); recalcDestButton.setCompoundDrawablesWithIntrinsicBounds( - iconsCache.getContentIcon(R.drawable.ic_action_gdirections_dark, menu.isLight()), null, null, null); + iconsCache.getIcon(R.drawable.ic_action_gdirections_dark, menu.isLight()), null, null, null); AndroidUtils.setTextPrimaryColor(view.getContext(), recalcDestButton, !menu.isLight()); recalcDestButton.setOnClickListener(new View.OnClickListener() { @Override @@ -102,7 +102,7 @@ public class DestinationReachedMenuFragment extends Fragment { Button findParkingButton = (Button) view.findViewById(R.id.findParkingButton); findParkingButton.setCompoundDrawablesWithIntrinsicBounds( - iconsCache.getContentIcon(R.drawable.ic_action_parking_dark, menu.isLight()), null, null, null); + iconsCache.getIcon(R.drawable.ic_action_parking_dark, menu.isLight()), null, null, null); AndroidUtils.setTextPrimaryColor(view.getContext(), findParkingButton, !menu.isLight()); findParkingButton.setOnClickListener(new View.OnClickListener() { @Override diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java index fa08e10e41..a2f5751c01 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java @@ -33,7 +33,6 @@ import net.osmand.plus.MapMarkersHelper; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; -import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.TargetPointsHelper.TargetPoint; @@ -217,7 +216,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { main.findViewById(R.id.InfoDuration).setVisibility(View.GONE); textView.setText(R.string.route_is_too_long); textView.setVisibility(View.VISIBLE); - iconView.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_warning, isLight())); + iconView.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.ic_warning, isLight())); } else { main.findViewById(R.id.dividerToDropDown).setVisibility(View.GONE); main.findViewById(R.id.RouteInfoControls).setVisibility(View.GONE); @@ -328,7 +327,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { updateToIcon(parentView); ImageView toDropDownIcon = (ImageView) parentView.findViewById(R.id.toDropDownIcon); - toDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_arrow_drop_down, isLight())); + toDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, isLight())); } private void updateToIcon(View parentView) { @@ -400,7 +399,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { updateFromIcon(parentView); ImageView fromDropDownIcon = (ImageView) parentView.findViewById(R.id.fromDropDownIcon); - fromDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_arrow_drop_down, isLight())); + fromDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, isLight())); } @SuppressWarnings("deprecation") @@ -525,7 +524,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { mainView.findViewById(R.id.RouteInfoControls).setVisibility(View.VISIBLE); final OsmandApplication ctx = mapActivity.getMyApplication(); ImageView prev = (ImageView) mainView.findViewById(R.id.Prev); - prev.setImageDrawable(ctx.getIconsCache().getContentIcon(R.drawable.ic_prev, isLight())); + prev.setImageDrawable(ctx.getIconsCache().getIcon(R.drawable.ic_prev, isLight())); if (directionInfo >= 0) { prev.setVisibility(View.VISIBLE); prev.setOnClickListener(new View.OnClickListener() { @@ -554,7 +553,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { } ImageView next = (ImageView) mainView.findViewById(R.id.Next); next.setVisibility(View.VISIBLE); - next.setImageDrawable(ctx.getIconsCache().getContentIcon(R.drawable.ic_next, isLight())); + next.setImageDrawable(ctx.getIconsCache().getIcon(R.drawable.ic_next, isLight())); next.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -592,9 +591,9 @@ public class MapRouteInfoMenu implements IRouteInformationListener { infoDurationView.setVisibility(View.GONE); textView.setVisibility(View.VISIBLE); } else { - infoIcon.setImageDrawable(ctx.getIconsCache().getContentIcon(R.drawable.ic_action_polygom_dark, isLight())); + infoIcon.setImageDrawable(ctx.getIconsCache().getIcon(R.drawable.ic_action_polygom_dark, isLight())); infoIcon.setVisibility(View.VISIBLE); - durationIcon.setImageDrawable(ctx.getIconsCache().getContentIcon(R.drawable.ic_action_time, isLight())); + durationIcon.setImageDrawable(ctx.getIconsCache().getIcon(R.drawable.ic_action_time, isLight())); durationIcon.setVisibility(View.VISIBLE); infoDistanceView.setVisibility(View.VISIBLE); infoDurationView.setVisibility(View.VISIBLE); diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java index 988365e68f..4e6e886a2c 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java @@ -331,7 +331,7 @@ public class RoutePreferencesMenu { v.findViewById(R.id.description_text).setVisibility(View.GONE); v.findViewById(R.id.select_button).setVisibility(View.GONE); ((ImageView) v.findViewById(R.id.icon)) - .setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_volume_up, !nightMode)); + .setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_volume_up, !nightMode)); final CompoundButton btn = (CompoundButton) v.findViewById(R.id.toggle_item); btn.setVisibility(View.VISIBLE); btn.setChecked(!routingHelper.getVoiceRouter().isMute()); @@ -351,7 +351,7 @@ public class RoutePreferencesMenu { View v = mapActivity.getLayoutInflater().inflate(R.layout.switch_select_list_item, null); AndroidUtils.setListItemBackground(mapActivity, v, nightMode); ((ImageView) v.findViewById(R.id.icon)) - .setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_road_works_dark, !nightMode)); + .setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_road_works_dark, !nightMode)); v.findViewById(R.id.toggle_item).setVisibility(View.GONE); final TextView btn = (TextView) v.findViewById(R.id.select_button); btn.setTextColor(btn.getLinkTextColors()); @@ -437,7 +437,7 @@ public class RoutePreferencesMenu { final TextView gpxSpinner = (TextView) v.findViewById(R.id.GPXRouteSpinner); AndroidUtils.setTextPrimaryColor(mapActivity, gpxSpinner, nightMode); ((ImageView) v.findViewById(R.id.dropDownIcon)) - .setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_arrow_drop_down, !nightMode)); + .setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, !nightMode)); updateSpinnerItems(gpxSpinner); return v; } @@ -445,7 +445,7 @@ public class RoutePreferencesMenu { View v = mapActivity.getLayoutInflater().inflate(R.layout.layers_list_activity_item, null); AndroidUtils.setListItemBackground(mapActivity, v, nightMode); final ImageView icon = (ImageView) v.findViewById(R.id.icon); - icon.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.map_action_settings, !nightMode)); + icon.setImageDrawable(app.getIconsCache().getIcon(R.drawable.map_action_settings, !nightMode)); icon.setVisibility(View.VISIBLE); TextView titleView = (TextView) v.findViewById(R.id.title); titleView.setText(R.string.routing_settings_2); diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenuFragment.java index f8a07efe9b..48c58c6011 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenuFragment.java @@ -105,7 +105,7 @@ public class ShareMenuFragment extends Fragment implements OnItemClickListener { final ShareItem item = getItem(position); ImageView icon = (ImageView) v.findViewById(R.id.icon); icon.setImageDrawable(menu.getMapActivity().getMyApplication() - .getIconsCache().getContentIcon(item.getIconResourceId(), menu.isLight())); + .getIconsCache().getIcon(item.getIconResourceId(), menu.isLight())); TextView name = (TextView) v.findViewById(R.id.name); AndroidUtils.setTextPrimaryColor(v.getContext(), name, !menu.isLight()); name.setText(getContext().getText(item.getTitleResourceId())); diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java index 9386749b4d..493db18af8 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java @@ -1210,7 +1210,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements if (model.isMainGroup()) { v.setVisibility(View.GONE); } else { -// (ImageView) v.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_settings)); +// (ImageView) v.setImageDrawable(getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_settings)); if ((selectedObject == model) != ((CheckBox) v).isChecked()) { ((CheckBox) v).setChecked(selectedObject == model); diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index 6de0c70fd6..891683b7f6 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -222,7 +222,7 @@ public class MapControlsLayer extends OsmandMapLayer { public void updateRouteButtons(View main, boolean routeInfo) { boolean nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls(); ImageView cancelRouteButton = (ImageView) main.findViewById(R.id.map_cancel_route_button); - cancelRouteButton.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.map_action_cancel, !nightMode)); + cancelRouteButton.setImageDrawable(app.getIconsCache().getIcon(R.drawable.map_action_cancel, !nightMode)); AndroidUtils.setBackground(mapActivity, cancelRouteButton, nightMode, R.drawable.dashboard_button_light, R.drawable.dashboard_button_dark); cancelRouteButton.setOnClickListener(new View.OnClickListener() { @Override @@ -232,7 +232,7 @@ public class MapControlsLayer extends OsmandMapLayer { }); ImageView waypointsButton = (ImageView) main.findViewById(R.id.map_waypoints_route_button); - waypointsButton.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.map_action_waypoint, !nightMode)); + waypointsButton.setImageDrawable(app.getIconsCache().getIcon(R.drawable.map_action_waypoint, !nightMode)); AndroidUtils.setBackground(mapActivity, waypointsButton, nightMode, R.drawable.dashboard_button_light, R.drawable.dashboard_button_dark); waypointsButton.setOnClickListener(new View.OnClickListener() { @Override @@ -243,7 +243,7 @@ public class MapControlsLayer extends OsmandMapLayer { ImageView options = (ImageView) main.findViewById(R.id.map_options_route_button); options.setImageDrawable(!routeInfo ? app.getIconsCache().getIcon(R.drawable.map_action_settings, - R.color.osmand_orange) : app.getIconsCache().getContentIcon(R.drawable.map_action_settings, !nightMode)); + R.color.osmand_orange) : app.getIconsCache().getIcon(R.drawable.map_action_settings, !nightMode)); AndroidUtils.setBackground(mapActivity, options, nightMode, R.drawable.dashboard_button_light, R.drawable.dashboard_button_dark); options.setOnClickListener(new View.OnClickListener() { @Override From 59e571ef771a313d4e53f5deb81820405628e407 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Tue, 5 Apr 2016 17:56:16 +0300 Subject: [PATCH 06/67] Renamed method in IconsCache --- OsmAnd/src/net/osmand/plus/IconsCache.java | 4 +-- .../activities/FavoritesListFragment.java | 4 +-- .../activities/FavoritesTreeFragment.java | 4 +-- .../osmand/plus/activities/HelpActivity.java | 6 ++-- .../activities/IntermediatePointsDialog.java | 2 +- .../plus/activities/OpeningHoursView.java | 2 +- .../plus/activities/PluginActivity.java | 5 ++-- .../plus/activities/PluginsActivity.java | 9 +++--- .../activities/actions/AppModeDialog.java | 2 +- .../search/SearchAddressFragment.java | 23 +++++++------- .../search/SearchHistoryFragment.java | 8 ++--- .../activities/search/SearchPOIActivity.java | 8 ++--- .../search/SearchPoiFilterFragment.java | 6 ++-- .../AudioVideoNoteRecordingMenu.java | 7 ++--- .../DashAudioVideoNotesFragment.java | 2 +- .../osmand/plus/audionotes/NotesFragment.java | 14 ++++----- .../plus/base/BaseOsmAndDialogFragment.java | 4 +-- .../osmand/plus/base/BaseOsmAndFragment.java | 4 +-- .../plus/base/BottomSheetDialogFragment.java | 2 +- .../plus/dashboard/DashErrorFragment.java | 2 +- .../plus/dashboard/DashFavoritesFragment.java | 4 +-- .../dashboard/DashNavigationFragment.java | 6 ++-- .../plus/dashboard/DashRecentsFragment.java | 2 +- .../plus/dashboard/DashWaypointsFragment.java | 10 +++---- .../development/DashSimulateFragment.java | 4 +-- .../plus/dialogs/ErrorBottomSheetDialog.java | 2 +- .../download/ui/DownloadGroupViewHolder.java | 6 ++-- .../ui/DownloadResourceGroupFragment.java | 6 ++-- .../plus/download/ui/ItemViewHolder.java | 8 ++--- .../download/ui/LocalIndexesFragment.java | 12 ++++---- .../plus/helpers/AvoidSpecificRoads.java | 4 +-- .../plus/helpers/MapMarkerDialogHelper.java | 8 ++--- .../plus/helpers/WaypointDialogHelper.java | 10 +++---- .../plus/liveupdates/LiveUpdatesFragment.java | 4 +-- .../mapcontextmenu/BaseMenuController.java | 2 +- .../builders/GpxItemMenuBuilder.java | 2 +- .../editors/PointEditorFragment.java | 2 +- .../other/MapRouteInfoMenu.java | 2 +- .../plus/monitoring/DashTrackFragment.java | 2 +- .../plus/myplaces/AvailableGPXFragment.java | 30 +++++++++---------- .../plus/myplaces/SelectedGPXFragment.java | 4 +-- .../plus/osmedit/DashOsmEditsFragment.java | 2 +- .../osmand/plus/osmedit/OsmEditsFragment.java | 10 +++---- .../osmedit/OsmEditsUploadListenerHelper.java | 4 +-- .../osmand/plus/osmo/DashOsMoFragment.java | 6 ++-- .../osmand/plus/osmo/OsMoGroupsActivity.java | 4 +-- 46 files changed, 136 insertions(+), 138 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/IconsCache.java b/OsmAnd/src/net/osmand/plus/IconsCache.java index 34bf3343a4..97d0b1a0cd 100644 --- a/OsmAnd/src/net/osmand/plus/IconsCache.java +++ b/OsmAnd/src/net/osmand/plus/IconsCache.java @@ -50,7 +50,7 @@ public class IconsCache { return d; } - public Drawable getPaintedContentIcon(@DrawableRes int id, @ColorInt int color){ + public Drawable getPaintedIcon(@DrawableRes int id, @ColorInt int color){ return getPaintedDrawable(id, color); } @@ -67,7 +67,7 @@ public class IconsCache { return new LayerDrawable(layers); } - public Drawable getContentIcon(@DrawableRes int id) { + public Drawable getThemedIcon(@DrawableRes int id) { return getDrawable(id, app.getSettings().isLightContent() ? R.color.icon_color : 0); } diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java index 50f0248430..92702acdc1 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java @@ -212,7 +212,7 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA ImageButton options = (ImageButton) row.findViewById(R.id.options); options.setFocusable(false); options.setImageDrawable(((OsmandApplication) activity.getApplication()) - .getIconsCache().getContentIcon(R.drawable.ic_overflow_menu_white)); + .getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white)); options.setVisibility(View.VISIBLE); options.setOnClickListener(new View.OnClickListener() { @Override @@ -223,7 +223,7 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA } if (!favorite.getCategory().isEmpty()) { giImage.setVisibility(View.VISIBLE); - giImage.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_small_group)); + giImage.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_small_group)); } else { giImage.setVisibility(View.GONE); } diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java index 5dbfac9ceb..740459bffc 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java @@ -715,7 +715,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment { } final View ch = row.findViewById(R.id.options); if (!selectionMode) { - ((ImageView) ch).setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_overflow_menu_white)); + ((ImageView) ch).setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white)); ch.setVisibility(View.VISIBLE); ch.setOnClickListener(new View.OnClickListener() { @Override @@ -750,7 +750,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment { if (showOptionsButton) { ImageView options = (ImageView) row.findViewById(R.id.options); options.setFocusable(false); - options.setImageDrawable(getMyApplication().getIconsCache().getContentIcon( + options.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon( R.drawable.ic_overflow_menu_white)); options.setVisibility(View.VISIBLE); options.setOnClickListener(new View.OnClickListener() { diff --git a/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java b/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java index 258166474d..93c494b488 100644 --- a/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java @@ -222,7 +222,7 @@ public class HelpActivity extends OsmandActionBarActivity { convertView = LayoutInflater.from(parent.getContext()).inflate( R.layout.help_to_improve_item, parent, false); TextView feedbackButton = (TextView) convertView.findViewById(R.id.feedbackButton); - Drawable pollIcon = ctx.getIconsCache().getContentIcon(R.drawable.ic_action_message); + Drawable pollIcon = ctx.getIconsCache().getThemedIcon(R.drawable.ic_action_message); feedbackButton.setCompoundDrawablesWithIntrinsicBounds(null, pollIcon, null, null); feedbackButton.setOnClickListener(new View.OnClickListener() { @Override @@ -233,7 +233,7 @@ public class HelpActivity extends OsmandActionBarActivity { }); TextView contactUsButton = (TextView) convertView.findViewById(R.id.contactUsButton); Drawable contactUsIcon = - ctx.getIconsCache().getContentIcon(R.drawable.ic_action_message); + ctx.getIconsCache().getThemedIcon(R.drawable.ic_action_message); contactUsButton.setCompoundDrawablesWithIntrinsicBounds(null, contactUsIcon, null, null); final String email = ctx.getString(R.string.support_email); @@ -396,7 +396,7 @@ public class HelpActivity extends OsmandActionBarActivity { if (menuItem.getIcon() != -1) { leftImageView.setVisibility(View.VISIBLE); leftImageView.setImageDrawable(context.getIconsCache() - .getContentIcon(menuItem.getIcon())); + .getThemedIcon(menuItem.getIcon())); } else { leftImageView.setVisibility(View.GONE); } diff --git a/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java b/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java index 89e0fbf147..01355fda80 100644 --- a/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java @@ -253,7 +253,7 @@ public class IntermediatePointsDialog { } else { int icon = position == intermediates.size() - 1? R.drawable.ic_action_target: R.drawable.ic_action_intermediate; - tv.setCompoundDrawablesWithIntrinsicBounds(app.getIconsCache().getContentIcon(icon), null, null, null); + tv.setCompoundDrawablesWithIntrinsicBounds(app.getIconsCache().getThemedIcon(icon), null, null, null); tv.setCompoundDrawablePadding(padding); final CheckBox ch = ((CheckBox) v.findViewById(R.id.toggle_item)); ch.setVisibility(View.VISIBLE); diff --git a/OsmAnd/src/net/osmand/plus/activities/OpeningHoursView.java b/OsmAnd/src/net/osmand/plus/activities/OpeningHoursView.java index 7d965c2146..7e7e9f4546 100644 --- a/OsmAnd/src/net/osmand/plus/activities/OpeningHoursView.java +++ b/OsmAnd/src/net/osmand/plus/activities/OpeningHoursView.java @@ -122,7 +122,7 @@ public class OpeningHoursView { } TextView label = (TextView)row.findViewById(R.id.label); ImageView icon = (ImageView)row.findViewById(R.id.remove); - icon.setBackgroundDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_remove_dark)); + icon.setBackgroundDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_remove_dark)); if(selectedRule == position){ label.setTypeface(null, Typeface.BOLD); label.setTextSize(22); diff --git a/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java b/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java index 2da5f2ad50..27a27ff4ea 100644 --- a/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java @@ -14,7 +14,6 @@ import android.widget.CompoundButton; import android.widget.ImageView; import android.widget.TextView; -import net.osmand.plus.IconsCache; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; @@ -128,7 +127,7 @@ public class PluginActivity extends OsmandActionBarActivity { Button getButton = (Button)findViewById(R.id.plugin_get); Button settingsButton = (Button)findViewById(R.id.plugin_settings); settingsButton.setCompoundDrawablesWithIntrinsicBounds( - getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_settings), + getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_settings), null, null, null); View installHeader = findViewById(R.id.plugin_install_header); @@ -138,7 +137,7 @@ public class PluginActivity extends OsmandActionBarActivity { settingsButton.setVisibility(View.GONE); installHeader.setVisibility(View.VISIBLE); View worldGlobeIcon = installHeader.findViewById(R.id.ic_world_globe); - Drawable worldGlobeDrawable = getMyApplication().getIconsCache().getContentIcon( + Drawable worldGlobeDrawable = getMyApplication().getIconsCache().getThemedIcon( R.drawable.ic_world_globe_dark); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { worldGlobeIcon.setBackground(worldGlobeDrawable); diff --git a/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java b/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java index 4325ce9d2c..f2c6966118 100644 --- a/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java @@ -1,8 +1,5 @@ package net.osmand.plus.activities; -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.OsmandPlugin; -import net.osmand.plus.R; import android.app.Activity; import android.content.Intent; import android.content.res.TypedArray; @@ -17,6 +14,10 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandPlugin; +import net.osmand.plus.R; + public class PluginsActivity extends OsmandListActivity { public static final int ACTIVE_PLUGINS_LIST_MODIFIED = 1; @@ -121,7 +122,7 @@ public class PluginsActivity extends OsmandListActivity { ImageView pluginOptions = (ImageView) view.findViewById(R.id.plugin_options); - pluginOptions.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_overflow_menu_white)); + pluginOptions.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white)); pluginOptions.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java b/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java index 3439f65631..4783142d6a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/AppModeDialog.java @@ -83,7 +83,7 @@ public class AppModeDialog { iv.setImageDrawable(ctx.getIconsCache().getIcon(mode.getSmallIconDark(), !nightMode)); AndroidUtils.setBackground(ctx, iv, nightMode, R.drawable.dashboard_button_light, R.drawable.dashboard_button_dark); } else { - iv.setImageDrawable(ctx.getIconsCache().getContentIcon(mode.getSmallIconDark())); + iv.setImageDrawable(ctx.getIconsCache().getThemedIcon(mode.getSmallIconDark())); } tb.findViewById(R.id.selection).setVisibility(View.INVISIBLE); } diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java index c24d89aed9..95e8b15671 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java @@ -1,15 +1,5 @@ package net.osmand.plus.activities.search; -import net.osmand.access.AccessibleToast; -import net.osmand.data.LatLon; -import net.osmand.data.PointDescription; -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.OsmandSettings; -import net.osmand.plus.R; -import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.helpers.FileNameTranslationHelper; -import net.osmand.plus.resources.RegionAddressRepository; -import net.osmand.util.Algorithms; import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; @@ -28,6 +18,17 @@ import android.widget.RadioGroup; import android.widget.TextView; import android.widget.Toast; +import net.osmand.access.AccessibleToast; +import net.osmand.data.LatLon; +import net.osmand.data.PointDescription; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandSettings; +import net.osmand.plus.R; +import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.helpers.FileNameTranslationHelper; +import net.osmand.plus.resources.RegionAddressRepository; +import net.osmand.util.Algorithms; + public class SearchAddressFragment extends Fragment { public static final String SELECT_ADDRESS_POINT_INTENT_KEY = "SELECT_ADDRESS_POINT_INTENT_KEY"; @@ -177,7 +178,7 @@ public class SearchAddressFragment extends Fragment { } }); OsmandApplication app = getApplication(); - Drawable icon = getApplication().getIconsCache().getContentIcon(R.drawable.ic_action_remove_dark); + Drawable icon = getApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_remove_dark); ((ImageView)findViewById(R.id.ResetBuilding)).setBackgroundDrawable(icon); findViewById(R.id.ResetBuilding).setOnClickListener(new View.OnClickListener(){ @Override diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java index e109514e9a..784f2370b0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java @@ -200,7 +200,7 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA final PopupMenu optionsMenu = new PopupMenu(getActivity(), v); MenuItem item = optionsMenu.getMenu().add( R.string.shared_string_remove).setIcon( - getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_delete_dark)); + getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_delete_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -239,7 +239,7 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA DashLocationFragment.updateLocationView(!searchAroundLocation, location, heading, direction, distanceText, historyEntry.getLat(), historyEntry.getLon(), screenOrientation, getMyApplication(), getActivity()); ImageButton options = (ImageButton) row.findViewById(R.id.options); - options.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_overflow_menu_white)); + options.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white)); options.setVisibility(View.VISIBLE); options.setOnClickListener(new View.OnClickListener() { @Override @@ -268,13 +268,13 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA PointDescription pd = historyEntry.getName(); nameText.setText(pd.getSimpleName(activity, false), BufferType.SPANNABLE); ImageView icon = ((ImageView) row.findViewById(R.id.icon)); - icon.setImageDrawable(ic.getContentIcon(getItemIcon(historyEntry.getName()))); + icon.setImageDrawable(ic.getThemedIcon(getItemIcon(historyEntry.getName()))); String typeName = historyEntry.getName().getTypeName(); if (typeName != null && !typeName.isEmpty()) { ImageView group = (ImageView) row.findViewById(R.id.type_name_icon); group.setVisibility(View.VISIBLE); - group.setImageDrawable(ic.getContentIcon(R.drawable.ic_small_group)); + group.setImageDrawable(ic.getThemedIcon(R.drawable.ic_small_group)); ((TextView) row.findViewById(R.id.type_name)).setText(typeName); } else { row.findViewById(R.id.type_name_icon).setVisibility(View.GONE); diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java index 3fa14db227..46fa8d11cb 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java @@ -244,9 +244,9 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa }); ((EditText)findViewById(R.id.searchEditText)).setHint(R.string.filter_poi_hint); ((ImageView)findViewById(R.id.search_icon)).setImageDrawable( - getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_filter_dark)); + getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_filter_dark)); ((ImageView) findViewById(R.id.options)). - setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_overflow_menu_white)); + setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white)); findViewById(R.id.options).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -336,7 +336,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa final PoiUIFilter f = this.filter; MenuItem item = optionsMenu.getMenu().add(R.string.shared_string_edit) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_edit_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_edit_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -367,7 +367,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa private void addFilter(PopupMenu optionsMenu, final String value) { IconsCache iconsCache = getMyApplication().getIconsCache(); MenuItem item = optionsMenu.getMenu().add(getString(R.string.search_poi_filter) + " " + value) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_filter_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_filter_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java index dd944dead9..5a723a1b96 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java @@ -69,7 +69,7 @@ public class SearchPoiFilterFragment extends OsmAndListFragment implements Searc v.findViewById(R.id.SearchFilterLayout).setVisibility(View.VISIBLE); ((EditText)v.findViewById(R.id.searchEditText)).setHint(R.string.search_poi_category_hint); ((ImageView)v.findViewById(R.id.search_icon)).setImageDrawable( - getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_search_dark)); + getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_search_dark)); setupSearchEditText((EditText) v.findViewById(R.id.searchEditText)); setupOptions((ImageView) v.findViewById(R.id.options)); @@ -78,7 +78,7 @@ public class SearchPoiFilterFragment extends OsmAndListFragment implements Searc } private void setupOptions(ImageView options) { - options.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_overflow_menu_white)); + options.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white)); options.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -332,7 +332,7 @@ public class SearchPoiFilterFragment extends OsmAndListFragment implements Searc final PopupMenu optionsMenu = new PopupMenu(getActivity(), v); MenuItem item = optionsMenu.getMenu().add(R.string.poi_filter_custom_filter) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_filter_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_filter_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenu.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenu.java index 6a2c8e36bc..6bf4e58025 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenu.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteRecordingMenu.java @@ -2,7 +2,6 @@ package net.osmand.plus.audionotes; import android.os.Handler; import android.util.DisplayMetrics; -import android.util.Log; import android.view.SurfaceView; import android.view.View; import android.view.ViewGroup; @@ -132,7 +131,7 @@ public class AudioVideoNoteRecordingMenu { ImageView leftButtonIcon = (ImageView) view.findViewById(R.id.leftButtonIcon); View leftButtonView = view.findViewById(R.id.leftButtonView); if (recording.getType() != AVActionType.REC_AUDIO) { - leftButtonIcon.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_minimize)); + leftButtonIcon.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_minimize)); TextView showHideText = (TextView) view.findViewById(R.id.leftButtonText); showHideText.setText(showViewfinder ? view.getResources().getString(R.string.shared_string_hide) : view.getResources().getString(R.string.shared_string_show)); @@ -156,14 +155,14 @@ public class AudioVideoNoteRecordingMenu { switch (recording.getType()) { case REC_AUDIO: case REC_VIDEO: - recIcon.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_rec_stop)); + recIcon.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_rec_stop)); recText.setText(view.getResources().getString(R.string.shared_string_control_stop)); recText.setVisibility(View.VISIBLE); updateDuration(); timeView.setVisibility(View.VISIBLE); break; case REC_PHOTO: - recIcon.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_photo_dark)); + recIcon.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_photo_dark)); recText.setVisibility(View.GONE); timeView.setVisibility(View.INVISIBLE); break; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java index 436c469a08..f60fb6941e 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java @@ -92,7 +92,7 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment { getNoteView(recording, view, getMyApplication()); ((ImageView) view.findViewById(R.id.play)).setImageDrawable(getMyApplication().getIconsCache() - .getContentIcon(R.drawable.ic_play_dark)); + .getThemedIcon(R.drawable.ic_play_dark)); view.findViewById(R.id.play).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java index 0e9d2aadd6..147502fe4c 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java @@ -374,7 +374,7 @@ public class NotesFragment extends OsmAndListFragment { final CheckBox ch = (CheckBox) row.findViewById(R.id.check_local_index); ImageButton options = (ImageButton) row.findViewById(R.id.options); - options.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_overflow_menu_white)); + options.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white)); if(selectionMode) { options.setVisibility(View.GONE); ch.setVisibility(View.VISIBLE); @@ -437,9 +437,9 @@ public class NotesFragment extends OsmAndListFragment { boolean isPhoto = recording.isPhoto(); Drawable playIcon; if (isPhoto) { - playIcon = getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_view); + playIcon = getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_view); } else { - playIcon = getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_play_dark); + playIcon = getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_play_dark); } item = optionsMenu.getMenu().add(isPhoto ? R.string.watch : R.string.recording_context_menu_play) .setIcon(playIcon); @@ -452,7 +452,7 @@ public class NotesFragment extends OsmAndListFragment { }); item = optionsMenu.getMenu().add(R.string.shared_string_show_on_map).setIcon( - iconsCache.getContentIcon(R.drawable.ic_show_on_map)); + iconsCache.getThemedIcon(R.drawable.ic_show_on_map)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -462,7 +462,7 @@ public class NotesFragment extends OsmAndListFragment { }); item = optionsMenu.getMenu().add(R.string.shared_string_share) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_gshare_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_gshare_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -486,7 +486,7 @@ public class NotesFragment extends OsmAndListFragment { }); item = optionsMenu.getMenu().add(R.string.shared_string_rename) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_edit_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_edit_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -496,7 +496,7 @@ public class NotesFragment extends OsmAndListFragment { }); item = optionsMenu.getMenu().add(R.string.recording_context_menu_delete) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_delete_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_delete_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { diff --git a/OsmAnd/src/net/osmand/plus/base/BaseOsmAndDialogFragment.java b/OsmAnd/src/net/osmand/plus/base/BaseOsmAndDialogFragment.java index 16ead80c68..4485648629 100644 --- a/OsmAnd/src/net/osmand/plus/base/BaseOsmAndDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/BaseOsmAndDialogFragment.java @@ -48,7 +48,7 @@ public class BaseOsmAndDialogFragment extends DialogFragment { } protected Drawable getPaintedContentIcon(@DrawableRes int id, @ColorInt int color){ - return getIconsCache().getPaintedContentIcon(id, color); + return getIconsCache().getPaintedIcon(id, color); } protected Drawable getIcon(@DrawableRes int id, @ColorRes int colorId){ @@ -56,7 +56,7 @@ public class BaseOsmAndDialogFragment extends DialogFragment { } protected Drawable getContentIcon(@DrawableRes int id){ - return getIconsCache().getContentIcon(id); + return getIconsCache().getThemedIcon(id); } protected void setThemedDrawable(View parent, @IdRes int viewId, @DrawableRes int iconId) { diff --git a/OsmAnd/src/net/osmand/plus/base/BaseOsmAndFragment.java b/OsmAnd/src/net/osmand/plus/base/BaseOsmAndFragment.java index 58eb5dad3a..dfb2aab34f 100644 --- a/OsmAnd/src/net/osmand/plus/base/BaseOsmAndFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/BaseOsmAndFragment.java @@ -33,7 +33,7 @@ public class BaseOsmAndFragment extends Fragment { } protected Drawable getPaintedContentIcon(@DrawableRes int id, @ColorInt int color){ - return getIconsCache().getPaintedContentIcon(id, color); + return getIconsCache().getPaintedIcon(id, color); } protected Drawable getIcon(@DrawableRes int id, @ColorRes int colorId){ @@ -41,7 +41,7 @@ public class BaseOsmAndFragment extends Fragment { } protected Drawable getContentIcon(@DrawableRes int id){ - return getIconsCache().getContentIcon(id); + return getIconsCache().getThemedIcon(id); } protected void setThemedDrawable(View parent, @IdRes int viewId, @DrawableRes int iconId) { diff --git a/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java index f002223a31..d799a04fb0 100644 --- a/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/BottomSheetDialogFragment.java @@ -60,7 +60,7 @@ public abstract class BottomSheetDialogFragment extends DialogFragment { } protected Drawable getContentIcon(@DrawableRes int drawableRes) { - return getMyApplication().getIconsCache().getContentIcon(drawableRes); + return getMyApplication().getIconsCache().getThemedIcon(drawableRes); } } diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashErrorFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashErrorFragment.java index c8a5cfe1f5..8679cb4e1e 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashErrorFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashErrorFragment.java @@ -49,7 +49,7 @@ public class DashErrorFragment extends DashBaseFragment { String msg = MessageFormat.format(getString(R.string.previous_run_crashed), OsmandApplication.EXCEPTION_PATH); Typeface typeface = FontCache.getRobotoMedium(getActivity()); ImageView iv = ((ImageView) view.findViewById(R.id.error_icon)); - iv.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_crashlog)); + iv.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_crashlog)); TextView message = ((TextView) view.findViewById(R.id.error_header)); message.setTypeface(typeface); message.setText(msg); diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java index 2b9bee05c1..67a36dfd53 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java @@ -105,7 +105,7 @@ public class DashFavoritesFragment extends DashLocationFragment { ImageView groupImage = (ImageView)view.findViewById(R.id.group_image); if (point.getCategory().length() > 0) { ((TextView) view.findViewById(R.id.group_name)).setText(point.getCategory()); - groupImage.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_small_group)); + groupImage.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_small_group)); } else { groupImage.setVisibility(View.GONE); } @@ -120,7 +120,7 @@ public class DashFavoritesFragment extends DashLocationFragment { name.setTypeface(Typeface.DEFAULT, point.isVisible() ? Typeface.NORMAL : Typeface.ITALIC); view.findViewById(R.id.navigate_to).setVisibility(View.VISIBLE); - ((ImageView) view.findViewById(R.id.navigate_to)).setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_gdirections_dark)); + ((ImageView) view.findViewById(R.id.navigate_to)).setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_gdirections_dark)); view.findViewById(R.id.navigate_to).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashNavigationFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashNavigationFragment.java index cce745f16c..12e3c39f40 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashNavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashNavigationFragment.java @@ -76,7 +76,7 @@ public class DashNavigationFragment extends DashBaseFragment { name.setText(routingHelper.getGeneralRouteInformation()); icon.setImageDrawable(getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_start_navigation, R.color.color_myloc_distance)); - cancel.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_remove_dark) + cancel.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_remove_dark) ); cancel.setOnClickListener(new OnClickListener() { @@ -109,8 +109,8 @@ public class DashNavigationFragment extends DashBaseFragment { private void updatePlayButton(final RoutingHelper routingHelper, final MapActivity map, final ImageView play) { boolean toContinueNavigation = routingHelper.isRoutePlanningMode(); - play.setImageDrawable(getMyApplication().getIconsCache().getContentIcon( - toContinueNavigation? R.drawable.ic_play_dark : R.drawable.ic_pause ) + play.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon( + toContinueNavigation ? R.drawable.ic_play_dark : R.drawable.ic_pause) ); play.setContentDescription(getString(toContinueNavigation ? R.string.continue_navigation : R.string.pause_navigation)); diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java index 06293cfa9e..daea794f1c 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java @@ -96,7 +96,7 @@ public class DashRecentsFragment extends DashLocationFragment { SearchHistoryFragment.udpateHistoryItem(historyEntry, view, loc, getActivity(), getMyApplication()); view.findViewById(R.id.divider).setVisibility(View.VISIBLE); view.findViewById(R.id.navigate_to).setVisibility(View.VISIBLE); - ((ImageView) view.findViewById(R.id.navigate_to)).setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_gdirections_dark)); + ((ImageView) view.findViewById(R.id.navigate_to)).setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_gdirections_dark)); view.findViewById(R.id.navigate_to).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java index 261be06acf..de22aa7425 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java @@ -161,7 +161,7 @@ public class DashWaypointsFragment extends DashLocationFragment { final boolean optionsVisible = (SHOW_ALL && getMyApplication().getTargetPointsHelper().getIntermediatePoints().size() > 0); options.setImageDrawable(getMyApplication().getIconsCache(). - getContentIcon(optionsVisible ? R.drawable.ic_overflow_menu_white : + getThemedIcon(optionsVisible ? R.drawable.ic_overflow_menu_white : R.drawable.ic_action_remove_dark)); options.setOnClickListener(new View.OnClickListener() { @Override @@ -176,7 +176,7 @@ public class DashWaypointsFragment extends DashLocationFragment { ImageButton navigate = ((ImageButton)view.findViewById(R.id.navigate_to)); navigate.setImageDrawable(getMyApplication().getIconsCache(). - getContentIcon(R.drawable.ic_action_gdirections_dark)); + getThemedIcon(R.drawable.ic_action_gdirections_dark)); navigate.setVisibility(target? View.VISIBLE : View.GONE); navigate.setOnClickListener(new View.OnClickListener() { @Override @@ -241,7 +241,7 @@ public class DashWaypointsFragment extends DashLocationFragment { final int ind = target ? allTargets.size() - 1 : point.index; item = optionsMenu.getMenu().add(R.string.waypoint_visit_before) .setIcon(getMyApplication().getIconsCache(). - getContentIcon(R.drawable.ic_action_up_dark)); + getThemedIcon(R.drawable.ic_action_up_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -256,7 +256,7 @@ public class DashWaypointsFragment extends DashLocationFragment { if (!target) { item = optionsMenu.getMenu().add(R.string.waypoint_visit_after) .setIcon(getMyApplication().getIconsCache(). - getContentIcon(R.drawable.ic_action_down_dark)); + getThemedIcon(R.drawable.ic_action_down_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -271,7 +271,7 @@ public class DashWaypointsFragment extends DashLocationFragment { } item = optionsMenu.getMenu().add( R.string.shared_string_remove).setIcon(getMyApplication().getIconsCache(). - getContentIcon(R.drawable.ic_action_remove_dark)); + getThemedIcon(R.drawable.ic_action_remove_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { diff --git a/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java b/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java index 07f3159fd7..b7d03ebe2d 100644 --- a/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java +++ b/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java @@ -40,8 +40,8 @@ public class DashSimulateFragment extends DashBaseFragment { ((TextView) getView().findViewById(R.id.name)).setText(routeAnimating ? R.string.animate_route_off : R.string.animate_route); ((ImageButton) getView().findViewById(R.id.stop)).setImageDrawable( - !routeAnimating ? getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_play_dark) - : getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_rec_stop)); + !routeAnimating ? getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_play_dark) + : getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_rec_stop)); } diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ErrorBottomSheetDialog.java b/OsmAnd/src/net/osmand/plus/dialogs/ErrorBottomSheetDialog.java index 6a6c45ee50..c26618b040 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ErrorBottomSheetDialog.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ErrorBottomSheetDialog.java @@ -36,7 +36,7 @@ public class ErrorBottomSheetDialog extends BottomSheetDialogFragment { String msg = MessageFormat.format(getString(R.string.previous_run_crashed), OsmandApplication.EXCEPTION_PATH); Typeface typeface = FontCache.getRobotoMedium(getActivity()); ImageView iv = ((ImageView) view.findViewById(R.id.error_icon)); - iv.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_crashlog)); + iv.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_crashlog)); TextView message = ((TextView) view.findViewById(R.id.error_header)); message.setTypeface(typeface); message.setText(msg); diff --git a/OsmAnd/src/net/osmand/plus/download/ui/DownloadGroupViewHolder.java b/OsmAnd/src/net/osmand/plus/download/ui/DownloadGroupViewHolder.java index a95e75a6f4..34643969bd 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/DownloadGroupViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/DownloadGroupViewHolder.java @@ -29,15 +29,15 @@ public class DownloadGroupViewHolder { Drawable iconLeft; if (group.getType() == DownloadResourceGroup.DownloadResourceGroupType.VOICE_REC || group.getType() == DownloadResourceGroup.DownloadResourceGroupType.VOICE_TTS) { - iconLeft = ctx.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_volume_up); + iconLeft = ctx.getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_volume_up); } else { IconsCache cache = ctx.getMyApplication().getIconsCache(); if (isParentWorld(group) || isParentWorld(group.getParentGroup())) { - iconLeft = cache.getContentIcon(R.drawable.ic_world_globe_dark); + iconLeft = cache.getThemedIcon(R.drawable.ic_world_globe_dark); } else { DownloadResourceGroup ggr = group .getSubGroupById(DownloadResourceGroup.DownloadResourceGroupType.REGION_MAPS.getDefaultId()); - iconLeft = cache.getContentIcon(R.drawable.ic_map); + iconLeft = cache.getThemedIcon(R.drawable.ic_map); if (ggr != null && ggr.getIndividualResources() != null) { IndexItem item = null; for (IndexItem ii : ggr.getIndividualResources()) { diff --git a/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java index 5e0021c986..501bbba709 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java @@ -269,15 +269,15 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow Drawable iconLeft; if (group.getType() == DownloadResourceGroupType.VOICE_REC || group.getType() == DownloadResourceGroupType.VOICE_TTS) { - iconLeft = ctx.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_volume_up); + iconLeft = ctx.getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_volume_up); } else { IconsCache cache = ctx.getMyApplication().getIconsCache(); if (isParentWorld(group) || isParentWorld(group.getParentGroup())) { - iconLeft = cache.getContentIcon(R.drawable.ic_world_globe_dark); + iconLeft = cache.getThemedIcon(R.drawable.ic_world_globe_dark); } else { DownloadResourceGroup ggr = group .getSubGroupById(DownloadResourceGroupType.REGION_MAPS.getDefaultId()); - iconLeft = cache.getContentIcon(R.drawable.ic_map); + iconLeft = cache.getThemedIcon(R.drawable.ic_map); if (ggr != null && ggr.getIndividualResources() != null) { IndexItem item = null; for (IndexItem ii : ggr.getIndividualResources()) { diff --git a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java index 4df3ee6e8b..628bcda87c 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java @@ -350,7 +350,7 @@ public class ItemViewHolder { final File fl = indexItem.getTargetFile(context.getMyApplication()); if (fl.exists()) { item = optionsMenu.getMenu().add(R.string.shared_string_remove).setIcon( - context.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_remove_dark)); + context.getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_remove_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -386,7 +386,7 @@ public class ItemViewHolder { }); } item = optionsMenu.getMenu().add(R.string.shared_string_download) - .setIcon(context.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_import)); + .setIcon(context.getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_import)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -399,10 +399,10 @@ public class ItemViewHolder { } private Drawable getContentIcon(DownloadActivity context, int resourceId) { - return context.getMyApplication().getIconsCache().getContentIcon(resourceId); + return context.getMyApplication().getIconsCache().getThemedIcon(resourceId); } private Drawable getContentIcon(DownloadActivity context, int resourceId, int color) { - return context.getMyApplication().getIconsCache().getPaintedContentIcon(resourceId, color); + return context.getMyApplication().getIconsCache().getPaintedIcon(resourceId, color); } } diff --git a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java index 33137b0549..47f81ca608 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java @@ -1062,7 +1062,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement public void bindLocalIndexInfo(final LocalIndexInfo child) { options.setImageDrawable(ctx.getMyApplication().getIconsCache() - .getContentIcon(R.drawable.ic_overflow_menu_white)); + .getThemedIcon(R.drawable.ic_overflow_menu_white)); options.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -1138,7 +1138,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement } private Drawable getContentIcon(DownloadActivity context, int resourceId) { - return context.getMyApplication().getIconsCache().getContentIcon(resourceId); + return context.getMyApplication().getIconsCache().getThemedIcon(resourceId); } private Drawable getContentIcon(DownloadActivity context, int resourceId, int colorId) { @@ -1156,7 +1156,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement MenuItem item; if ((info.getType() == LocalIndexType.MAP_DATA) || (info.getType() == LocalIndexType.DEACTIVATED)) { item = optionsMenu.getMenu().add(restore ? R.string.local_index_mi_restore : R.string.local_index_mi_backup) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_type_archive)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_type_archive)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -1167,7 +1167,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement } item = optionsMenu.getMenu().add(R.string.shared_string_rename) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_edit_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_edit_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -1178,7 +1178,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement final IndexItem update = filesToUpdate.get(info.getFileName()); if (update != null) { item = optionsMenu.getMenu().add(R.string.shared_string_download) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_import)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_import)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -1189,7 +1189,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement } item = optionsMenu.getMenu().add(R.string.shared_string_delete) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_delete_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_delete_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { diff --git a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java index 1d24972319..2945f230a0 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java +++ b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java @@ -66,7 +66,7 @@ public class AvoidSpecificRoads { final RouteDataObject obj = getItem(position); v.findViewById(R.id.all_points).setVisibility(View.GONE); ((ImageView) v.findViewById(R.id.waypoint_icon)).setImageDrawable( - app.getIconsCache().getContentIcon(R.drawable.ic_action_road_works_dark)); + app.getIconsCache().getThemedIcon(R.drawable.ic_action_road_works_dark)); double dist = MapUtils.getDistance(mapLocation, MapUtils.get31LatitudeY(obj.getPoint31YTile(0)), MapUtils.get31LongitudeX(obj.getPoint31XTile(0))); ((TextView) v.findViewById(R.id.waypoint_dist)).setText(OsmAndFormatter.getFormattedDistance((float) dist, app)); @@ -74,7 +74,7 @@ public class AvoidSpecificRoads { ((TextView) v.findViewById(R.id.waypoint_text)).setText(getText(obj)); ImageButton remove = (ImageButton) v.findViewById(R.id.info_close); remove.setVisibility(View.VISIBLE); - remove.setImageDrawable(app.getIconsCache().getContentIcon( + remove.setImageDrawable(app.getIconsCache().getThemedIcon( R.drawable.ic_action_remove_dark)); remove.setOnClickListener(new View.OnClickListener() { diff --git a/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java index c260a06986..8773d5464b 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java @@ -345,7 +345,7 @@ public class MapMarkerDialogHelper { DirectionsDialogs.setupPopUpMenuIcon(optionsMenu); MenuItem item; item = optionsMenu.getMenu().add(R.string.shared_string_clear) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_delete_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_delete_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -373,7 +373,7 @@ public class MapMarkerDialogHelper { if (!sorted) { item = optionsMenu.getMenu().add(R.string.shared_string_reverse_order).setIcon( - iconsCache.getContentIcon(R.drawable.ic_action_undo_dark)); + iconsCache.getThemedIcon(R.drawable.ic_action_undo_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -389,7 +389,7 @@ public class MapMarkerDialogHelper { } item = optionsMenu.getMenu().add(R.string.shared_string_save_as_gpx).setIcon( - iconsCache.getContentIcon(R.drawable.ic_action_save)); + iconsCache.getThemedIcon(R.drawable.ic_action_save)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -433,7 +433,7 @@ public class MapMarkerDialogHelper { MenuItem item; item = optionsMenu.getMenu().add( R.string.shared_string_remove).setIcon(app.getIconsCache(). - getContentIcon(R.drawable.ic_action_remove_dark)); + getThemedIcon(R.drawable.ic_action_remove_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index 186c16ccb9..ae1f64aafe 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -434,7 +434,7 @@ public class WaypointDialogHelper { if (hasActivePoints) { item = optionsMenu.getMenu().add( R.string.intermediate_items_sort_by_distance).setIcon(app.getIconsCache(). - getContentIcon(R.drawable.ic_sort_waypoint_dark)); + getThemedIcon(R.drawable.ic_sort_waypoint_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -445,7 +445,7 @@ public class WaypointDialogHelper { }); item = optionsMenu.getMenu().add( R.string.switch_start_finish).setIcon(app.getIconsCache(). - getContentIcon(R.drawable.ic_action_undo_dark)); + getThemedIcon(R.drawable.ic_action_undo_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -502,7 +502,7 @@ public class WaypointDialogHelper { MenuItem item; if (index > 0 && count > 1) { item = optionsMenu.getMenu().add(R.string.shared_string_move_up) - .setIcon(app.getIconsCache().getContentIcon(R.drawable.ic_action_arrow_drop_up)); + .setIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_action_arrow_drop_up)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -515,7 +515,7 @@ public class WaypointDialogHelper { } if (index < count - 1 && count > 1) { item = optionsMenu.getMenu().add(R.string.shared_string_move_down) - .setIcon(app.getIconsCache().getContentIcon(R.drawable.ic_action_arrow_drop_down)); + .setIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_action_arrow_drop_down)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -528,7 +528,7 @@ public class WaypointDialogHelper { } item = optionsMenu.getMenu().add(R.string.shared_string_remove) - .setIcon(app.getIconsCache().getContentIcon(R.drawable.ic_action_remove_dark)); + .setIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_action_remove_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java index afd72d79d1..b0b63e8899 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java @@ -161,7 +161,7 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppList TextView statusTextView = (TextView) subscriptionHeader.findViewById(R.id.statusTextView); TextView regionNameTextView = (TextView) subscriptionHeader.findViewById(R.id.regionTextView); statusTextView.setText(getString(R.string.osm_live_active)); - statusIcon.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_done)); + statusIcon.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_done)); String countryName = getSettings().BILLING_USER_COUNTRY.get(); if (Algorithms.isEmpty(countryName)) { @@ -561,7 +561,7 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppList private Drawable getSecondaryColorPaintedIcon(@DrawableRes int drawable) { return fragment.getMyActivity().getMyApplication().getIconsCache() - .getPaintedContentIcon(drawable, secondaryColor); + .getPaintedIcon(drawable, secondaryColor); } } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java index cd9d59711b..d949854790 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/BaseMenuController.java @@ -88,7 +88,7 @@ public abstract class BaseMenuController { protected Drawable getPaintedIcon(int iconId, int color) { IconsCache iconsCache = getMapActivity().getMyApplication().getIconsCache(); - return iconsCache.getPaintedContentIcon(iconId, color); + return iconsCache.getPaintedIcon(iconId, color); } protected Drawable getIcon(int iconId, int colorLightId, int colorDarkId) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/GpxItemMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/GpxItemMenuBuilder.java index 3d03c4a281..d9d567df94 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/GpxItemMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/GpxItemMenuBuilder.java @@ -65,7 +65,7 @@ public class GpxItemMenuBuilder extends MenuBuilder { llIconParams.setMargins(0, 0, gpxSmallIconMargin, 0); llIconParams.gravity = Gravity.CENTER_VERTICAL; icon.setLayoutParams(llIconParams); - icon.setImageDrawable(app.getIconsCache().getContentIcon(iconId)); + icon.setImageDrawable(app.getIconsCache().getThemedIcon(iconId)); ll.addView(icon); } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java index a52aa4a29d..53e1f9002c 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java @@ -406,6 +406,6 @@ public abstract class PointEditorFragment extends Fragment { protected Drawable getPaintedIcon(int iconId, int color) { IconsCache iconsCache = getMapActivity().getMyApplication().getIconsCache(); - return iconsCache.getPaintedContentIcon(iconId, color); + return iconsCache.getPaintedIcon(iconId, color); } } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java index a2f5751c01..b20b90144e 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java @@ -937,7 +937,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { if (row.icon != null) { icon = row.icon; } else if (row.iconId > 0) { - icon = mapActivity.getMyApplication().getIconsCache().getContentIcon(row.iconId); + icon = mapActivity.getMyApplication().getIconsCache().getThemedIcon(row.iconId); } label.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null); label.setCompoundDrawablePadding(AndroidUtils.dpToPx(mapActivity, 16f)); diff --git a/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java index d457877e73..a62e22209a 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java @@ -193,7 +193,7 @@ public class DashTrackFragment extends DashBaseFragment { } }); } else { - showOnMap.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_show_on_map)); + showOnMap.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_show_on_map)); showOnMap.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java index daea9e69b1..76c8554d2a 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java @@ -189,9 +189,9 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { final boolean isRecording = app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get(); ImageButton stop = ((ImageButton) v.findViewById(R.id.stop)); if (isRecording) { - stop.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_rec_stop)); + stop.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_rec_stop)); } else { - stop.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_rec_start)); + stop.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_rec_start)); } stop.setOnClickListener(new View.OnClickListener() { @Override @@ -217,7 +217,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } else { save.setVisibility(View.GONE); } - save.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_gsave_dark)); + save.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_gsave_dark)); ((TextView) v.findViewById(R.id.points_count)).setText(String.valueOf(sth.getPoints())); ((TextView) v.findViewById(R.id.distance)) @@ -225,10 +225,10 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { v.findViewById(R.id.points_icon).setVisibility(View.VISIBLE); ImageView distance = (ImageView) v.findViewById(R.id.distance_icon); distance.setVisibility(View.VISIBLE); - distance.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_small_distance)); + distance.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_small_distance)); ImageView pointsCount = (ImageView) v.findViewById(R.id.points_icon); pointsCount.setVisibility(View.VISIBLE); - pointsCount.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_small_point)); + pointsCount.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_small_point)); } @@ -772,7 +772,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { ImageView icon = (ImageView) v.findViewById(R.id.icon); ImageButton options = (ImageButton) v.findViewById(R.id.options); - options.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_overflow_menu_white)); + options.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white)); options.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -952,7 +952,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { final PopupMenu optionsMenu = new PopupMenu(getActivity(), v); DirectionsDialogs.setupPopUpMenuIcon(optionsMenu); - MenuItem item = optionsMenu.getMenu().add(R.string.shared_string_show_on_map).setIcon(iconsCache.getContentIcon(R.drawable.ic_show_on_map)); + MenuItem item = optionsMenu.getMenu().add(R.string.shared_string_show_on_map).setIcon(iconsCache.getThemedIcon(R.drawable.ic_show_on_map)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -962,7 +962,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { }); item = optionsMenu.getMenu().add(R.string.shared_string_rename) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_edit_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_edit_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -978,7 +978,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } }); item = optionsMenu.getMenu().add(R.string.shared_string_share) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_gshare_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_gshare_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -993,7 +993,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { final OsmEditingPlugin osmEditingPlugin = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class); if (osmEditingPlugin != null && osmEditingPlugin.isActive()) { - item = optionsMenu.getMenu().add(R.string.shared_string_export).setIcon(iconsCache.getContentIcon(R.drawable.ic_action_export)); + item = optionsMenu.getMenu().add(R.string.shared_string_export).setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_export)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -1005,7 +1005,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } item = optionsMenu.getMenu().add(R.string.shared_string_delete) - .setIcon(iconsCache.getContentIcon(R.drawable.ic_action_delete_dark)); + .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_delete_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -1287,7 +1287,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { // ImageView icon = (ImageView) v.findViewById(!isDashItem? R.id.icon : R.id.show_on_map); ImageView icon = (ImageView) v.findViewById(R.id.icon); icon.setVisibility(View.VISIBLE); - icon.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_gpx_track)); + icon.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_gpx_track)); if (child.isCorrupted()) { viewName.setTypeface(Typeface.DEFAULT, Typeface.ITALIC); } else { @@ -1327,13 +1327,13 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { v.findViewById(R.id.unknown_section).setVisibility(View.GONE); ImageView distanceI = (ImageView) v.findViewById(R.id.distance_icon); distanceI.setVisibility(View.VISIBLE); - distanceI.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_small_distance)); + distanceI.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_small_distance)); ImageView pointsI = (ImageView) v.findViewById(R.id.points_icon); pointsI.setVisibility(View.VISIBLE); - pointsI.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_small_point)); + pointsI.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_small_point)); ImageView timeI = (ImageView) v.findViewById(R.id.time_icon); timeI.setVisibility(View.VISIBLE); - timeI.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_small_time)); + timeI.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_small_time)); TextView time = (TextView) v.findViewById(R.id.time); TextView distance = (TextView) v.findViewById(R.id.distance); TextView pointsCount = (TextView) v.findViewById(R.id.points_count); diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java index 9ec4513b99..ac5b43cea8 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java @@ -463,9 +463,9 @@ public class SelectedGPXFragment extends OsmAndListFragment { icon.setVisibility(View.VISIBLE); additional.setVisibility(View.INVISIBLE); if (child.group.getType() == GpxDisplayItemType.TRACK_SEGMENT) { - icon.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_polygom_dark)); + icon.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_polygom_dark)); } else if (child.group.getType() == GpxDisplayItemType.TRACK_ROUTE_POINTS) { - icon.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_markers_dark)); + icon.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_markers_dark)); } else { int groupColor = child.group.getColor(); if (child.locationStart != null) { diff --git a/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java index d62eede901..2eecbdb466 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java @@ -106,7 +106,7 @@ public class DashOsmEditsFragment extends DashBaseFragment OsmEditsFragment.getOsmEditView(view, point, getMyApplication()); ImageButton send = (ImageButton) view.findViewById(R.id.play); - send.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_export)); + send.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_export)); send.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java index e6f867faa7..5565935a78 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java @@ -416,7 +416,7 @@ public class OsmEditsFragment extends OsmAndListFragment } ((ImageView) options).setImageDrawable(getMyApplication().getIconsCache() - .getContentIcon(R.drawable.ic_overflow_menu_white)); + .getThemedIcon(R.drawable.ic_overflow_menu_white)); options.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -454,7 +454,7 @@ public class OsmEditsFragment extends OsmAndListFragment final PopupMenu optionsMenu = new PopupMenu(getActivity(), v); DirectionsDialogs.setupPopUpMenuIcon(optionsMenu); MenuItem item = optionsMenu.getMenu().add(R.string.shared_string_show_on_map). - setIcon(app.getIconsCache().getContentIcon(R.drawable.ic_show_on_map)); + setIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_show_on_map)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -466,7 +466,7 @@ public class OsmEditsFragment extends OsmAndListFragment }); if (info instanceof OpenstreetmapPoint && info.getAction() != Action.DELETE) { item = optionsMenu.getMenu().add(R.string.poi_context_menu_modify_osm_change) - .setIcon(app.getIconsCache().getContentIcon(R.drawable.ic_action_edit_dark)); + .setIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_action_edit_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @@ -482,7 +482,7 @@ public class OsmEditsFragment extends OsmAndListFragment }); } item = optionsMenu.getMenu().add(R.string.shared_string_delete). - setIcon(app.getIconsCache().getContentIcon(R.drawable.ic_action_delete_dark)); + setIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_action_delete_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { @@ -494,7 +494,7 @@ public class OsmEditsFragment extends OsmAndListFragment } }); item = optionsMenu.getMenu().add(R.string.local_openstreetmap_upload). - setIcon(app.getIconsCache().getContentIcon(R.drawable.ic_action_export)); + setIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_action_export)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java index dd67b35024..1c0c0dabc8 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java @@ -274,8 +274,8 @@ public class OsmEditsUploadListenerHelper implements OsmEditsUploadListener { holder.pointNameTextView.setText(pointWrapper.point); IconsCache cache = ((OsmandApplication) context.getApplication()).getIconsCache(); holder.checkedUncheckedImageView.setImageDrawable(pointWrapper.hasError ? - cache.getContentIcon(R.drawable.ic_action_remove_dark) : - cache.getContentIcon(R.drawable.ic_action_done)); + cache.getThemedIcon(R.drawable.ic_action_remove_dark) : + cache.getThemedIcon(R.drawable.ic_action_done)); return row; } diff --git a/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java b/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java index b4f0cc0263..05fa758ca7 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java @@ -152,7 +152,7 @@ public class DashOsMoFragment extends DashLocationFragment implements OsMoGroups ImageButton share = (ImageButton) header.findViewById(R.id.share); IconsCache cache = getMyApplication().getIconsCache(); - share.setImageDrawable(cache.getContentIcon(R.drawable.ic_action_gshare_dark)); + share.setImageDrawable(cache.getThemedIcon(R.drawable.ic_action_gshare_dark)); share.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -291,10 +291,10 @@ public class DashOsMoFragment extends DashLocationFragment implements OsMoGroups ImageView icon = (ImageView) v.findViewById(R.id.icon); if (device.isEnabled()) { icon.setImageDrawable(getMyApplication().getIconsCache(). - getPaintedContentIcon(R.drawable.ic_person, device.getColor())); + getPaintedIcon(R.drawable.ic_person, device.getColor())); } else { icon.setImageDrawable(getMyApplication().getIconsCache(). - getContentIcon(R.drawable.ic_person)); + getThemedIcon(R.drawable.ic_person)); } ((TextView) v.findViewById(R.id.name)).setText(name); diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java index 493db18af8..d9a997c6fd 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java @@ -341,8 +341,6 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements final Drawable srcSignalBig = getResources().getDrawable(R.drawable.mon_osmo_conn_signal_big); // final Drawable srcinactive = getResources().getDrawable(R.drawable.mon_osmo_inactive); final Drawable srcSignalinactive = getResources().getDrawable(R.drawable.mon_osmo_signal_inactive); -// final Drawable srcSignalinactive = app.getIconsCache().getPaintedContentIcon(R.drawable.mon_osmo_signal_inactive, -// Color.LTGRAY); OsMoService service = osMoPlugin.getService(); OsMoTracker tracker = osMoPlugin.getTracker(); @@ -864,7 +862,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements } }; ImageButton info = (ImageButton) v.findViewById(R.id.info); - info.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_gabout_dark)); + info.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_gabout_dark)); info.setOnClickListener(click); warnCreateDesc.setOnClickListener(click); From fb1bec7b7da9d095afe49f1aeb5082db14237c67 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Tue, 5 Apr 2016 18:24:44 +0300 Subject: [PATCH 07/67] Made ContextMenuAdapter use icon cache. --- .../net/osmand/plus/ContextMenuAdapter.java | 33 ++++++++----------- .../src/net/osmand/plus/ContextMenuItem.java | 16 ++++++--- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java index 49738e18e6..8ad753e4ba 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java @@ -2,11 +2,10 @@ package net.osmand.plus; import android.app.Activity; import android.graphics.drawable.Drawable; +import android.support.annotation.ColorRes; import android.support.annotation.DrawableRes; import android.support.annotation.IdRes; import android.support.annotation.LayoutRes; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; import android.support.v7.widget.AppCompatImageView; import android.view.ContextThemeWrapper; import android.view.View; @@ -85,6 +84,7 @@ public class ContextMenuAdapter { @LayoutRes private int layoutId; private final ConfigureMapMenu.OnClickListener changeAppModeListener; + private final IconsCache mIconsCache; public ContextMenuArrayAdapter(Activity context, @LayoutRes int layoutRes, @@ -98,6 +98,7 @@ public class ContextMenuAdapter { this.holoLight = holoLight; this.layoutId = layoutRes; this.changeAppModeListener = changeAppModeListener; + mIconsCache = app.getIconsCache(); } @Override @@ -132,24 +133,19 @@ public class ContextMenuAdapter { tv.setText(item.getTitle()); if (this.layoutId == R.layout.simple_list_menu_item) { - int color = ContextCompat.getColor(getContext(), - holoLight ? R.color.icon_color : R.color.dashboard_subheader_text_dark); - Drawable drawable = ContextCompat.getDrawable(getContext(), item.getIcon()); - Drawable imageId = DrawableCompat.wrap(drawable); - imageId.mutate(); - DrawableCompat.setTint(imageId, color); + @ColorRes + int color = holoLight ? R.color.icon_color : R.color.dashboard_subheader_text_dark; + Drawable drawable = mIconsCache.getIcon(item.getIcon(), color); float density = getContext().getResources().getDisplayMetrics().density; int paddingInPixels = (int) (24 * density); int drawableSizeInPixels = (int) (24 * density); // 32 - imageId.setBounds(0, 0, drawableSizeInPixels, drawableSizeInPixels); - tv.setCompoundDrawables(imageId, null, null, null); + drawable.setBounds(0, 0, drawableSizeInPixels, drawableSizeInPixels); + tv.setCompoundDrawables(drawable, null, null, null); tv.setCompoundDrawablePadding(paddingInPixels); } else { if (item.getIcon() != ContextMenuItem.INVALID_ID) { - Drawable drawable = ContextCompat.getDrawable(getContext(), item.getIcon()); - drawable = DrawableCompat.wrap(drawable); - drawable.mutate(); - DrawableCompat.setTint(drawable, item.getThemedColor(getContext())); + Drawable drawable = mIconsCache.getIcon(item.getIcon(), + item.getThemedColorRes(getContext())); ((AppCompatImageView) convertView.findViewById(R.id.icon)).setImageDrawable(drawable); convertView.findViewById(R.id.icon).setVisibility(View.VISIBLE); } else if (convertView.findViewById(R.id.icon) != null) { @@ -159,12 +155,9 @@ public class ContextMenuAdapter { @DrawableRes int secondaryDrawable = item.getSecondaryIcon(); if (secondaryDrawable != ContextMenuItem.INVALID_ID) { - int color = ContextCompat.getColor(getContext(), - holoLight ? R.color.icon_color : R.color.dashboard_subheader_text_dark); - Drawable drawable = ContextCompat.getDrawable(getContext(), item.getSecondaryIcon()); - drawable = DrawableCompat.wrap(drawable); - drawable.mutate(); - DrawableCompat.setTint(drawable, color); + @ColorRes + int colorRes = holoLight ? R.color.icon_color : R.color.dashboard_subheader_text_dark; + Drawable drawable = mIconsCache.getIcon(item.getSecondaryIcon(), colorRes); ImageView imageView = (ImageView) convertView.findViewById(R.id.secondary_icon); imageView.setImageDrawable(drawable); imageView.setVisibility(View.VISIBLE); diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java index bad571f244..fc0cb2bb17 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java @@ -27,6 +27,7 @@ public class ContextMenuItem { private final int layout; private boolean loading; private final boolean category; + private final boolean skipPaintingWithoutColor; private final int pos; private String description; private final ContextMenuAdapter.ItemClickListener itemClickListener; @@ -42,7 +43,7 @@ public class ContextMenuItem { @LayoutRes int layout, boolean loading, boolean category, - int pos, + boolean skipPaintingWithoutColor, int pos, String description, ContextMenuAdapter.ItemClickListener itemClickListener, ContextMenuAdapter.OnIntegerValueChangedListener integerListener) { @@ -56,6 +57,7 @@ public class ContextMenuItem { this.layout = layout; this.loading = loading; this.category = category; + this.skipPaintingWithoutColor = skipPaintingWithoutColor; this.pos = pos; this.description = description; this.itemClickListener = itemClickListener; @@ -83,7 +85,7 @@ public class ContextMenuItem { @ColorRes public int getThemedColorRes(Context context) { - if (getColorRes() != INVALID_ID) { + if (skipPaintingWithoutColor || getColorRes() != INVALID_ID) { return getColorRes(); } else { return IconsCache.getDefaultColorRes(context); @@ -185,6 +187,7 @@ public class ContextMenuItem { private String mDescription = null; private ContextMenuAdapter.ItemClickListener mItemClickListener = null; private ContextMenuAdapter.OnIntegerValueChangedListener mIntegerListener = null; + private boolean mSkipPaintingWithoutColor; public ItemBuilder setTitleId(@StringRes int titleId, @Nullable Context context) { this.mTitleId = titleId; @@ -260,10 +263,15 @@ public class ContextMenuItem { return this; } + public ItemBuilder setSkipPaintingWithoutColor(boolean skipPaintingWithoutColor) { + mSkipPaintingWithoutColor = skipPaintingWithoutColor; + return this; + } + public ContextMenuItem createItem() { return new ContextMenuItem(mTitleId, mTitle, mIcon, mColorRes, mSecondaryIcon, - mSelected, mProgress, mLayout, mLoading, mIsCategory, mPosition, mDescription, - mItemClickListener, mIntegerListener); + mSelected, mProgress, mLayout, mLoading, mIsCategory, mSkipPaintingWithoutColor, + mPosition, mDescription, mItemClickListener, mIntegerListener); } } } From e953e77ae5daa442742affa41aa14004479118a4 Mon Sep 17 00:00:00 2001 From: xmd5a Date: Tue, 5 Apr 2016 19:02:58 +0300 Subject: [PATCH 08/67] Update strings --- OsmAnd/res/values-ru/strings.xml | 18 +++++++++--------- OsmAnd/res/values/strings.xml | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index c91369e2fd..382ecda196 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -12,7 +12,7 @@ Отображать полигоны Отображать MTB маршруты Выбрать - Скрыть значки POI + Значки POI Конные маршруты Низкое качество Высокое качество @@ -55,7 +55,7 @@ Македонский Западнофризский Албанский (тоскский) - Скрыть планируемые объекты + Планируемые объекты Использовать безопасное подключение к серверу Использовать HTTPS "Этот плагин обеспечивает как наложение контурных линий, так и отображения затеняющего слоя рельефа поверх стандартных карт OsmAnd. Эта функция высоко оценится спортсменами, туристами, путешественниками и всеми, кто заинтересован в рельефной структуре ландшафта.\n\nГлобальные данные (между 70 градусами на севере и 70 градусами на юге) основываются на измерениях SRTM (Shuttle Radar Topography Mission) и ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer) — инструментом визуализации Terra, флагманского спутника Системы Наблюдения Земли NASA. ASTER является результатом совместных усилий NASA, министерства экономики Японии, торговли и промышленности (METI), а также Космических Систем Японии (J-spacesystems). " @@ -1319,16 +1319,16 @@ Нет выбранных файлов GPX. Используйте длительное нажатие для выбора доступного трека. Выбрать для отображения Войти по приглашению - Скрыть строения - Скрыть текст - Скрыть леса и кустарники + Строения + Текст + Леса и кустарники Более подробно Менее подробно Отображать качество дорог Отображать тип покрытия - Скрыть непроезжие дороги + Непроезжие дороги Здания на масштабе 15 - Скрыть ограничения доступа + Ограничения доступа Отображать ограничения доступа Отображать веломаршруты Сбой авторизации @@ -1654,7 +1654,7 @@ Копировать Переместить также файлы данных OsmAnd в новое место назначения? Напечатайте для поиска - Скрыть номера домов + Номера домов Избегать пересечения границы с другой страной Ограничение высоты @@ -1913,7 +1913,7 @@ Циклическая перезапись клипов при превышении заданного объема хранилища Поменять местами пункт отправления и пункт назначения Удалить - Скрыть подземные объекты + Подземные объекты Данные недоступны Загруженные обновления можно удалить и вернуться к первоначальной редакции карты diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 81a1dc12d3..3e97826ed2 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -123,7 +123,7 @@ Status Save changes E-mail address - Hide underground objects + Underground objects Data is not available Remove Read more @@ -132,7 +132,7 @@ Road blocked Select Reverse starting point & destination - Hide POI icons + POI icons Item removed items removed UNDO ALL @@ -220,7 +220,7 @@ Albanian (Tosk) Read more What\'s new in - Hide proposed objects + Proposed objects Update Upload Created OSM POI @@ -348,7 +348,7 @@ Coloring according to route scope Coloring according to OSMC Log Off - Hide house numbers + House numbers Do you want OsmAnd to also copy its data files to the new destination? Maps could not be created in specified directory Copying files failed @@ -702,14 +702,14 @@ Start GPX logging Stop GPX logging Start new segment - Hide buildings - Hide non-vehicle highways - Hide text - Hide wood and scrubs + Buildings + Non-vehicle highways + Text + Wood and scrubs Buildings on zoom 15 More details Fewer details - Hide access restrictions + Access restrictions Show access restrictions Show road quality Show road surface From c6161a71acb1eb23c66ad3e28ec6c8dd4835baff Mon Sep 17 00:00:00 2001 From: jan madsen Date: Tue, 5 Apr 2016 18:11:31 +0200 Subject: [PATCH 09/67] Translated using Weblate (Danish) Currently translated at 100.0% (1956 of 1956 strings) --- OsmAnd/res/values-da/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 2140f802a3..d1e3bd42dc 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -1524,14 +1524,14 @@ " - Oprettelse af en gruppe angiv et navn og udfyld beskrivelsen\n- Fra programmet kan kun oprettes en gruppe af simpel type, læs mere på hjemmesiden https://osmo.mobi/g/new\n- Via en hjemmeside kan administreres en gruppe, til at placere spor og punkter til rådighed for alle\n- Understøtter ikke brugen af en gruppe for kun én bruger, hvis dette ikke er IP-gruppen\n- Private grupper er begrænset til 8 personer\n- Detaljerede vilkår kan altid ses på hjemmesiden OsMo.mobi\n- Brug for særlige vilkår - kontakt support: osmo.mobi@gmail.com " Autorisation fejlede "OsMo autorisation fejl: %1$s.\nDet kan være at tjenesten midlertidig er nede eller registreringen er ududløbet. Fortsæt med en ny registrering?" - Skjul bygninger - Skjul gang- og cykelstier - Skjul tekst - Skjul skov og beplantning + Bygninger + Gang- og cykelstier + Tekst + Skov og beplantning Bygninger på zoomniveau 15 Flere detaljer Færre detaljer - Skjul adgangsbegrænsninger + Adgangsbegrænsninger Vis adgangsbegrænsninger Vis vejkvaliteten Vis vejbelægning @@ -1888,7 +1888,7 @@ Kortlagring Kopier Skal OsmAnd også kopiere datafilerne til den nye placering? - Skjul husnumre + Husnumre Undgå at krydse landegrænser Højdegrænse @@ -2117,7 +2117,7 @@ Opdatering - Skjul foreslåede objekter + Foreslåede objekter Læs mere Hvad er nyt i @@ -2225,7 +2225,7 @@ Emne fjernet Emner slettet FORTRYD ALLE - Skjul IP ikoner + IP ikoner Byt om på startpunkt og destination Antal bidragydere Antal redigeringer @@ -2236,7 +2236,7 @@ Spærret vej Fjern Data er ikke tilgængelig - Skjul underjordiske objekter + Underjordiske objekter Læs mere " OsmAnd Maps & Navigation - find steder på kortet og beregn ruter uden en internetforbindelse. Hent kort for et land, før rejsen og find steder og ruter i et ukendt område. \n\nGrundlæggende indstillinger: From 09eb8ec891d34249ad19e307459de9df53f7638a Mon Sep 17 00:00:00 2001 From: Franco Date: Tue, 5 Apr 2016 18:21:18 +0200 Subject: [PATCH 10/67] Translated using Weblate (Spanish) Currently translated at 100.0% (1956 of 1956 strings) --- OsmAnd/res/values-es-rUS/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml index cd2f09f4db..df4efba641 100644 --- a/OsmAnd/res/values-es-rUS/strings.xml +++ b/OsmAnd/res/values-es-rUS/strings.xml @@ -1,7 +1,7 @@ - Ocultar números de casa + Números de casa Falló al copiar archivos Almacenamiento externo Almacenamiento multiusuario @@ -248,12 +248,12 @@ Nombres locales Hebreo Iniciar nuevo segmento - Ocultar edificios - Ocultar textos + Edificios + Textos Edificios en ampliación 15 Más detalles Menos detalles - Ocultar restricciones de acceso + Restricciones de acceso Mostrar restricciones de acceso Mostrar calidad de las carreteras Mostrar superficie de las carreteras @@ -527,8 +527,8 @@ Parar rastreo en línea Iniciar grabación GPX Parar grabación GPX - Ocultar vías no aptas para vehículos - Ocultar bosques y matorrales + Vías no aptas para vehículos + Bosques y matorrales Error de autorización OsMo: %1$s.\n Puede deberse a que el servicio esté temporalmente caído o que tu registro expiró.\n ¿Quieres realizar un nuevo registro? " - Al crear un grupo, debes darle un nombre y completar la descripción.\n - Desde la aplicación del grupo, sólo se crean con el tipo Simple, lee más en el sitio web https://osmo.mobi/g/new\n - Puedes gestionar un grupo desde un sitio web, para ubicar todas las trazas y puntos disponibles\n - No avalamos el uso de grupos con sólo un usuario, si esto no es el grupo de PDI\n - Los grupos privados se limitan sólo a 8 personas\n - Los detalles sobre términos y condiciones, se encuentran en el sitio web OsMo.mobi\n - Si necesitas condiciones especiales, contacta con el soporte: osmo.mobi@gmail.com " ¡Lee antes de crear un grupo! @@ -1940,7 +1940,7 @@ Leyenda del mapa Actualizar Subir - Ocultar objetos propuestos + Objetos propuestos Leer más Novedades en @@ -2044,7 +2044,7 @@ Elemento quitado elementos borrados DESHACER TODO - Ocultar iconos de PDI + Iconos de PDI Invertir puntos de partida y destino Número de contribuidores Número de ediciones @@ -2055,7 +2055,7 @@ Elegir Quitar Datos no disponibles - Ocultar objetos subterráneos + Objetos subterráneos Leer más " OsmAnd Maps & Navigation (mapas y navegación de OsmAnd), encuentra ubicaciones en el mapa y calcula rutas sin conectarte a Internet. Descarga el mapa de un país antes de viajar para encontrar lugares y rutas en áreas desconocidas.\n\nOpciones básicas:\n• Mapas detallados en 200 países\n• Navegación sin conexión con avisos de voz\n• Búsqueda de direcciones en modo sin conexión\n• Información sobre ubicaciones en el mapa: lugares de interés, cafés, estacionamientos, tiendas\n• Añade tus ubicaciones a los favoritos\n• Navegación en automóvil, bicicleta y caminando\n\nOpciones adicionales:\n• Capacidad para ver y grabar trazas GPX\n• Descripción de Wikipedia en PDI \n• Añade notas de fotos, audios y videos en el mapa From e1d12893965c1112cd4cef90fee82709b8129b88 Mon Sep 17 00:00:00 2001 From: Franco Date: Tue, 5 Apr 2016 18:23:28 +0200 Subject: [PATCH 11/67] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (1956 of 1956 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index 89bc20a4d6..450627bdce 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -1,7 +1,7 @@ - Ocultar números de casa + Números de casa Falló al copiar archivos Almacenamiento externo Almacenamiento multiusuario @@ -248,12 +248,12 @@ Nombres locales Hebreo Iniciar nuevo segmento - Ocultar edificios - Ocultar textos + Edificios + Textos Edificios en ampliación 15 Más detalles Menos detalles - Ocultar restricciones de acceso + Restricciones de acceso Mostrar restricciones de acceso Mostrar calidad de los caminos Mostrar superficie de los caminos @@ -527,8 +527,8 @@ Parar rastreo en línea Iniciar grabación GPX Parar grabación GPX - Ocultar vías no aptas para vehículos - Ocultar bosques y matorrales + Vías no aptas para vehículos + Bosques y matorrales Error de autorización OsMo: %1$s.\n Puede deberse a que el servicio esté temporalmente caído o que tu registro expiró.\n ¿Quieres realizar un nuevo registro? " - Al crear un grupo, debes darle un nombre y completar la descripción.\n - Desde la aplicación, los grupo sólo se crean con el tipo Simple, lee más en el sitio web https://osmo.mobi/g/new\n - Puedes gestionar un grupo desde un sitio web, para ubicar todas las trazas y puntos disponibles\n - No avalamos el uso de grupos con sólo un usuario, si esto no es el grupo de PDI\n - Los grupos privados se limitan sólo a 8 personas\n - Los detalles sobre términos y condiciones, se encuentran en el sitio web OsMo.mobi\n - Si necesitas condiciones especiales, contacta con el soporte: osmo.mobi@gmail.com " ¡Lee antes de crear un grupo! @@ -1940,7 +1940,7 @@ Leyenda del mapa Actualizar Subir - Ocultar objetos propuestos + Objetos propuestos Leer más Novedades en @@ -2044,7 +2044,7 @@ Elemento quitado elementos borrados DESHACER TODO - Ocultar iconos de PDI + Iconos de PDI Invertir puntos de partida y destino Número de contribuidores Número de ediciones @@ -2055,7 +2055,7 @@ Elegir Quitar Datos no disponibles - Ocultar objetos subterráneos + Objetos subterráneos Leer más " OsmAnd Maps & Navigation (mapas y navegación de OsmAnd), encuentra ubicaciones en el mapa y calcula rutas sin conectarte a Internet. Descarga el mapa de un país antes de viajar para encontrar lugares y rutas en áreas desconocidas.\n\nOpciones básicas:\n• Mapas detallados en 200 países\n• Navegación sin conexión con avisos de voz\n• Búsqueda de direcciones en modo sin conexión\n• Información sobre ubicaciones en el mapa: lugares de interés, cafés, estacionamientos, tiendas\n• Añade tus ubicaciones a los favoritos\n• Navegación en automóvil, bicicleta y caminando\n\nOpciones adicionales:\n• Capacidad para ver y grabar trazas GPX\n• Descripción de Wikipedia en PDI \n• Añade notas de fotos, audios y videos en el mapa From ddb9ba266b27315e70806c58461114294be00ff0 Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Tue, 5 Apr 2016 21:59:05 +0300 Subject: [PATCH 12/67] Fix #2420 (tests included --- .../osmand/router/RouteResultPreparation.java | 11 ++++--- .../test/resources/test_turn_lanes.json | 33 ++++++++++++++++++- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index 64e094645a..602f38036f 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -60,10 +60,13 @@ public class RouteResultPreparation { TurnType t = result.get(i).getTurnType(); // justify turn if (t != null) { - TurnType jt = justifyUTurn(leftSide, result, i, t); - if (jt != null) { - result.get(i).setTurnType(jt); - next = i + 2; + boolean turnOnSameStreet = result.get(i).getObject().id == result.get(next).getObject().id; + if (turnOnSameStreet) { + TurnType jt = justifyUTurn(leftSide, result, i, t); + if (jt != null) { + result.get(i).setTurnType(jt); + next = i + 2; + } } } } diff --git a/OsmAnd-java/test/resources/test_turn_lanes.json b/OsmAnd-java/test/resources/test_turn_lanes.json index 67ea477150..4aed8529a3 100644 --- a/OsmAnd-java/test/resources/test_turn_lanes.json +++ b/OsmAnd-java/test/resources/test_turn_lanes.json @@ -215,10 +215,41 @@ }, "expectedResults": { "14418": "TL, +TL, C, C, TR" + } + }, + { + "testName": "11.Graaf Lodewijkstraat to Graaf Lodewijkstraat u-turn", + "startPoint": { + "latitude": 52.076116774796496, + "longitude": 4.821222126483946 + }, + "endPoint": { + "latitude": 52.075488682963716, + "longitude": 4.821018278598814 + }, + "expectedResults": { + "7352195": null, + "7352546": "+TL;TR" + } + }, + { + "testName": "12.Rembrandtlaan to Rubensstraat u-turn", + "startPoint": { + "latitude": 45.69849708250879, + "longitude": 35.64191635632511 + }, + "endPoint": { + "latitude": 45.699958273396, + "longitude": 35.642077288866005 + }, + "expectedResults": { + "7351364": null, + "7351365": "+TL", + "7351445": "+TL" } }, { - "testName": "11.Figure 8 TL", + "testName": "12.Figure 8 TL", "startPoint": { "latitude": 45.69816447596442, "longitude": 35.74885922431952 From 41153340ad19765ffc78f8516ac3ba7c5547d579 Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Tue, 5 Apr 2016 19:05:21 +0200 Subject: [PATCH 13/67] Translated using Weblate (French) Currently translated at 99.8% (1954 of 1956 strings) --- OsmAnd/res/values-fr/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index f574d77305..5835707b19 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -1484,14 +1484,14 @@ Démarrer l\'enregistrement GPX Arrêter l\'enregistrement GPX Débuter un nouveau segment - Masquer les bâtiments - Masquer les voies non adaptées aux véhicules - Masquer les textes - Masquer la végétation + Bâtiments + Voies non adaptées aux véhicules + Texte + Végétation Bâtiments en zoom 15 Plus détaillé Moins détaillé - Masquer les restrictions d\'accès + Accès restreints Afficher les restrictions d\'accès Afficher la qualité des routes Afficher la surface des routes @@ -1777,7 +1777,7 @@ Stockage de la carte Copier Souhaitez-vous aussi qu\'OsmAnd copie ses fichiers de données vers la nouvelle destination ? - Masquer les numéros dans les rues + Numéros dans les rues Éviter de franchir les frontières entre pays Limite de hauteur @@ -2010,7 +2010,7 @@ Mise à jour Lire plus Quoi de neuf dans - Masquer les objets proposés + Objets proposés Macédonien Frison occidental Tosque @@ -2111,7 +2111,7 @@ Espace maximum alloué pour tous les enregistrements Type Inverser Départ et Destination - Masquer les icônes des PI + Icônes des PI Nombre de contributeurs Nombre de modifications Signaler pour @@ -2121,7 +2121,7 @@ Route barrée Ajouter un laps de temps Donnée indisponible - Cacher les objets souterrains + Objets souterrains Lire la suite Adresse email Statut From 37898dd72a9a724473828231297f619e5adca7a8 Mon Sep 17 00:00:00 2001 From: Franco Date: Tue, 5 Apr 2016 18:22:28 +0200 Subject: [PATCH 14/67] Translated using Weblate (Spanish) Currently translated at 100.0% (1956 of 1956 strings) --- OsmAnd/res/values-es-rUS/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml index df4efba641..684e796cb2 100644 --- a/OsmAnd/res/values-es-rUS/strings.xml +++ b/OsmAnd/res/values-es-rUS/strings.xml @@ -527,7 +527,7 @@ Parar rastreo en línea Iniciar grabación GPX Parar grabación GPX - Vías no aptas para vehículos + Carreteras no aptas para vehículos Bosques y matorrales Error de autorización OsMo: %1$s.\n Puede deberse a que el servicio esté temporalmente caído o que tu registro expiró.\n ¿Quieres realizar un nuevo registro? " - Al crear un grupo, debes darle un nombre y completar la descripción.\n - Desde la aplicación del grupo, sólo se crean con el tipo Simple, lee más en el sitio web https://osmo.mobi/g/new\n - Puedes gestionar un grupo desde un sitio web, para ubicar todas las trazas y puntos disponibles\n - No avalamos el uso de grupos con sólo un usuario, si esto no es el grupo de PDI\n - Los grupos privados se limitan sólo a 8 personas\n - Los detalles sobre términos y condiciones, se encuentran en el sitio web OsMo.mobi\n - Si necesitas condiciones especiales, contacta con el soporte: osmo.mobi@gmail.com " From 6c5678623d71611cd527461def1aa5b80d32fc5b Mon Sep 17 00:00:00 2001 From: josep constanti Date: Tue, 5 Apr 2016 23:18:08 +0200 Subject: [PATCH 15/67] Translated using Weblate (Catalan) Currently translated at 100.0% (1956 of 1956 strings) --- OsmAnd/res/values-ca/strings.xml | 33 +++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index 81b6d2c43b..f899ddc4bf 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -686,7 +686,7 @@ Format d\'horaris d\'obertura no suportat per a l\'edició prioritza distancia Aplicació de navegació OsmAnd - "Amb aquest connector podeu accedir a diferents tipus de mapa (anomenats mosaic o ràster), des de les tessel·les predefinides d\'OpenStreetMap (com Mapnik) a imatges de satèl·lit i capes específiques com mapes meteorològics, climàtics, geològics, de relleu, etc.\n\nQualsevol d\'aquests mapes es pot utilitzar sigui com principal (base) per veure\'s a la vista del mapa de l\'OsmAnd, o com una superposició o sots-posició d\'un altre mapa base (com els mapes d\'OsmAnd habituals en desconnexió). Per fer més visible qualsevol mapa en sots-posició, es pot amagar fàcilment determinats elements dels mapes vectorials de l\'OsmAnd via el menú «Configuració del mapa» a voluntat.\n\nEls mapes de tessel·les es poden obtenir directament de proveïdors en línia, o es poden preparar per un ús fora de línia (cal copiar-los manualment al directori de l\'OsmAnd) com una base de dades sqlite construïda per diferents eines de preparació de mapes de tercers. " + "Amb aquest connector podeu accedir a diferents tipus de mapa (anomenats mosaic o ràster), des de les tessel·les predefinides d\'OpenStreetMap (com Mapnik) a imatges de satèl·lit i capes específiques com mapes meteorològics, climàtics, geològics, de relleu, etc.\n\nQualsevol d\'aquests mapes es pot utilitzar sigui com principal (base) per veure\'s a la vista del mapa de l\'OsmAnd, o com una superposició o sots-posició d\'un altre mapa base (com els mapes d\'OsmAnd habituals en desconnexió). Per fer més visible qualsevol mapa en sots-posició, es pot amagar fàcilment determinats elements dels mapes vectorials de l\'OsmAnd via el menú «Configuració del mapa» a voluntat.\n\nEls mapes de tessel·les es poden obtenir directament de proveïdors en línia, o es poden preparar per un ús fora de línia (cal copiar-los manualment al directori de l\'OsmAnd) com una base de dades SQLite construïda per diferents eines de preparació de mapes de tercers. " Escolliu el canal per reproduir el guiat per veu (depenent del sistema) Renderització dels vectors @@ -1311,14 +1311,14 @@ Cal que ho llegiu abans de crear un grup. Ha fallat l\'autorització S\'ha trobat un error d\'autorització OsMo: %1$s.\n Pot ser per una caiguda temporal del servei o bé pel venciment del vostre usuari.\n Voleu crear un nou usuari nou? - Oculta els edificis - Oculta les vies sense circulació de vehicles - Oculta el text - Oculta els boscos i erms + Edificis + Vies sense circulació de vehicles + Text + Boscos i erms Edificis al detall 15 de zoom Més detalls Menys detalls - Oculta les restriccions d\'accés + Restriccions d\'accés Mostra les restriccions d\'accés Mostra la qualitat de la via Mostra el tipus de superfície de la via @@ -1601,7 +1601,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Memòria interna Emmagatzematge de mapes Copia - Amaga la numeració de finques + Numeració de finques Evita creuar la frontera a un altre pais Límit d\'alçada @@ -1741,7 +1741,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Selecciona categoria Defineix el sistema de mesura de velocitat Mesura de velocitat - mm + nmi Milles marines Quilòmetres per hora Milles per hora @@ -1813,7 +1813,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Contacteu-nos Llegenda del mapa Actualitza - Amaga proposta d\'objectes + Objectes proposats Llegiu-ne més Què hi ha de nou a @@ -1909,7 +1909,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Matí Nit Intercanvi entre punts origen i destinació - Amaga les icones dels PDI + Icones dels PDI Element esborrat elements suprimits DESFÉS-HO TOT @@ -1923,13 +1923,13 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Esborra Podeu esborrar les actualitzacions baixades i tornar a l\'edició original del mapa Via tallada - Amaga elements soterrats + Elements soterrats No es disposa de dades Llegeix més Estatus Desa els canvis Adreça de correu electrònic - " OsmAnd Mapes i Navegació - confecciona rutes i situa ubicacions al mapa sense connexió a Internet. Baixeu un mapa d\'un país abans de viatjar-hi per trobar llocs i rutes en una zona que no us sigui familiar. Opcions bàsiques: • Mapes detallats de 200 països • Navegador sense connexió amb guiatge de veu • Cerca d\'adreces en mode desconnexió • Informació sobre ubicacions al mapa: llocs d\'interès, cafeteries, aparcaments, botigues • Podeu afegir ubicacions als vostres preferits • Opcions addicionals de navegació en els modes Cotxe, Bicicleta i Vianant : • Capacitat de mostrar i gravar traces GPX • Descripcions a la Vikipèdia dels PDI • Afegiu fotografies, àudios i vídeos al mapa • Modes de mapa diurn i nocturn per una conducció més convenient • Informació sobre rutes i parades de transport públic • Rutes ciclistes i camins • Pistes de senderisme per fer turisme a tot el món • Mapes en connexió de nombroses fonts • Informació sobre qualitat del paviment i il·luminació dels carrers • Addició, edició i eliminació de PDI (per usuaris de Openstreetmap.org) • OsMo - monitorització en temps real d\'altres dispositius Aconsegiu un navegador fiable pel vostre país - ja sigui França, Alemanya, Mèxic, Regne Unit, Espanya, Holanda, EE.UU., Rússia, Brasil o qualsevol altre estat. Extensions: • Mapes de contorn i ombrejat del terreny https://goo.gl/7mojP8 Dades de corbes de nivell i visualització de terreny afegits al mapa bàsic OsmAnd . • Mapes d\'esquí https://goo.gl/pX6DxJ La informació sobre pistes d\'esquí, pistes d\'esquí de fons, telecabines i ascensors d\'esquí. • Mapa nàutic https://goo.gl/0hEdxm Estil de mapa especial per veure senyals de navegació nàutica pers fluvials i navegació costera. • Posició de l\'aparcament https://goo.gl/6jxQXF Us ajuda a marcar l\'ubicació del vostre vehícle aparcat i controlar el temps que queda si l\'aparcament té limitació de temps. ¡Manteniu-vos informat! Twitter: https://twitter.com/osmandapp Facebook: https://www.facebook.com/osmandapp Lloc: http://osmand.net Si us cal ajut per l\'aplicació OsmAnd, contacteu amb el nostre equip de suport: support@osmand.net. " + " OsmAnd Mapes i Navegació - troba localitzacions del mapa i calcula rutes sense connexió a Internet. Baixeu un mapa d\'un país abans de viatjar-hi per trobar llocs i rutes en una zona que no us sigui familiar. Opcions bàsiques: • Mapes detallats de 200 països • Navegador sense connexió amb guiatge de veu • Cerca d\'adreces en mode desconnexió • Informació sobre ubicacions al mapa: llocs d\'interès, cafeteries, aparcaments, botigues • Podeu afegir ubicacions als vostres preferits • Opcions addicionals de navegació en els modes Cotxe, Bicicleta i Vianant : • Capacitat de mostrar i gravar traces GPX • Descripcions a la Vikipèdia dels PDI • Afegiu fotografies, àudios i vídeos al mapa • Modes de mapa diurn i nocturn per una conducció més convenient • Informació sobre rutes i parades de transport públic • Rutes ciclistes i camins • Pistes de senderisme per fer turisme a tot el món • Mapes en connexió de nombroses fonts • Informació sobre qualitat del paviment i il·luminació dels carrers • Addició, edició i eliminació de PDI (per usuaris de Openstreetmap.org) • OsMo - monitorització en temps real d\'altres dispositius Aconsegiu un navegador fiable pel vostre país - ja sigui França, Alemanya, Mèxic, Regne Unit, Espanya, Holanda, EE.UU., Rússia, Brasil o qualsevol altre estat. Extensions: • Mapes de contorn i ombrejat del terreny https://goo.gl/7mojP8 Dades de corbes de nivell i visualització de terreny afegits al mapa bàsic OsmAnd . • Mapes d\'esquí https://goo.gl/pX6DxJ La informació sobre pistes d\'esquí, pistes d\'esquí de fons, telecabines i ascensors d\'esquí. • Mapa nàutic https://goo.gl/0hEdxm Estil de mapa especial per veure senyals de navegació nàutica pers fluvials i navegació costera. • Posició de l\'aparcament https://goo.gl/6jxQXF Us ajuda a marcar l\'ubicació del vostre vehícle aparcat i controlar el temps que queda si l\'aparcament té limitació de temps. ¡Manteniu-vos informat! Twitter: https://twitter.com/osmandapp Facebook: https://www.facebook.com/osmandapp Lloc: http://osmand.net Si us cal ajut per l\'aplicació OsmAnd, contacteu amb el nostre equip de suport: support@osmand.net. " Mostra els polígons Transparència de la capa inferior Troba un aparcament @@ -1997,4 +1997,11 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Marcadors de mapa Marcador de mapa El nom de fitxer inclou un caràcter ilegal - +Afegiu els marcadors de mapa amb el mapa + "Aquesta subscripció permet actualitzacions horàries de tots els mapes del món. La major part dels ingressos es retornen a la comunitat OSM en retribuir cada contribució a OSM. Cas que aprecieu OsmAnd i OSM i vulgueu ajudar-los, és una via perfecta per fer-ho." + + Podeu pujar la vostra nota OSM anònimament si utilitzeu el vostre perfil OpenStreetMap.org. + Afegeix un lapse de temps + Divisió d\'enregistrament + Utilitza divisió d\'enregistrament + From 4e53b13df3c29e5d3bf68ef51a719608bd7058cc Mon Sep 17 00:00:00 2001 From: Mirco Zorzo Date: Tue, 5 Apr 2016 23:27:57 +0200 Subject: [PATCH 16/67] Translated using Weblate (Italian) Currently translated at 100.0% (1956 of 1956 strings) --- OsmAnd/res/values-it/strings.xml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index bea5e5afda..396ca05f24 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -1443,14 +1443,14 @@ " - Quando crei un gruppo, per favore, dagli un nome e una descrizione\n - Dall\'app possono essere creati solo gruppi di tipo Semplice, più informazioni su sito https://osmo.mobi/g/new\n - Attraverso il sito è possibile gestire il gruppo e aggiungere tracce e punti disponibili per tutti\n - Non auspichiamo l\'utilizzo dei gruppi con un solo membro, se questo non è il gruppo dei PDI\n - I gruppi privati sono limitati a 8 persone\n - Termini e condizioni dell\'utilizzo sono sempre disponibili su OsMo.mobi\n - Se avete altre necessità particolari - per favore contattate il supporto osmo.mobi@gmail.com " Per favore leggere prima di creare un gruppo! Errore di autorizzazione OsMo: %1$s.\nPotrebbe essere un disservizio temporaneo oppure che la registrazione è scaduta.\nVuoi procedere con una nuova registrazione? - Nascondi gli edifici - Nascondi le strade non carrabili - Nascondi il testo - Nascondi foreste e boscaglie + Edifici + Strade non carrabili + Testo + Foreste e boscaglie Edifici da zoom 15 Più dettagli Meno dettagli - Nascondi le limitazioni di accesso + Limitazioni di accesso Mostra le limitazioni di accesso Mostra qualità strade Mostra il tipo di superficie delle strade @@ -1810,7 +1810,7 @@ Default Strade ad alto contrasto Memorizzazione multiutente - Nascondi i numeri civici + Numeri civici Evita l\'attraversamento di una frontiera verso un\'altra nazione Limite di altezza @@ -2037,7 +2037,7 @@ - Nascondi gli oggetti proposti + Oggetti proposti Altro Novità Modifiche OSM condivise tramite OsmAnd @@ -2139,7 +2139,7 @@ oggetti cancellati ANNULLA TUTTO Inverti punti di partenza e destinazione - Nascondi le icone dei PDI + Icone dei PDI Numero di modifiche Numero di contributori Scegli @@ -2149,7 +2149,7 @@ Strada bloccata Aggiungi durata Dati non disponibili - Nascondi gli oggetti sotterranei + Oggetti sotterranei Approfondisci Indirizzo email Stato @@ -2226,4 +2226,7 @@ \n\n • Molti miglioramenti nel menu contestuale della mappa e nella ricerca contestuale degli indirizzi.\n\n e altro… " Frazionatore delle registrazioni Usa il frazionamento delle registrazioni + Sottile + Medio + Grosso From b9fcd1b7d2cba6709d0c3837c737c87e373457e7 Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Wed, 6 Apr 2016 04:51:12 +0200 Subject: [PATCH 17/67] Translated using Weblate (Traditional Chinese) Currently translated at 100.0% (1956 of 1956 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index e13a306703..e7ef331f85 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -1393,14 +1393,14 @@ OsMo 登入失敗 授權失敗 OsMo 授權時遇到錯誤:%1$s。\n這可能是服務臨時當機或是您的註冊已過期。\n您想要繼續進行和新的註冊嗎? - 隱藏建築物 - 隱藏非車輛的公路 - 隱藏文字 - 隱藏樹木和灌樹叢 + 建築物 + 非車輛的公路 + 文字 + 樹木和灌樹叢 建築物在 15 級縮放 更多細節 較少細節 - 隱藏存取限制 + 存取限制 顯示存取限制 顯示道路品質 顯示路面 @@ -1739,7 +1739,7 @@ 內部記憶體 地圖存儲 複製 - 隱藏門牌號碼 + 門牌號碼 防止越過邊界進入別國 高度限制 @@ -1965,7 +1965,7 @@ 更新 - 隱藏已提出的物件 + 已提出的物件 讀取更多 有什麼新的在 @@ -2071,7 +2071,7 @@ 項目已移除 項目已刪除 全部取消 - 隱藏 POI 圖示 + POI 圖示 起始點與目的地對調 貢獻者數 編輯次數 @@ -2082,7 +2082,7 @@ 增加時間跨度 道路堵塞 無法獲得資料 - 隱藏地面下的物件 + 地面下的物件 讀取更多 " OsmAnd 地圖與導航 - 無須網路連線即可在地圖上尋找地點和計算路線。在去一個陌生的地方旅行前,下載一個國家的地圖,找到地點和路線。基本選項: • 200個國家的詳細地圖 • 離線導航附帶語音提示 • 在離線模式下的地址查尋 • 在地圖上關於所在地的資訊:感興趣的地方、咖啡廳、停車場、商店 • 增加場所到我的收藏 • 開車,騎自行車和行人導航附加選項:• 有能力去查看和記錄 GPX 軌跡 • 維基百科的 POI 介紹 • 加入照片、音訊、視訊和註釋到地圖 • 更方便駕駛的白天和夜晚地圖模式 • 相關的大眾運輸路線和停靠站資訊 • 自行車道和人行道 • 旅遊全世界各地的步行小徑 • 從眾多來源的線上地圖 • 有關道路鋪設品質及街道照明的資訊 • 增加編輯和刪除 POI (對於 OpenStreetMap.org 使用者) • OsMo - 在您的國家即時監控其它裝置獲得可靠的導航 - 無論是法國、德國、墨西哥、英國、西班牙、荷蘭、美國、俄羅斯、巴西或任何其他國家。外掛元件:• 等高線地圖和山體陰影,https://goo.gl/7mojP8 等高線資料和地形顯現增加到基本的 OsmAnd 地圖上。 • 滑雪地圖 https://goo.gl/pX6DxJ 有關滑雪道、越野滑雪道、纜車和滑雪索道的資訊。 • 航海地圖 https://goo.gl/0hEdxm 專用的地圖式樣,用在幹線和近岸航海導引來查看海上導航標誌。 • 停車位置 https://goo.gl/6JxQXF 幫助您標記您停放車輛的位置,如果有停車場有時限,還可查看剩餘多少時間。持續關注!Twitter:https://twitter.com/osmandapp Facebook:https://www.facebook.com/osmandapp 網站:http://osmand.net 如果您需要 OsmAnd 應用程式相關的幫助,請聯絡我們的支援團隊:support@osmand.net " E-mail 地址 From 75b5f239381b7d889ff7087353bac9b4b713da93 Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Wed, 6 Apr 2016 09:30:51 +0300 Subject: [PATCH 18/67] Work on #2420 (tests included): revert. Reverting ddb9ba266b27315e70806c58461114294be00ff0 because this solution breaks adjacent segments which form u-turn. See #2420 for more details. Added more tests though. --- .../osmand/router/RouteResultPreparation.java | 11 +++----- .../test/resources/test_turn_lanes.json | 28 +++++++++++++++---- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index 602f38036f..64e094645a 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -60,13 +60,10 @@ public class RouteResultPreparation { TurnType t = result.get(i).getTurnType(); // justify turn if (t != null) { - boolean turnOnSameStreet = result.get(i).getObject().id == result.get(next).getObject().id; - if (turnOnSameStreet) { - TurnType jt = justifyUTurn(leftSide, result, i, t); - if (jt != null) { - result.get(i).setTurnType(jt); - next = i + 2; - } + TurnType jt = justifyUTurn(leftSide, result, i, t); + if (jt != null) { + result.get(i).setTurnType(jt); + next = i + 2; } } } diff --git a/OsmAnd-java/test/resources/test_turn_lanes.json b/OsmAnd-java/test/resources/test_turn_lanes.json index 4aed8529a3..10f8247164 100644 --- a/OsmAnd-java/test/resources/test_turn_lanes.json +++ b/OsmAnd-java/test/resources/test_turn_lanes.json @@ -235,21 +235,39 @@ { "testName": "12.Rembrandtlaan to Rubensstraat u-turn", "startPoint": { - "latitude": 45.69849708250879, - "longitude": 35.64191635632511 + "latitude": 45.698570524678956, + "longitude": 35.64198324084282 }, "endPoint": { - "latitude": 45.699958273396, - "longitude": 35.642077288866005 + "latitude": 45.699327350398576, + "longitude": 35.64244994521141 }, "expectedResults": { "7351364": null, "7351365": "+TL", "7351445": "+TL" + } + }, + { + "testName": "13.Ira Lee Henderson Memorial Highway (US 75)", + "startPoint": { + "latitude": 45.691518814511134, + "longitude": 35.66402764618397 + }, + "endPoint": { + "latitude": 45.69157314830206, + "longitude": 35.66372522711754 + }, + "expectedResults": { + "309115848": null, + "309115858": "+TU, C", + "309115891": null, + "309115871": null, + "309115849": null } }, { - "testName": "12.Figure 8 TL", + "testName": "14.Figure 8 TL", "startPoint": { "latitude": 45.69816447596442, "longitude": 35.74885922431952 From 0356acd6882f825183d590562a7fb5fbadf3599d Mon Sep 17 00:00:00 2001 From: jan madsen Date: Tue, 5 Apr 2016 21:38:56 +0200 Subject: [PATCH 19/67] Translated using Weblate (Danish) Currently translated at 100.0% (1956 of 1956 strings) --- OsmAnd/res/values-da/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index d1e3bd42dc..a32bc7aec3 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -49,7 +49,7 @@ Standard kort Kort kun med veje - Skjul grænser + Grænser Ændre rækkefølge Videoformat @@ -257,7 +257,7 @@ OsmAnd+ kort & navigation Trafikadvarsler Gør alle overflader på kortet transparent - Skjul polygoner + Polygoner Optegningsmåde Optimer kort til Vis fra zoom-niveau (kræver højdekurvedata): From cc57dbf62c24714115d231b034033b2f370658d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Wed, 6 Apr 2016 08:27:50 +0200 Subject: [PATCH 20/67] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 76.0% (1487 of 1956 strings) --- OsmAnd/res/values-nb/strings.xml | 102 +++++++++++++++++++++++++------ 1 file changed, 82 insertions(+), 20 deletions(-) diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml index 55e5e579da..019dc2d19c 100644 --- a/OsmAnd/res/values-nb/strings.xml +++ b/OsmAnd/res/values-nb/strings.xml @@ -275,7 +275,7 @@ Aktiver Deaktiver - Last på nytt fra sd-kort + Last på nytt fra SD-kort Last ned Interessepunkt-data @@ -571,7 +571,7 @@ Filter {0} har blitt slettet Filter {0} har blitt opprettet - E-post + e-post GPS-info Ankomsttid Foretrekk motorveier @@ -702,7 +702,7 @@ Kroatisk Beregn OsmAnd-rutesegment uten internett Beregn OsmAnd-rute for første og siste rutesegment - Unik enhets-id + Unik enhets-ID Still inn overvåking og personlig overvåkingskanal OpenStreetMap-overvåking OsMo @@ -713,7 +713,7 @@ Vis sykkelruter Vis zoom-knapper under navigering Vis zoom-knapper - Gjeldende tid + Nåtid Visningsfarge Vis posisjon alltid i midten Navigeringsinnstillinger @@ -725,7 +725,7 @@ Programtillegg Programtillegg aktiverer avanserte innstillinger og flere funksjoner Programtillegg - Bruk posisjon… + Bruk posisjon … Slå på skjermen Unngå veier… @@ -797,7 +797,7 @@ Rutepunkt Tale Diverse - Lokaltilpassing + Lokaltilpasning Albansk Arabisk Persisk @@ -858,7 +858,7 @@ ufullstendig Legg til GPX-rutepunkt Ingen taleveiledning valgt - Velg maksimum zoom til å forhåndslaste + Velg maksimalt zoomnivål å forhåndslaste Initialiserer taledata… Oppdatering av interessepunkter er ikke tilgjengelig ved lave zoomnivåer Du har ankommet ditt reisemål @@ -932,7 +932,7 @@ Programtillegg for koter Still inn lyd og video "Lyd/video-innstillinger " - OsmAnd-programtillegg for offline koter + OsmAnd-programtillegg for frakoblede koter Avstandsmåling Koter @@ -975,7 +975,7 @@ Laster postnummer… Laster data… - "Dette programtillegget gir både et lag med koter og et lag med relieffskygger til å vises oppå standardkartet til OsmAnd. Denne funksjonen vil bli satt stor pris på av idrettsutøvere, turgåere og enhver som er interessert i relieff-strukturen til et landskap. + "Dette programtillegget gir både et lag med koter og et lag med skråningsskygger som kan vises vises oppå standardkartene til OsmAnd. Denne funksjonen vil bli satt stor pris på av idrettsutøvere, turgåere og enhver som er interessert i relieff-strukturen til et landskap. \n\nDe globale dataene (mellom 70 grader nord og 70 grader sør) er basert på målinger av SRTM (Shuttle Radar Topography Mission) og ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), et bildeinstrument ombord på Terra, flaggskipsatellitten til NASA\'s Earth Observing System. ASTER er et samarbeid mellom NASA, Japans finansdepartement, Trade and Industry (METI), og Japan Space Systems (J-spacesystems). " Takk for at du bruker OsmAnd. For mange funksjoner i dette programmet trenger du noen regionale offline-data som du kan laste ned via \'Innstillinger\' → \'Karthåndtering\'. Etterpå vil du være i stand til å se kart, finne adresser, lete etter interessepunkter og finne offentlig transport. @@ -1046,7 +1046,7 @@ Reisemål GPX-filnavn Distansekalkulator & planleggingsverktøy - Relieffskyggelag + Skråningsskyggelag Relieffskygger @@ -1095,7 +1095,7 @@ Veistil Standard Orange - Tysk veiatlas + Tyskt veiatlas Jernbaneovergang Fotgjengerovergang Vis jernbaneoverganger @@ -1127,7 +1127,7 @@ Velg overleggskart Audio/video-notater OSM-redigering - "Dette programtillegget gir både et lag med koter og et lag med relieffskygger til å vises oppå standardkartet til OsmAnd. Denne funksjonen vil bli satt stor pris på av idrettsutøvere, turgåere og enhver som er interessert i relieff-strukturen til et landskap. + "Dette programtillegget gir både et lag med koter og et lag med skråningsskygger som kan vises oppå standardkartene til OsmAnd. Denne funksjonen vil bli satt stor pris på av idrettsutøvere, turgåere og enhver som er interessert i relieff-strukturen til et landskap. \n\nDe globale dataene (mellom 70 grader nord og 70 grader sør) er basert på målinger av SRTM (Shuttle Radar Topography Mission) og ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), et bildeinstrument ombord på Terra, flaggskipsatellitten til NASA\'s Earth Observing System. ASTER er et samarbeid mellom NASA, Japans finansdepartement, Trade and Industry (METI), og Japan Space Systems (J-spacesystems). " Skikartvisning Dette programtillegget gjør enhetens tilgjengelighetsfunksjoner tilgjengelige direkte i OsmAnd. Det muliggjør f.eks justering av talehastigheten for TTS-tale, innstilling av styrekors-skjermnavigering ved hjelp av en styrekule for zoomkontroll, eller bruke tekst-til-tale-tilbakemelding, f.eks auto-annonsering av din posisjon. @@ -1171,7 +1171,7 @@ Hjelp Innstillinger Historikk - Velg på kart + Velg i kart Lagre Lagre som GPX-spor Endre navn @@ -1263,8 +1263,8 @@ Kopier Skjul husnumre Utgitt - %1$d av %2$d element(er) vellykket deaktivert. - %1$d av %2$d element(er) vellykket slettet. + Vellykket deaktivering av %1$d av %2$d element(er). + Vellykket sletting av %1$d av %2$d element(er). %1$d av %2$d element(er) vellykket aktivert. Aksjon %1$s: Ingen elementer finnes %1$s: %2$s element(er). Fortsette? @@ -1393,7 +1393,7 @@ Regioner Regionkart Verdenskart - Relieffskyggelag deaktivert + Skråningsskyggelag avskrudd Del posisjon Send Kart lastet ned @@ -1405,7 +1405,7 @@ Oppdater alle (%1$s MB) Gratis nedlastinger brukt Velg hvor du vil lagre kartfiler. - Oppfør navn på land + Oppgi navn på land Basiskart verden (som dekker hele verden ved lav zoom) mangler eller er utdatert. Vurder å laste ned Basiskart verden for et komplett miljø. QR-kode Basiskart er nødvendig for at programmet skal fungere riktig og ble valgt for å laste ned. @@ -1526,8 +1526,8 @@ Beregn rute på nytt Legg til kartmarkører via kart Ingen rutepunkter funnet - Flytt opp - Flytt ned + Flytt oppover + Flytt nedover Avslutt navigering Unngå vei Delt minne @@ -1549,4 +1549,66 @@ Ser etter adresse Forkast rute Filnavn inneholder ulovlig tegn - +Tynt + Middels + Fet + Gruppe-ID + Kallenavn + Donasjoner + Antall mottakere + Abonner + Offentlig navn + Månedlig kostnad + Månedlig avdrag + Aktiv + Inaktiv + Skriv inn en gyldig E-postadresse + Skriv inn offentlig navn + Abonnementsinnstillinger + Logg av + Fargelegger i henhold til OSMC + Mellomtjener + " %1$s punkter" + Praksis + Brukernavn + Gruppenavn + Lenk med enheten + Lenk med gruppe + Opprett gruppe + Tilkoblede enheter + Øktsymbol: %1$s + Feilrettingsinformasjon + Tilgjengelighetsvalg + OSM-endringer + Wikipedia + Endre rekkefølge + Velg på forespørsel + Ta opp video + Ta opp lyd + Slett opptak + Spill av + Sammenhengende + Sporbar + Identifiserbar + Slett en parkeringsmarkering + Omgående + Rute delt via OsmAnd + Ønsker du å avbryte nedlasting av fila? + Merkelapper + Brukerstøtte + Senere + tidligere distanse + påfølgende distanse + stopp å passere + Fullført + slett + I/O-feil under utførelse av handlingen {0}. + Fortell oss hvorfor. + Klarte ikke å laste opp + KJØP + O-S-S + Antall endringer + Antall bidragsytere + Morgen + Natt + From 3a3c8124a5af14ffcbdb1640b6d65b42d53dd60b Mon Sep 17 00:00:00 2001 From: jf-simon Date: Wed, 6 Apr 2016 10:22:57 +0200 Subject: [PATCH 21/67] Translated using Weblate (German) Currently translated at 100.0% (1956 of 1956 strings) --- OsmAnd/res/values-de/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 0a9f54143f..b856b35e7b 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -1324,14 +1324,14 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su Keine GPX-Spur ausgewählt. Zum Auswählen auf eine Spur lange drücken. Zum Anzeigen auswählen - Gebäude ausblenden - Fußwege ausblenden - Text ausblenden - Wälder und Gebüsch ausblenden + Gebäude + Fußwege + Text + Wälder und Gebüsch Gebäude ab Zoomstufe 15 anzeigen Mehr Details Weniger Details in Karte - Zugangsbeschränkungen verbergen + Zugangsbeschränkungen Zugangsbeschränkungen anzeigen Straßenqualität anzeigen Straßenoberfläche anzeigen @@ -1681,7 +1681,7 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su ausgewählt Offen - Hausnummern verbergen + Hausnummern Soll OsmAnd auch die Datendateien an den neuen Ort kopieren? Karten konnten im angegebenen Verzeichnis nicht erstellt werden Das Kopieren der Dateien ist fehlgeschlagen! @@ -1872,7 +1872,7 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su Alle ungesicherten Änderungen gehen verloren. Fortfahren? Straßen Auch bei der bezahlten Version ist das Banner der kostenlosen Version sichtbar -Vorgeschlagene Objekte ausblenden +Vorgeschlagene Objekte Aktualisieren Hochladen @@ -2047,7 +2047,7 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su Typ Startpunkt Alles rückgängig machen - POI Symbole ausblenden + POI Symbole Start und Ziel tauschen Anzahl der Bearbeitungen Anzahl der Mitwirkenden @@ -2057,7 +2057,7 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su Auswählen Kartenaktualisierungen können gelöscht werden, um zur Originalkarte zurückzukehren Daten nicht verfügbar - Unterirdische Objekte ausblenden + Unterirdische Objekte Mehr lesen Status Änderungen speichern From d651732a766578ce89af381e6c116547cfadea94 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Wed, 6 Apr 2016 16:39:36 +0300 Subject: [PATCH 22/67] GPX second line for configure screen. --- OsmAnd/res/values/strings.xml | 1 + .../net/osmand/plus/GpxSelectionHelper.java | 143 ++++++++++-------- .../osmand/plus/dialogs/ConfigureMapMenu.java | 9 +- 3 files changed, 84 insertions(+), 69 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 3e97826ed2..39478ad16f 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,7 @@ 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + %s GPX files selected Thin Medium Bold diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index d711392e49..ee527be4d3 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -1,6 +1,8 @@ package net.osmand.plus; import android.graphics.Bitmap; +import android.support.annotation.NonNull; +import android.support.v4.content.ContextCompat; import net.osmand.IProgress; import net.osmand.plus.GPXUtilities.GPXFile; @@ -28,30 +30,41 @@ public class GpxSelectionHelper { private static final String FILE = "file"; private static final String COLOR = "color"; private OsmandApplication app; - // save into settings -// public final CommonPreference SHOW_CURRENT_GPX_TRACK = -// new BooleanPreference("show_current_gpx_track", false).makeGlobal().cache(); - private List selectedGPXFiles = new java.util.ArrayList(); + @NonNull + private List selectedGPXFiles = new java.util.ArrayList<>(); private SavingTrackHelper savingTrackHelper; public GpxSelectionHelper(OsmandApplication osmandApplication, SavingTrackHelper trackHelper) { this.app = osmandApplication; savingTrackHelper = trackHelper; } - + public void clearAllGpxFileToShow() { selectedGPXFiles.clear(); saveCurrentSelections(); } - + public boolean isShowingAnyGpxFiles() { return !selectedGPXFiles.isEmpty(); } - + + @NonNull public List getSelectedGPXFiles() { return selectedGPXFiles; } + public String getGpxDescription() { + if (selectedGPXFiles.size() == 1) { + File file = new File(selectedGPXFiles.get(0).getGpxFile().path); + return Algorithms.getFileNameWithoutExtension(file); + } else if (selectedGPXFiles.size() == 0) { + return app.getResources().getString(R.string.none); + } else { + return app.getResources().getString(R.string.number_of_gpx_files_selected_pattern, + selectedGPXFiles.size()); + } + } + public SelectedGpxFile getSelectedGPXFile(WptPt point) { for (SelectedGpxFile g : selectedGPXFiles) { if (g.getGpxFile().points.contains(point)) { @@ -61,12 +74,12 @@ public class GpxSelectionHelper { return null; } - public final String getString(int resId, Object... formatArgs) { + private String getString(int resId, Object... formatArgs) { return app.getString(resId, formatArgs); } public List collectDisplayGroups(GPXFile g) { - List dg = new ArrayList(); + List dg = new ArrayList<>(); String name = g.path; if(g.showCurrentTrack){ name = getString(R.string.shared_string_currently_recording_track); @@ -135,7 +148,7 @@ public class GpxSelectionHelper { } } } - + if (g.points.size() > 0) { GpxDisplayGroup group = new GpxDisplayGroup(g); group.gpxName = name; @@ -154,7 +167,7 @@ public class GpxSelectionHelper { if (Algorithms.isEmpty(item.name)) { item.name = getString(R.string.gpx_selection_point, k + ""); } - item.expanded = true; + item.expanded = true; item.locationStart = r; item.locationEnd = r; list.add(item); @@ -162,14 +175,14 @@ public class GpxSelectionHelper { } return dg; } - + private static void processGroupTrack(OsmandApplication app, GpxDisplayGroup group) { List list = group.getModifiableList(); - String timeSpanClr = Algorithms.colorToString(app.getResources().getColor(R.color.gpx_time_span_color)); - String speedClr = Algorithms.colorToString(app.getResources().getColor(R.color.gpx_speed)); - String ascClr = Algorithms.colorToString(app.getResources().getColor(R.color.gpx_altitude_asc)); - String descClr = Algorithms.colorToString(app.getResources().getColor(R.color.gpx_altitude_desc)); - String distanceClr = Algorithms.colorToString(app.getResources().getColor(R.color.gpx_distance_color)); + String timeSpanClr = Algorithms.colorToString(ContextCompat.getColor(app, R.color.gpx_time_span_color)); + String speedClr = Algorithms.colorToString(ContextCompat.getColor(app, R.color.gpx_speed)); + String ascClr = Algorithms.colorToString(ContextCompat.getColor(app, R.color.gpx_altitude_asc)); + String descClr = Algorithms.colorToString(ContextCompat.getColor(app, R.color.gpx_altitude_desc)); + String distanceClr = Algorithms.colorToString(ContextCompat.getColor(app, R.color.gpx_distance_color)); final float eleThreshold = 3; // int t = 1; for (TrkSegment r : group.track.segments) { @@ -179,9 +192,11 @@ public class GpxSelectionHelper { GPXTrackAnalysis[] as ; boolean split = true; if(group.splitDistance > 0) { - as = r.splitByDistance(group.splitDistance).toArray(new GPXTrackAnalysis[0]); + List trackSegments = r.splitByDistance(group.splitDistance); + as = trackSegments.toArray(new GPXTrackAnalysis[trackSegments.size()]); } else if(group.splitTime > 0) { - as = r.splitByTime(group.splitTime).toArray(new GPXTrackAnalysis[0]); + List trackSegments = r.splitByTime(group.splitTime); + as = trackSegments.toArray(new GPXTrackAnalysis[trackSegments.size()]); } else { split = false; as = new GPXTrackAnalysis[] {GPXTrackAnalysis.segment(0, r)}; @@ -195,7 +210,7 @@ public class GpxSelectionHelper { item.splitName = formatSplitName(analysis.metricEnd, group, app); item.splitName += " ("+formatSecondarySplitName(analysis.secondaryMetricEnd, group, app) +") "; } - + item.description = GpxUiHelper.getDescription(app, analysis, true); item.analysis = analysis; String name = ""; @@ -227,7 +242,7 @@ public class GpxSelectionHelper { name += " - "; name += GpxUiHelper.getColorValue(ascClr, OsmAndFormatter.getFormattedAlt(analysis.maxElevation, app)); } - if (analysis.isElevationSpecified() && (analysis.diffElevationUp > eleThreshold || + if (analysis.isElevationSpecified() && (analysis.diffElevationUp > eleThreshold || analysis.diffElevationDown > eleThreshold) ) { if (name.length() != 0) name += ", "; @@ -245,9 +260,9 @@ public class GpxSelectionHelper { item.locationEnd = analysis.locationEnd; list.add(item); } - } + } } - + private static String formatSecondarySplitName(double metricEnd, GpxDisplayGroup group, OsmandApplication app) { if (group.isSplitDistance()) { return Algorithms.formatDuration((int) metricEnd); @@ -287,7 +302,7 @@ public class GpxSelectionHelper { } return null; } - + public SelectedGpxFile getSelectedFileByName(String path) { for (SelectedGpxFile s : selectedGPXFiles) { if (s.getGpxFile().path.endsWith("/" + path)) { @@ -309,12 +324,11 @@ public class GpxSelectionHelper { public void setGpxFileToDisplay(GPXFile... gpxs) { // special case for gpx current route for(GPXFile gpx : gpxs) { - boolean show = true; - selectGpxFileImpl(gpx, show, false); + selectGpxFileImpl(gpx, true, false); } saveCurrentSelections(); } - + public void loadGPXTracks(IProgress p) { String load = app.getSettings().SELECTED_GPX.get(); if(!Algorithms.isEmpty(load)) { @@ -376,13 +390,14 @@ public class GpxSelectionHelper { } private SelectedGpxFile selectGpxFileImpl(GPXFile gpx, boolean show, boolean notShowNavigationDialog) { - boolean displayed = false; + boolean displayed; SelectedGpxFile sf ; if(gpx != null && gpx.showCurrentTrack) { sf = savingTrackHelper.getCurrentTrack(); sf.notShowNavigationDialog = notShowNavigationDialog; displayed = selectedGPXFiles.contains(sf); } else { + assert gpx != null; sf = getSelectedFileByPath(gpx.path); displayed = sf != null; if(show && sf == null) { @@ -400,14 +415,14 @@ public class GpxSelectionHelper { } return sf; } - + public SelectedGpxFile selectGpxFile(GPXFile gpx, boolean show, boolean notShowNavigationDialog) { SelectedGpxFile sf = selectGpxFileImpl(gpx, show, notShowNavigationDialog); saveCurrentSelections(); return sf; } - - + + public static class SelectedGpxFile { public boolean notShowNavigationDialog = false; @@ -416,11 +431,11 @@ public class GpxSelectionHelper { private int color; private GPXTrackAnalysis trackAnalysis; private long modifiedTime = -1; - private List processedPointsToDisplay = new ArrayList(); + private List processedPointsToDisplay = new ArrayList<>(); private boolean routePoints; private List displayGroups; - + public void setGpxFile(GPXFile gpxFile) { this.gpxFile = gpxFile; if(gpxFile.tracks.size() > 0) { @@ -452,32 +467,32 @@ public class GpxSelectionHelper { routePoints = !this.processedPointsToDisplay.isEmpty(); } } - + public boolean isRoutePoints() { return routePoints; } - + public List getPointsToDisplay() { return processedPointsToDisplay; } - + public List getModifiablePointsToDisplay() { return processedPointsToDisplay; } - + public GPXFile getGpxFile() { return gpxFile; } - + public GPXFile getModifiableGpxFile() { // call process points after return gpxFile; } - + public boolean isShowCurrentTrack() { return showCurrentTrack; } - + public void setShowCurrentTrack(boolean showCurrentTrack) { this.showCurrentTrack = showCurrentTrack; } @@ -492,7 +507,7 @@ public class GpxSelectionHelper { } return displayGroups; } - + public void setDisplayGroups(List displayGroups) { if(modifiedTime != gpxFile.modifiedTime) { update(); @@ -502,17 +517,17 @@ public class GpxSelectionHelper { } - + public enum GpxDisplayItemType { TRACK_SEGMENT, TRACK_POINTS, TRACK_ROUTE_POINTS } - + public static class GpxDisplayGroup { - + private GpxDisplayItemType type = GpxDisplayItemType.TRACK_SEGMENT; - private List list = new ArrayList(); + private List list = new ArrayList<>(); private GPXFile gpx; private String gpxName; private String name; @@ -521,7 +536,7 @@ public class GpxSelectionHelper { private double splitDistance = -1; private int splitTime = -1; private int color; - + public GpxDisplayGroup(GPXFile gpx) { this.gpx = gpx; } @@ -529,11 +544,11 @@ public class GpxSelectionHelper { public void setTrack(Track track) { this.track = track; } - + public GPXFile getGpx() { return gpx; } - + public Track getTrack() { return track; } @@ -544,18 +559,18 @@ public class GpxSelectionHelper { group.name = name; group.description = description; group.track = track; - group.list = new ArrayList(list); + group.list = new ArrayList<>(list); return group; } - + public String getDescription() { return description; } - + public void setDescription(String description) { this.description = description; } - + public void setName(String name) { this.name = name; } @@ -567,15 +582,15 @@ public class GpxSelectionHelper { public String getName() { return name; } - + public List getModifiableList() { return list; } - + public GpxDisplayItemType getType() { return type; } - + public void setType(GpxDisplayItemType type) { this.type = type; } @@ -583,15 +598,15 @@ public class GpxSelectionHelper { public boolean isSplitDistance() { return splitDistance > 0; } - + public double getSplitDistance() { return splitDistance; } - + public boolean isSplitTime() { return splitTime > 0; } - + public int getSplitTime() { return splitTime; } @@ -611,23 +626,23 @@ public class GpxSelectionHelper { list.clear(); splitDistance = meters; splitTime = -1; - processGroupTrack(app, this ); + processGroupTrack(app, this ); } public void splitByTime(OsmandApplication app, int seconds) { list.clear(); splitDistance = -1; splitTime = seconds; - processGroupTrack(app, this ); + processGroupTrack(app, this ); } public int getColor() { return color; } } - + public static class GpxDisplayItem { - + public GPXTrackAnalysis analysis; public GpxDisplayGroup group; public WptPt locationStart; @@ -640,9 +655,5 @@ public class GpxSelectionHelper { public String url; public Bitmap image; public boolean expanded; - - } - - } diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index dd6323b82f..97eb6c51ad 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -142,8 +142,10 @@ public class ConfigureMapMenu { } else if (itemId == R.string.shared_string_favorites) { settings.SHOW_FAVORITES.set(isChecked); } else if (itemId == R.string.layer_gpx_layer) { - if (ma.getMyApplication().getSelectedGpxHelper().isShowingAnyGpxFiles()) { - ma.getMyApplication().getSelectedGpxHelper().clearAllGpxFileToShow(); + final GpxSelectionHelper selectedGpxHelper = ma.getMyApplication().getSelectedGpxHelper(); + if (selectedGpxHelper.isShowingAnyGpxFiles()) { + selectedGpxHelper.clearAllGpxFileToShow(); + adapter.getItem(pos).setDescription(selectedGpxHelper.getGpxDescription()); } else { AlertDialog dialog = ma.getMapLayers() .showGPXFileLayer(getAlreadySelectedGpx(), ma.getMapView()); @@ -151,7 +153,7 @@ public class ConfigureMapMenu { @Override public void onDismiss(DialogInterface dialog) { boolean areAnyGpxTracksVisible = - ma.getMyApplication().getSelectedGpxHelper().isShowingAnyGpxFiles(); + selectedGpxHelper.isShowingAnyGpxFiles(); item.setSelected(areAnyGpxTracksVisible); item.setColorRes(areAnyGpxTracksVisible ? R.color.osmand_orange : defaultColor); adapter.notifyDataSetChanged(); @@ -222,6 +224,7 @@ public class ConfigureMapMenu { adapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(R.string.layer_gpx_layer, activity) .setSelected(app.getSelectedGpxHelper().isShowingAnyGpxFiles()) + .setDescription(app.getSelectedGpxHelper().getGpxDescription()) .setColor(selected ? R.color.osmand_orange : defaultColor) .setIcon(R.drawable.ic_action_polygom_dark) .setSecondaryIcon(R.drawable.ic_action_additional_option) From 544d3f8dd19c47d5134171b2ad3168ed997c7c76 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Wed, 6 Apr 2016 16:39:56 +0300 Subject: [PATCH 23/67] Formatting. --- .../net/osmand/plus/GpxSelectionHelper.java | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index ee527be4d3..c8dd0d310d 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -81,18 +81,18 @@ public class GpxSelectionHelper { public List collectDisplayGroups(GPXFile g) { List dg = new ArrayList<>(); String name = g.path; - if(g.showCurrentTrack){ - name = getString(R.string.shared_string_currently_recording_track); + if (g.showCurrentTrack) { + name = getString(R.string.shared_string_currently_recording_track); } else { int i = name.lastIndexOf('/'); - if(i >= 0) { + if (i >= 0) { name = name.substring(i + 1); } i = name.lastIndexOf('\\'); - if(i >= 0) { + if (i >= 0) { name = name.substring(i + 1); } - if(name.endsWith(".gpx")) { + if (name.endsWith(".gpx")) { name = name.substring(0, name.length() - 4); } name = name.replace('_', ' '); @@ -108,7 +108,7 @@ public class GpxSelectionHelper { String ks = (k++) + ""; group.setName(getString(R.string.gpx_selection_track, name, g.tracks.size() == 1 ? "" : ks)); String d = ""; - if(t.name != null && t.name.length() > 0) { + if (t.name != null && t.name.length() > 0) { d = t.name + " " + d; } group.setDescription(d); @@ -123,7 +123,7 @@ public class GpxSelectionHelper { group.gpxName = name; group.setType(GpxDisplayItemType.TRACK_ROUTE_POINTS); String d = getString(R.string.gpx_selection_number_of_points, name, route.points.size()); - if(route.name != null && route.name.length() > 0) { + if (route.name != null && route.name.length() > 0) { d = route.name + " " + d; } group.setDescription(d); @@ -189,26 +189,26 @@ public class GpxSelectionHelper { if (r.points.size() == 0) { continue; } - GPXTrackAnalysis[] as ; + GPXTrackAnalysis[] as; boolean split = true; - if(group.splitDistance > 0) { + if (group.splitDistance > 0) { List trackSegments = r.splitByDistance(group.splitDistance); as = trackSegments.toArray(new GPXTrackAnalysis[trackSegments.size()]); - } else if(group.splitTime > 0) { + } else if (group.splitTime > 0) { List trackSegments = r.splitByTime(group.splitTime); as = trackSegments.toArray(new GPXTrackAnalysis[trackSegments.size()]); } else { split = false; - as = new GPXTrackAnalysis[] {GPXTrackAnalysis.segment(0, r)}; + as = new GPXTrackAnalysis[]{GPXTrackAnalysis.segment(0, r)}; } - for(GPXTrackAnalysis analysis : as) { + for (GPXTrackAnalysis analysis : as) { GpxDisplayItem item = new GpxDisplayItem(); item.group = group; - if(split) { + if (split) { item.splitMetric = analysis.metricEnd; item.secondarySplitMetric = analysis.secondaryMetricEnd; item.splitName = formatSplitName(analysis.metricEnd, group, app); - item.splitName += " ("+formatSecondarySplitName(analysis.secondaryMetricEnd, group, app) +") "; + item.splitName += " (" + formatSecondarySplitName(analysis.secondaryMetricEnd, group, app) + ") "; } item.description = GpxUiHelper.getDescription(app, analysis, true); @@ -217,7 +217,7 @@ public class GpxSelectionHelper { // if(group.track.segments.size() > 1) { // name += t++ + ". "; // } - if(!group.isSplitDistance()) { + if (!group.isSplitDistance()) { name += GpxUiHelper.getColorValue(distanceClr, OsmAndFormatter.getFormattedDistance(analysis.totalDistance, app)); } if ((analysis.timeSpan > 0 || analysis.timeMoving > 0) && !group.isSplitTime()) { @@ -238,20 +238,20 @@ public class GpxSelectionHelper { if (analysis.isElevationSpecified()) { if (name.length() != 0) name += ", "; - name += GpxUiHelper.getColorValue(descClr, OsmAndFormatter.getFormattedAlt(analysis.minElevation, app)); - name += " - "; - name += GpxUiHelper.getColorValue(ascClr, OsmAndFormatter.getFormattedAlt(analysis.maxElevation, app)); + name += GpxUiHelper.getColorValue(descClr, OsmAndFormatter.getFormattedAlt(analysis.minElevation, app)); + name += " - "; + name += GpxUiHelper.getColorValue(ascClr, OsmAndFormatter.getFormattedAlt(analysis.maxElevation, app)); } if (analysis.isElevationSpecified() && (analysis.diffElevationUp > eleThreshold || - analysis.diffElevationDown > eleThreshold) ) { + analysis.diffElevationDown > eleThreshold)) { if (name.length() != 0) name += ", "; - if(analysis.diffElevationDown > eleThreshold) { - name += GpxUiHelper.getColorValue(descClr, " \u2193 "+ + if (analysis.diffElevationDown > eleThreshold) { + name += GpxUiHelper.getColorValue(descClr, " \u2193 " + OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app)); } - if(analysis.diffElevationUp > eleThreshold) { - name += GpxUiHelper.getColorValue(ascClr, " \u2191 "+ + if (analysis.diffElevationUp > eleThreshold) { + name += GpxUiHelper.getColorValue(ascClr, " \u2191 " + OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app)); } } @@ -295,8 +295,8 @@ public class GpxSelectionHelper { } public SelectedGpxFile getSelectedFileByPath(String path) { - for(SelectedGpxFile s : selectedGPXFiles) { - if(s.getGpxFile().path.equals(path)) { + for (SelectedGpxFile s : selectedGPXFiles) { + if (s.getGpxFile().path.equals(path)) { return s; } } @@ -323,7 +323,7 @@ public class GpxSelectionHelper { public void setGpxFileToDisplay(GPXFile... gpxs) { // special case for gpx current route - for(GPXFile gpx : gpxs) { + for (GPXFile gpx : gpxs) { selectGpxFileImpl(gpx, true, false); } saveCurrentSelections(); @@ -331,32 +331,32 @@ public class GpxSelectionHelper { public void loadGPXTracks(IProgress p) { String load = app.getSettings().SELECTED_GPX.get(); - if(!Algorithms.isEmpty(load)) { + if (!Algorithms.isEmpty(load)) { try { JSONArray ar = new JSONArray(load); boolean save = false; - for(int i = 0; i < ar.length(); i++) { + for (int i = 0; i < ar.length(); i++) { JSONObject obj = ar.getJSONObject(i); - if(obj.has(FILE)) { + if (obj.has(FILE)) { File fl = new File(obj.getString(FILE)); - if(p != null) { + if (p != null) { p.startTask(getString(R.string.loading_smth, fl.getName()), -1); } GPXFile gpx = GPXUtilities.loadGPXFile(app, fl); - if(obj.has(COLOR)) { + if (obj.has(COLOR)) { int clr = Algorithms.parseColor(obj.getString(COLOR)); gpx.setColor(clr); } - if(gpx.warning != null) { + if (gpx.warning != null) { save = true; } else { selectGpxFile(gpx, true, false); } - } else if(obj.has(CURRENT_TRACK)) { + } else if (obj.has(CURRENT_TRACK)) { selectedGPXFiles.add(savingTrackHelper.getCurrentTrack()); } } - if(save) { + if (save) { saveCurrentSelections(); } } catch (Exception e) { @@ -368,15 +368,15 @@ public class GpxSelectionHelper { private void saveCurrentSelections() { JSONArray ar = new JSONArray(); - for(SelectedGpxFile s : selectedGPXFiles) { - if(s.gpxFile != null && !s.notShowNavigationDialog) { + for (SelectedGpxFile s : selectedGPXFiles) { + if (s.gpxFile != null && !s.notShowNavigationDialog) { JSONObject obj = new JSONObject(); try { - if(s.isShowCurrentTrack()) { + if (s.isShowCurrentTrack()) { obj.put(CURRENT_TRACK, true); - } else if(!Algorithms.isEmpty(s.gpxFile.path)) { + } else if (!Algorithms.isEmpty(s.gpxFile.path)) { obj.put(FILE, s.gpxFile.path); - if(s.gpxFile.getColor(0) != 0) { + if (s.gpxFile.getColor(0) != 0) { obj.put(COLOR, Algorithms.colorToString(s.gpxFile.getColor(0))); } } @@ -391,8 +391,8 @@ public class GpxSelectionHelper { private SelectedGpxFile selectGpxFileImpl(GPXFile gpx, boolean show, boolean notShowNavigationDialog) { boolean displayed; - SelectedGpxFile sf ; - if(gpx != null && gpx.showCurrentTrack) { + SelectedGpxFile sf; + if (gpx != null && gpx.showCurrentTrack) { sf = savingTrackHelper.getCurrentTrack(); sf.notShowNavigationDialog = notShowNavigationDialog; displayed = selectedGPXFiles.contains(sf); @@ -400,14 +400,14 @@ public class GpxSelectionHelper { assert gpx != null; sf = getSelectedFileByPath(gpx.path); displayed = sf != null; - if(show && sf == null) { + if (show && sf == null) { sf = new SelectedGpxFile(); sf.setGpxFile(gpx); sf.notShowNavigationDialog = notShowNavigationDialog; } } - if(displayed != show) { - if(show) { + if (displayed != show) { + if (show) { selectedGPXFiles.add(sf); } else { selectedGPXFiles.remove(sf); @@ -438,14 +438,14 @@ public class GpxSelectionHelper { public void setGpxFile(GPXFile gpxFile) { this.gpxFile = gpxFile; - if(gpxFile.tracks.size() > 0) { + if (gpxFile.tracks.size() > 0) { this.color = gpxFile.tracks.get(0).getColor(0); } processPoints(); } public GPXTrackAnalysis getTrackAnalysis() { - if(modifiedTime != gpxFile.modifiedTime) { + if (modifiedTime != gpxFile.modifiedTime) { update(); } return trackAnalysis; @@ -455,14 +455,14 @@ public class GpxSelectionHelper { modifiedTime = gpxFile.modifiedTime; trackAnalysis = gpxFile.getAnalysis( Algorithms.isEmpty(gpxFile.path) ? System.currentTimeMillis() : - new File(gpxFile.path).lastModified()); + new File(gpxFile.path).lastModified()); displayGroups = null; } public void processPoints() { update(); this.processedPointsToDisplay = gpxFile.proccessPoints(); - if(this.processedPointsToDisplay.isEmpty()) { + if (this.processedPointsToDisplay.isEmpty()) { this.processedPointsToDisplay = gpxFile.processRoutePoints(); routePoints = !this.processedPointsToDisplay.isEmpty(); } @@ -502,14 +502,14 @@ public class GpxSelectionHelper { } public List getDisplayGroups() { - if(modifiedTime != gpxFile.modifiedTime) { + if (modifiedTime != gpxFile.modifiedTime) { update(); } return displayGroups; } public void setDisplayGroups(List displayGroups) { - if(modifiedTime != gpxFile.modifiedTime) { + if (modifiedTime != gpxFile.modifiedTime) { update(); } this.displayGroups = displayGroups; @@ -619,21 +619,21 @@ public class GpxSelectionHelper { list.clear(); splitDistance = -1; splitTime = -1; - processGroupTrack(app, this ); + processGroupTrack(app, this); } public void splitByDistance(OsmandApplication app, double meters) { list.clear(); splitDistance = meters; splitTime = -1; - processGroupTrack(app, this ); + processGroupTrack(app, this); } public void splitByTime(OsmandApplication app, int seconds) { list.clear(); splitDistance = -1; splitTime = seconds; - processGroupTrack(app, this ); + processGroupTrack(app, this); } public int getColor() { From 249871088303c7c2cc037032f6c97c95a59dfc21 Mon Sep 17 00:00:00 2001 From: Viktar Palstsiuk Date: Wed, 6 Apr 2016 09:45:38 +0200 Subject: [PATCH 24/67] Translated using Weblate (Belarusian) Currently translated at 99.5% (1947 of 1956 strings) --- OsmAnd/res/values-be/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-be/strings.xml b/OsmAnd/res/values-be/strings.xml index ee38b4a196..0bbba7c6c0 100644 --- a/OsmAnd/res/values-be/strings.xml +++ b/OsmAnd/res/values-be/strings.xml @@ -1417,14 +1417,14 @@ \n - Калі вам трэба стварыць групу з іншымі ўмовамі, калі ласка, зьвяртайцеся на http://osmo.mobi" Не атрымалася выканаць аўтарызацыю Адбылася памылка аўтарызацыі OsMo: %1$s.\nГэта можа быць выклікана часовай непрацаздольнасьцю службы ці сканьчэньнем вашай рэгістрацыі.\nХочаце зарэгістравацца ізноў? - Схаваць будынкі - Схаваць не аўтамабільныя дарогі - Схаваць тэкст - Схаваць лясы і хмызьнякі + Будынкі + Не аўтамабільныя дарогі + Тэкст + Лясы і хмызьнякі Будынкі на маштабе 15 Больш падрабязна Менш падрабязна - Схаваць абмежаваньні доступу + Абмежаваньні доступу Паказаць абмежаваньні доступу Адлюстроўваць якасьць дарог Адлюстроўваць тып пакрыцьця @@ -1779,7 +1779,7 @@ Захоўваньне мапы Агульнае сховішча Вы хочаце, каб OsmAnd таксама скапіяваў свае файлы дадзеных у новае месца прызначэньня? - Схаваць нумары дамоў + Нумары дамоў Пазьбягаць перасячэньня мяжы іншай краіны Абмежаваньне па вышыні @@ -2003,7 +2003,7 @@ Тэхнічныя артыкулы Падрабязьней Што новага ў - Схаваць плануемыя аб\'екты + Плануемыя аб\'екты македонская ніжненямецкая заходнефрыская @@ -2098,7 +2098,7 @@ Выдаліць Дарога заблякаваная Памяняць месцамі пункт адпраўленьня і пункт прызначэньня - Схаваць значкі POI + Значкі POI Разьбіцьцё на кліпы Выкарыстоўваць разьбіцьцё на кліпы Цыклічны перазапіс кліпаў пры перавышэньні зададзенага аб\'ёму сховішча @@ -2112,7 +2112,7 @@ Стан Захаваць зьмены E-mail адрас - Схаваць падземныя аб\'екты + Падземныя аб\'екты Зьвесткі недаступныя Чытаць далей Вы можаце выдаліць сьцягнутыя абнаўленьні і вярнуцца да першапачатковай рэдакцыі мапы From 1cf0551cff9c65bf82db42f64d8a07ca4aa55f55 Mon Sep 17 00:00:00 2001 From: Leif Larsson Date: Wed, 6 Apr 2016 11:38:31 +0200 Subject: [PATCH 25/67] Translated using Weblate (Swedish) Currently translated at 98.7% (1931 of 1956 strings) --- OsmAnd/res/values-sv/strings.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index a601ed254c..743b65362b 100644 --- a/OsmAnd/res/values-sv/strings.xml +++ b/OsmAnd/res/values-sv/strings.xml @@ -1393,7 +1393,7 @@ Inloggningen till OsMo misslyckades Anslut via inbjudan - " - Alla skapade grupper är offentliga! Om du vill vara anonym, anslut enheter direkt via Tracker-id-\n- Privata grupper är begränsade till åtta personer.\n- Grupper tas bort i fall av inaktivitet eller aktivitet av endast en (1) person under två veckor.\n- Du kan begränsa inträde i grupp (som t.ex. endast via inbjudan) men för att kontrollera gruppen måste du gå till adminkonsollen.\n- Om du behöver skapa en grupp med andra villkor kontakta http://osmo.mobi" + " - När du skapar en grupp, ge den ett namn och fyll i beskrivningen\n- Läs mer på webbplatsen https://osmo.mobi/g/new\n- Via en webbsajt kan du hantera en grupp och placera ut spår och punkter tillgängliga för alla\n- Vi tillåter inte grupper med endast 1 användare om det inte är en POI-grupp\n- Privata grupper är begränsade till 8 personer\n- Mer detaljer finns på webbsajten OsMo.mobi\n- Om du behöver skapa en grupp med andra villkor kontakta http://osmo.mobi " Läs detta innan du skapar en grupp! Behåll Stoppa @@ -1414,14 +1414,14 @@ Starta GPX-loggning Stoppa GPX-loggning Starta nytt segment - Dölj byggnader - Visa endast vägar för motorfordon - Dölj text - Dölj skog och vegetation + Byggnader + Vägar, inte för motorfordon + Text + Skog och vegetation Byggnader vid zoom 15 Fler detaljer Färre detaljer - Dölj tillfartsinskränkningar + Tillfartsinskränkningar Visa tillfartsinskränkningar Visa vägkvalitet Visa vägbeläggning @@ -1747,7 +1747,7 @@ Internminne Kartlagring Kopiera - Dölj husnummer + Husnummer Undvik att korsa gränsen till ett annat land Höjdgräns Smart omräkning av rutt @@ -1967,7 +1967,7 @@ Återkoppling Läs mer Nyheter - Dölj föreslagna objekt + Föreslagna objekt Lågtyska Makedonska Frisiska @@ -2064,7 +2064,7 @@ Post borttagen poster raderade ÅNGRA ALLA - Dölj POI-ikoner + POI-ikoner Skifta startpunkt och destination Antal bidragsgivare Antal redigeringar @@ -2075,7 +2075,7 @@ Lägg till tidsspann Blockerad väg Inga data tillgängliga - Dölj underjordiska objekt + Underjordiska objekt Läs mer Lagringsutrymme E-postadress From 25e736a8a1dcf779ffa04a14b566981d64f387c5 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Tue, 5 Apr 2016 21:38:56 +0200 Subject: [PATCH 26/67] Translated using Weblate (Danish) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-da/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index a32bc7aec3..19e5027b9d 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -2339,4 +2339,5 @@ Tynd Mellem Fed + %s GPX filer valgt From fe698aca4d641518369585792a768e82c4c06479 Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Wed, 6 Apr 2016 04:51:21 +0200 Subject: [PATCH 27/67] Translated using Weblate (Traditional Chinese) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index e7ef331f85..7a202a19a8 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -2159,4 +2159,5 @@ 中等 粗的 細的 + %s GPX 檔案已選擇 From c9914c75d89ba30984363776e46fd5edfb7a841b Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Wed, 6 Apr 2016 17:44:59 +0300 Subject: [PATCH 28/67] Showing active poi name in configure map. --- .../osmand/plus/dialogs/ConfigureMapMenu.java | 4 +++ .../net/osmand/plus/views/POIMapLayer.java | 30 +++++++++++++------ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index 97eb6c51ad..83cc8c7e8e 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -36,6 +36,7 @@ import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.render.RendererRegistry; import net.osmand.plus.views.GPXLayer; import net.osmand.plus.views.OsmandMapTileView; +import net.osmand.plus.views.POIMapLayer; import net.osmand.plus.views.RouteLayer; import net.osmand.plus.views.corenative.NativeCoreContext; import net.osmand.render.RenderingRuleProperty; @@ -136,6 +137,8 @@ public class ConfigureMapMenu { settings.SELECTED_POI_FILTER_FOR_MAP.set(null); if (isChecked) { selectPOILayer(settings); + } else { + adapter.getItem(pos).setDescription(POIMapLayer.getSelectedPoiName(ma.getMyApplication())); } } else if (itemId == R.string.layer_amenity_label) { settings.SHOW_POI_LABEL.set(isChecked); @@ -209,6 +212,7 @@ public class ConfigureMapMenu { adapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(R.string.layer_poi, activity) .setSelected(settings.SELECTED_POI_FILTER_FOR_MAP.get() != null) + .setDescription(POIMapLayer.getSelectedPoiName(app)) .setColor(selected ? R.color.osmand_orange : defaultColor) .setIcon(R.drawable.ic_action_info_dark) .setSecondaryIcon(R.drawable.ic_action_additional_option) diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index 28e561711a..4df16092f3 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -14,6 +14,7 @@ import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.Drawable; import android.net.Uri; +import android.support.v4.content.ContextCompat; import android.support.v4.view.MenuItemCompat; import android.support.v7.widget.PopupMenu; import android.support.v7.widget.Toolbar; @@ -120,7 +121,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon protected List calculateResult(RotatedTileBox tileBox) { QuadRect latLonBounds = tileBox.getLatLonBounds(); if (filter == null || latLonBounds == null) { - return new ArrayList(); + return new ArrayList<>(); } int z = (int) Math.floor(tileBox.getZoom() + Math.log(view.getSettings().MAP_DENSITY.get()) / Math.log(2)); @@ -178,7 +179,8 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon private StringBuilder buildPoiInformation(StringBuilder res, Amenity n) { String format = OsmAndFormatter.getPoiStringWithoutType(n, view.getSettings().MAP_PREFERRED_LOCALE.get()); - res.append(" " + format + "\n" + OsmAndFormatter.getAmenityDescriptionContent(view.getApplication(), n, true)); + res.append(" ").append(format).append("\n").append( + OsmAndFormatter.getAmenityDescriptionContent(view.getApplication(), n, true)); return res; } @@ -201,7 +203,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon public int getRadiusPoi(RotatedTileBox tb) { - int r = 0; + int r; final double zoom = tb.getZoom(); if (zoom < startZoom) { r = 0; @@ -313,6 +315,16 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon showText(ctx, app, text, title); } + public static String getSelectedPoiName(OsmandApplication app) { + PoiFiltersHelper pfh = app.getPoiFilters(); + String filterId = app.getSettings().SELECTED_POI_FILTER_FOR_MAP.get(); + if (filterId == null) { + return app.getResources().getString(R.string.none); + } + PoiUIFilter filter = pfh.getFilterById(filterId); + return filter.getName(); + } + static int getResIdFromAttribute(final Context ctx, final int attr) { if (attr == 0) return 0; @@ -339,8 +351,8 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon Drawable back = app.getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha); topBar.setNavigationIcon(back); topBar.setTitle(title); - topBar.setBackgroundColor(ctx.getResources().getColor(getResIdFromAttribute(ctx, R.attr.pstsTabBackground))); - topBar.setTitleTextColor(ctx.getResources().getColor(getResIdFromAttribute(ctx, R.attr.pstsTextColor))); + topBar.setBackgroundColor(ContextCompat.getColor(ctx, getResIdFromAttribute(ctx, R.attr.pstsTabBackground))); + topBar.setTitleTextColor(ContextCompat.getColor(ctx, getResIdFromAttribute(ctx, R.attr.pstsTextColor))); String lng = a.getContentSelected("content", preferredLang, "en"); if (Algorithms.isEmpty(lng)) { @@ -421,8 +433,8 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon Drawable back = app.getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha); topBar.setNavigationIcon(back); topBar.setTitle(title); - topBar.setBackgroundColor(ctx.getResources().getColor(getResIdFromAttribute(ctx, R.attr.pstsTabBackground))); - topBar.setTitleTextColor(ctx.getResources().getColor(getResIdFromAttribute(ctx, R.attr.pstsTextColor))); + topBar.setBackgroundColor(ContextCompat.getColor(ctx, getResIdFromAttribute(ctx, R.attr.pstsTabBackground))); + topBar.setTitleTextColor(ContextCompat.getColor(ctx, getResIdFromAttribute(ctx, R.attr.pstsTextColor))); topBar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(final View v) { @@ -437,7 +449,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon textView.setLayoutParams(llTextParams); textView.setPadding(textMargin, textMargin, textMargin, textMargin); textView.setTextSize(16); - textView.setTextColor(app.getResources().getColor(light ? R.color.ctx_menu_info_text_light : R.color.ctx_menu_info_text_dark)); + textView.setTextColor(ContextCompat.getColor(app, light ? R.color.ctx_menu_info_text_light : R.color.ctx_menu_info_text_dark)); textView.setAutoLinkMask(Linkify.ALL); textView.setLinksClickable(true); textView.setText(text); @@ -457,7 +469,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon protected static void showPopupLangMenu(final Context ctx, Toolbar tb, final OsmandApplication app, final Amenity a, final Dialog dialog) { final PopupMenu optionsMenu = new PopupMenu(ctx, tb, Gravity.RIGHT); - Set names = new TreeSet(); + Set names = new TreeSet<>(); names.addAll(a.getNames("content", "en")); names.addAll(a.getNames("description", "en")); From 606450dd2666932b434f9e2e0470a10076162c44 Mon Sep 17 00:00:00 2001 From: "Igor B. Poretsky" Date: Wed, 30 Mar 2016 23:54:21 +0300 Subject: [PATCH 29/67] Obvious typo fix in Russian strings. --- OsmAnd/res/values-ru/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index 382ecda196..c1cc7a6a77 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -1205,8 +1205,8 @@ OsMo Неправильный формат: %s Маршрут предоставленный через OsmAnd - " OsmAnd - открытый источник и активно развается. Все могут способствовать развитию, сообщая об ошибках, улучшая переводы или программируя новые дополнения. Проект находится в живом состоянии непрерывного улучшения всеми этими формами взаимодействия разработчика и пользователя. Прогресс проекта также полагается на финансовые взносы, чтобы финансировать развитие, кодирование и тестирование новых функциональностей. Покупая OsmAnd+ Вы помогаете приложению быть ещё лучше! Также возможно финансировать определенные новые особенности или сделать общее пожертвование на osmand.net. Приблизительное покрытие карты и качество: - Западная Европа: **** - Восточная Европа: *** - Россия: *** - Северная Америка: *** - Южная Америка: ** - Азия: ** - Япония & Корея: *** - Ближний Восток: ** - Африка: ** - Антарктида: * Список поддерживаемых стран (в основном по всему миру!): Афганистан, Албания, Алжир, Андорра, Ангола, Ангилья, Антигуа и Барбуда, Аргентина, Армения, Аруба, Австралия, Австрия, Азербайджан, Багамы, Бахрейн, Бангладеш, Барбадос, Белоруссия, Бельгия, Белиз, Бенин, Бермуды, Бутан, Боливия, Бонэйр, Босния и Герцеговина, Ботсвана, Бразилия, Британские Виргинские острова, Бруней, Болгария, Буркина-Фасо, Бурунди, Камбоджа, Камерун, Канада, Кабо-Верде, Центральноафриканская Республика, Чад, Чили, Китай, Колумбия, Коморские острова, Конго, Коста-Рика, Кот-д\"Ивуар, Хорватия, Куба, Кюрасао, Кипр, Чешская Республика, Дания, Джибути, Доминика, Доминиканская Республика, Эквадор, Египет, Сальвадор, Экваториальная Гвинея, Эритрея, Эстония, Эфиопия, Фиджи, Финляндия, Франция, Французская Гвиана, Французская Полинезия, Габон, Гамбия, Грузия, Германия, Гана, Гибралтар, Греция, Гренландия, Гренада, Гваделупа, Гуам, Гватемала, Гернси, Гвинея, Гвинея-Бисау, Гайана, Гаити, Ватикан, Гондурас, Гонконг, Венгрия, Исландия, Индия, Индонезия, Иран, Ирак, Ирландия, Остров Мэн, Израиль, Италия, Ямайка, Япония, Джерси, Иордания, Казахстан, Кения, Кирибати, Северная Корея и Южная Корея, Кувейт, Кыргызстан, Лаос, Латвия, Ливан, Лесото, Либерия, Ливия, Лихтенштейн, Литва, Люксембург, Макао, Македония, Мадагаскар, Малави, Малайзия, Мальдивы, Мали, Мальта, Мартиника, Мавритания, Маврикий, Майотта, Мексика, Микронезия, Молдова, Монако, Монголия, Черногория, Монтсеррат, Марокко, Мозамбик, Мьянма, Намибия, Науру, Непал, Нидерланды, Нидерландские Антильские острова, Новая Каледония, Новая Зеландия, Никарагуа, Нигер, Нигерия, Норвегия, Оман, Пакистан, Палау, палестинская Территория, Панама, Папуа-Новая Гвинея, Парагвай, Перу, Филиппины, Польша, Португалия, Пуэрто-Рико, Катар, Румыния, Россия, Руанда, Сен-Бартелеми, Остров Святой Елены, Сент-Китс и Невис, Сент-Люсия, Сен-Мартен, Сен-Пьер и Микелон, Сент-Винсент и Гренадины, Самоа, Сан-Марино, Саудовская Аравия, Сенегал, Сербия, Сейшельские острова, Сьерра-Леоне, Сингапур, Словакия, Словения, Сомали, Южная Африка, Южная Георгия, Южный Судан, Испания, Шри-Ланка, Судан, Суринам, Свазиленд, Швеция, Швейцария, Сирия, Тайвань, Таджикистан, Танзания, Таиланд, Тимор-Leste, Того, Токелау, Тонга, Тринидад и Тобаго, Тунис, Турция, Туркмения, Тувалу, Уганда, Украина, Объединенные Арабские Эмираты, Соединенное Королевство (UK), Соединенные Штаты Америки (США), Уругвай, Узбекистан, Вануату, Венесуэла, Вьетнам, Уоллис и Футуна, Западная Сахара, Йемен, Замбия, Зимбабве. " - " OsmAnd - открытый источник и активно развается. Все могут способствовать развитию, сообщая об ошибках, улучшая переводы или программируя новые дополнения. Проект находится в живом состоянии непрерывного улучшения всеми этими формами взаимодействия разработчика и пользователя. Прогресс проекта также полагается на финансовые взносы, чтобы финансировать развитие, кодирование и тестирование новых функциональностей. Покупая OsmAnd+ Вы помогаете приложению быть ещё лучше! Также возможно финансировать определенные новые особенности или сделать общее пожертвование на osmand.net. Приблизительное покрытие карты и качество: - Западная Европа: **** - Восточная Европа: *** - Россия: *** - Северная Америка: *** - Южная Америка: ** - Азия: ** - Япония & Корея: *** - Ближний Восток: ** - Африка: ** - Антарктида: * Список поддерживаемых стран (в основном по всему миру!):↵ Афганистан, Албания, Алжир, Андорра, Ангола, Ангилья, Антигуа и Барбуда, Аргентина, Армения, Аруба, Австралия, Австрия, Азербайджан, Багамы, Бахрейн, Бангладеш, Барбадос, Белоруссия, Бельгия, Белиз, Бенин, Бермуды, Бутан, Боливия, Бонэйр, Босния и Герцеговина, Ботсвана, Бразилия, Британские Виргинские острова, Бруней, Болгария, Буркина-Фасо, Бурунди, Камбоджа, Камерун, Канада, Кабо-Верде, Центральноафриканская Республика, Чад, Чили, Китай, Колумбия, Коморские острова, Конго, Коста-Рика, Кот-д\"Ивуар, Хорватия, Куба, Кюрасао, Кипр, Чешская Республика, Дания, Джибути, Доминика, Доминиканская Республика, Эквадор, Египет, Сальвадор, Экваториальная Гвинея, Эритрея, Эстония, Эфиопия, Фиджи, Финляндия, Франция, Французская Гвиана, Французская Полинезия, Габон, Гамбия, Грузия, Германия, Гана, Гибралтар, Греция, Гренландия, Гренада, Гваделупа, Гуам, Гватемала, Гернси, Гвинея, Гвинея-Бисау, Гайана, Гаити, Ватикан, Гондурас, Гонконг, Венгрия, Исландия, Индия, Индонезия, Иран, Ирак, Ирландия, Остров Мэн, Израиль, Италия, Ямайка, Япония, Джерси, Иордания, Казахстан, Кения, Кирибати, Северная Корея и Южная Корея, Кувейт, Кыргызстан, Лаос, Латвия, Ливан, Лесото, Либерия, Ливия, Лихтенштейн, Литва, Люксембург, Макао, Македония, Мадагаскар, Малави, Малайзия, Мальдивы, Мали, Мальта, Мартиника, Мавритания, Маврикий, Майотта, Мексика, Микронезия, Молдова, Монако, Монголия, Черногория, Монтсеррат, Марокко, Мозамбик, Мьянма, Намибия, Науру, Непал, Нидерланды, Нидерландские Антильские острова, Новая Каледония, Новая Зеландия, Никарагуа, Нигер, Нигерия, Норвегия, Оман, Пакистан, Палау, палестинская Территория, Панама, Папуа-Новая Гвинея, Парагвай, Перу, Филиппины, Польша, Португалия, Пуэрто-Рико, Катар, Румыния, Россия, Руанда, Сен-Бартелеми, Остров Святой Елены, Сент-Китс и Невис, Сент-Люсия, Сен-Мартен, Сен-Пьер и Микелон, Сент-Винсент и Гренадины, Самоа, Сан-Марино, Саудовская Аравия, Сенегал, Сербия, Сейшельские острова, Сьерра-Леоне, Сингапур, Словакия, Словения, Сомали, Южная Африка, Южная Георгия, Южный Судан, Испания, Шри-Ланка, Судан, Суринам, Свазиленд, Швеция, Швейцария, Сирия, Тайвань, Таджикистан, Танзания, Таиланд, Тимор-Leste, Того, Токелау, Тонга, Тринидад и Тобаго, Тунис, Турция, Туркмения, Тувалу, Уганда, Украина, Объединенные Арабские Эмираты, Соединенное Королевство (UK), Соединенные Штаты Америки (США), Уругвай, Узбекистан, Вануату, Венесуэла, Вьетнам, Уоллис и Футуна, Западная Сахара, Йемен, Замбия, Зимбабве. " + " OsmAnd - открытый источник и активно развивается. Все могут способствовать развитию, сообщая об ошибках, улучшая переводы или программируя новые дополнения. Проект находится в живом состоянии непрерывного улучшения всеми этими формами взаимодействия разработчика и пользователя. Прогресс проекта также полагается на финансовые взносы, чтобы финансировать развитие, кодирование и тестирование новых функциональностей. Покупая OsmAnd+ Вы помогаете приложению быть ещё лучше! Также возможно финансировать определенные новые особенности или сделать общее пожертвование на osmand.net. Приблизительное покрытие карты и качество: - Западная Европа: **** - Восточная Европа: *** - Россия: *** - Северная Америка: *** - Южная Америка: ** - Азия: ** - Япония & Корея: *** - Ближний Восток: ** - Африка: ** - Антарктида: * Список поддерживаемых стран (в основном по всему миру!): Афганистан, Албания, Алжир, Андорра, Ангола, Ангилья, Антигуа и Барбуда, Аргентина, Армения, Аруба, Австралия, Австрия, Азербайджан, Багамы, Бахрейн, Бангладеш, Барбадос, Белоруссия, Бельгия, Белиз, Бенин, Бермуды, Бутан, Боливия, Бонэйр, Босния и Герцеговина, Ботсвана, Бразилия, Британские Виргинские острова, Бруней, Болгария, Буркина-Фасо, Бурунди, Камбоджа, Камерун, Канада, Кабо-Верде, Центральноафриканская Республика, Чад, Чили, Китай, Колумбия, Коморские острова, Конго, Коста-Рика, Кот-д\"Ивуар, Хорватия, Куба, Кюрасао, Кипр, Чешская Республика, Дания, Джибути, Доминика, Доминиканская Республика, Эквадор, Египет, Сальвадор, Экваториальная Гвинея, Эритрея, Эстония, Эфиопия, Фиджи, Финляндия, Франция, Французская Гвиана, Французская Полинезия, Габон, Гамбия, Грузия, Германия, Гана, Гибралтар, Греция, Гренландия, Гренада, Гваделупа, Гуам, Гватемала, Гернси, Гвинея, Гвинея-Бисау, Гайана, Гаити, Ватикан, Гондурас, Гонконг, Венгрия, Исландия, Индия, Индонезия, Иран, Ирак, Ирландия, Остров Мэн, Израиль, Италия, Ямайка, Япония, Джерси, Иордания, Казахстан, Кения, Кирибати, Северная Корея и Южная Корея, Кувейт, Кыргызстан, Лаос, Латвия, Ливан, Лесото, Либерия, Ливия, Лихтенштейн, Литва, Люксембург, Макао, Македония, Мадагаскар, Малави, Малайзия, Мальдивы, Мали, Мальта, Мартиника, Мавритания, Маврикий, Майотта, Мексика, Микронезия, Молдова, Монако, Монголия, Черногория, Монтсеррат, Марокко, Мозамбик, Мьянма, Намибия, Науру, Непал, Нидерланды, Нидерландские Антильские острова, Новая Каледония, Новая Зеландия, Никарагуа, Нигер, Нигерия, Норвегия, Оман, Пакистан, Палау, палестинская Территория, Панама, Папуа-Новая Гвинея, Парагвай, Перу, Филиппины, Польша, Португалия, Пуэрто-Рико, Катар, Румыния, Россия, Руанда, Сен-Бартелеми, Остров Святой Елены, Сент-Китс и Невис, Сент-Люсия, Сен-Мартен, Сен-Пьер и Микелон, Сент-Винсент и Гренадины, Самоа, Сан-Марино, Саудовская Аравия, Сенегал, Сербия, Сейшельские острова, Сьерра-Леоне, Сингапур, Словакия, Словения, Сомали, Южная Африка, Южная Георгия, Южный Судан, Испания, Шри-Ланка, Судан, Суринам, Свазиленд, Швеция, Швейцария, Сирия, Тайвань, Таджикистан, Танзания, Таиланд, Тимор-Leste, Того, Токелау, Тонга, Тринидад и Тобаго, Тунис, Турция, Туркмения, Тувалу, Уганда, Украина, Объединенные Арабские Эмираты, Соединенное Королевство (UK), Соединенные Штаты Америки (США), Уругвай, Узбекистан, Вануату, Венесуэла, Вьетнам, Уоллис и Футуна, Западная Сахара, Йемен, Замбия, Зимбабве. " + " OsmAnd - открытый источник и активно развивается. Все могут способствовать развитию, сообщая об ошибках, улучшая переводы или программируя новые дополнения. Проект находится в живом состоянии непрерывного улучшения всеми этими формами взаимодействия разработчика и пользователя. Прогресс проекта также полагается на финансовые взносы, чтобы финансировать развитие, кодирование и тестирование новых функциональностей. Покупая OsmAnd+ Вы помогаете приложению быть ещё лучше! Также возможно финансировать определенные новые особенности или сделать общее пожертвование на osmand.net. Приблизительное покрытие карты и качество: - Западная Европа: **** - Восточная Европа: *** - Россия: *** - Северная Америка: *** - Южная Америка: ** - Азия: ** - Япония & Корея: *** - Ближний Восток: ** - Африка: ** - Антарктида: * Список поддерживаемых стран (в основном по всему миру!):↵ Афганистан, Албания, Алжир, Андорра, Ангола, Ангилья, Антигуа и Барбуда, Аргентина, Армения, Аруба, Австралия, Австрия, Азербайджан, Багамы, Бахрейн, Бангладеш, Барбадос, Белоруссия, Бельгия, Белиз, Бенин, Бермуды, Бутан, Боливия, Бонэйр, Босния и Герцеговина, Ботсвана, Бразилия, Британские Виргинские острова, Бруней, Болгария, Буркина-Фасо, Бурунди, Камбоджа, Камерун, Канада, Кабо-Верде, Центральноафриканская Республика, Чад, Чили, Китай, Колумбия, Коморские острова, Конго, Коста-Рика, Кот-д\"Ивуар, Хорватия, Куба, Кюрасао, Кипр, Чешская Республика, Дания, Джибути, Доминика, Доминиканская Республика, Эквадор, Египет, Сальвадор, Экваториальная Гвинея, Эритрея, Эстония, Эфиопия, Фиджи, Финляндия, Франция, Французская Гвиана, Французская Полинезия, Габон, Гамбия, Грузия, Германия, Гана, Гибралтар, Греция, Гренландия, Гренада, Гваделупа, Гуам, Гватемала, Гернси, Гвинея, Гвинея-Бисау, Гайана, Гаити, Ватикан, Гондурас, Гонконг, Венгрия, Исландия, Индия, Индонезия, Иран, Ирак, Ирландия, Остров Мэн, Израиль, Италия, Ямайка, Япония, Джерси, Иордания, Казахстан, Кения, Кирибати, Северная Корея и Южная Корея, Кувейт, Кыргызстан, Лаос, Латвия, Ливан, Лесото, Либерия, Ливия, Лихтенштейн, Литва, Люксембург, Макао, Македония, Мадагаскар, Малави, Малайзия, Мальдивы, Мали, Мальта, Мартиника, Мавритания, Маврикий, Майотта, Мексика, Микронезия, Молдова, Монако, Монголия, Черногория, Монтсеррат, Марокко, Мозамбик, Мьянма, Намибия, Науру, Непал, Нидерланды, Нидерландские Антильские острова, Новая Каледония, Новая Зеландия, Никарагуа, Нигер, Нигерия, Норвегия, Оман, Пакистан, Палау, палестинская Территория, Панама, Папуа-Новая Гвинея, Парагвай, Перу, Филиппины, Польша, Португалия, Пуэрто-Рико, Катар, Румыния, Россия, Руанда, Сен-Бартелеми, Остров Святой Елены, Сент-Китс и Невис, Сент-Люсия, Сен-Мартен, Сен-Пьер и Микелон, Сент-Винсент и Гренадины, Самоа, Сан-Марино, Саудовская Аравия, Сенегал, Сербия, Сейшельские острова, Сьерра-Леоне, Сингапур, Словакия, Словения, Сомали, Южная Африка, Южная Георгия, Южный Судан, Испания, Шри-Ланка, Судан, Суринам, Свазиленд, Швеция, Швейцария, Сирия, Тайвань, Таджикистан, Танзания, Таиланд, Тимор-Leste, Того, Токелау, Тонга, Тринидад и Тобаго, Тунис, Турция, Туркмения, Тувалу, Уганда, Украина, Объединенные Арабские Эмираты, Соединенное Королевство (UK), Соединенные Штаты Америки (США), Уругвай, Узбекистан, Вануату, Венесуэла, Вьетнам, Уоллис и Футуна, Западная Сахара, Йемен, Замбия, Зимбабве. " Только вручную (нажатием \"стрелочки\") Повторять навигационные инструкции с регулярными интервалами Повторять навигационные инструкции From dc33fc57efc40998bc54f96e22bebb4e18b42fad Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Wed, 6 Apr 2016 18:10:41 +0300 Subject: [PATCH 30/67] Showing active poi name in configure map. --- OsmAnd/res/values/strings.xml | 2 +- .../net/osmand/plus/dialogs/ConfigureMapMenu.java | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 39478ad16f..4a56eafe6c 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,7 @@ 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + Map mode %s GPX files selected Thin Medium @@ -1426,7 +1427,6 @@ If you need help with OsmAnd application, please contact our support team: suppo Select transport mode Sunrise: %1$s \nSunset: %2$s Day/night info - Day/night map Map style Configure screen Show lanes diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index 83cc8c7e8e..d4881917b1 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -269,10 +269,9 @@ public class ConfigureMapMenu { .setTitleId(R.string.map_widget_map_rendering, activity) .setCategory(true) .setLayout(R.layout.list_group_title_with_switch).createItem()); - String descr = getRenderDescr(activity); adapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(R.string.map_widget_renderer, activity) - .setDescription(descr) + .setDescription(getRenderDescr(activity)) .setLayout(R.layout.list_item_single_line_descrition_narrow) .setIcon(R.drawable.ic_map) .setListener(new ContextMenuAdapter.ItemClickListener() { @@ -319,7 +318,7 @@ public class ConfigureMapMenu { }).createItem()); adapter.addItem(new ContextMenuItem.ItemBuilder() - .setTitleId(R.string.map_widget_day_night, activity) + .setTitleId(R.string.map_mode, activity) .setDescription(getDayNightDescr(activity)) .setLayout(R.layout.list_item_single_line_descrition_narrow) .setIcon(getDayNightIcon(activity)) @@ -444,9 +443,12 @@ public class ConfigureMapMenu { } }).createItem()); + String localeDescr = activity.getMyApplication().getSettings().MAP_PREFERRED_LOCALE.get(); + localeDescr = localeDescr == null || localeDescr.equals("") ? + activity.getString(R.string.local_map_names) : localeDescr; adapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(R.string.map_locale, activity) - .setDescription(activity.getMyApplication().getSettings().MAP_PREFERRED_LOCALE.get()) + .setDescription(localeDescr) .setLayout(R.layout.list_item_single_line_descrition_narrow) .setIcon(R.drawable.ic_action_map_language) .setListener(new ContextMenuAdapter.ItemClickListener() { @@ -471,7 +473,10 @@ public class ConfigureMapMenu { public void onClick(DialogInterface dialog, int which) { view.getSettings().MAP_PREFERRED_LOCALE.set(txtIds[which]); refreshMapComplete(activity); - adapter.getItem(pos).setDescription(txtIds[which]); + String localeDescr = txtIds[which]; + localeDescr = localeDescr == null || localeDescr.equals("") ? + activity.getString(R.string.local_map_names) : localeDescr; + adapter.getItem(pos).setDescription(localeDescr); ad.notifyDataSetInvalidated(); dialog.dismiss(); } From 90a41b166cc9a92f726e9c49830fee8d155784b7 Mon Sep 17 00:00:00 2001 From: josep constanti Date: Wed, 6 Apr 2016 17:34:23 +0200 Subject: [PATCH 31/67] Translated using Weblate (Catalan) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-ca/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index f899ddc4bf..c01c6012d7 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -2004,4 +2004,6 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Afegeix un lapse de temps Divisió d\'enregistrament Utilitza divisió d\'enregistrament + Mode mapa + "Seleccionats %s arxius GPX" From a8cc1aafb96e8d8d5ece91d80c0bad761a60af22 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Wed, 6 Apr 2016 15:54:29 +0200 Subject: [PATCH 32/67] Translated using Weblate (Danish) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-da/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 19e5027b9d..9456370f34 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -2340,4 +2340,5 @@ Mellem Fed %s GPX filer valgt + Korttilstand From c59acacc606154d419dde1b6d389af83c92950a2 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Wed, 6 Apr 2016 19:15:51 +0300 Subject: [PATCH 33/67] Prevent POI dialog from dropping scroll in configure map. --- .../osmand/plus/dialogs/ConfigureMapMenu.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index d4881917b1..d3f7cdfabf 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -107,10 +107,10 @@ public class ConfigureMapMenu { @Override public boolean onRowItemClick(ArrayAdapter adapter, View view, int itemId, int pos) { if (itemId == R.string.layer_poi) { - selectPOILayer(ma.getMyApplication().getSettings()); + selectPOILayer(adapter, adapter.getItem(pos)); return false; } else if (itemId == R.string.layer_gpx_layer && cm.getItem(pos).getSelected()) { - ma.getMapLayers().showGPXFileLayer(getAlreadySelectedGpx(), ma.getMapView()); + showGpxSelectionDialog(); return false; } else { CompoundButton btn = (CompoundButton) view.findViewById(R.id.toggle_item); @@ -136,7 +136,7 @@ public class ConfigureMapMenu { if (itemId == R.string.layer_poi) { settings.SELECTED_POI_FILTER_FOR_MAP.set(null); if (isChecked) { - selectPOILayer(settings); + selectPOILayer(adapter, adapter.getItem(pos)); } else { adapter.getItem(pos).setDescription(POIMapLayer.getSelectedPoiName(ma.getMyApplication())); } @@ -150,18 +150,7 @@ public class ConfigureMapMenu { selectedGpxHelper.clearAllGpxFileToShow(); adapter.getItem(pos).setDescription(selectedGpxHelper.getGpxDescription()); } else { - AlertDialog dialog = ma.getMapLayers() - .showGPXFileLayer(getAlreadySelectedGpx(), ma.getMapView()); - dialog.setOnDismissListener(new DialogInterface.OnDismissListener() { - @Override - public void onDismiss(DialogInterface dialog) { - boolean areAnyGpxTracksVisible = - selectedGpxHelper.isShowingAnyGpxFiles(); - item.setSelected(areAnyGpxTracksVisible); - item.setColorRes(areAnyGpxTracksVisible ? R.color.osmand_orange : defaultColor); - adapter.notifyDataSetChanged(); - } - }); + showGpxSelectionDialog(); } } else if (itemId == R.string.layer_map) { if (OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) == null) { @@ -179,14 +168,25 @@ public class ConfigureMapMenu { return false; } - protected void selectPOILayer(final OsmandSettings settings) { + private void showGpxSelectionDialog() { + ma.getMapLayers().showGPXFileLayer(getAlreadySelectedGpx(), ma.getMapView()); + } + + protected void selectPOILayer(final ArrayAdapter adapter, + final ContextMenuItem item) { final PoiUIFilter[] selected = new PoiUIFilter[1]; AlertDialog dlg = ma.getMapLayers().selectPOIFilterLayer(ma.getMapView(), selected); dlg.setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { - ma.getDashboard().refreshContent(true); + OsmandApplication myApplication = ma.getMyApplication(); + boolean selected = myApplication.getSettings() + .SELECTED_POI_FILTER_FOR_MAP.get() != null; + item.setSelected(selected); + item.setDescription(POIMapLayer.getSelectedPoiName(myApplication)); + item.setColorRes(selected ? R.color.osmand_orange : defaultColor); + adapter.notifyDataSetChanged(); } }); } From fa5a753e45d52c8b54ab32eccd27ac0c3a735e70 Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Wed, 6 Apr 2016 17:13:28 +0200 Subject: [PATCH 34/67] Translated using Weblate (French) Currently translated at 99.8% (1955 of 1957 strings) --- OsmAnd/res/values-fr/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 5835707b19..ccc9e0afbd 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -2195,4 +2195,6 @@ Fin Moyen Épais + %s fichiers GPX sélectionnés + Mode Carte From 731854ac9055102910bdb93c341e8089b93415cb Mon Sep 17 00:00:00 2001 From: Roberto GEB Date: Wed, 6 Apr 2016 18:16:08 +0200 Subject: [PATCH 35/67] Translated using Weblate (Spanish) Currently translated at 99.4% (1946 of 1957 strings) --- OsmAnd/res/values-es/strings.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index f79bee833f..5d7af2254f 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -2132,4 +2132,8 @@ Por favor, añade marcadores de mapa via mapa No se han encontrado puntos intermedios El nombre de archivo contiene caracteres ilegales - +Modo mapa + %s archivos GPX seleccionados + Fino + Mediano + From cfb73f627cb2ab8dcdc9d14f87ddbddf1a49271c Mon Sep 17 00:00:00 2001 From: Roberto GEB Date: Wed, 6 Apr 2016 18:20:40 +0200 Subject: [PATCH 36/67] Translated using Weblate (Spanish) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-es/strings.xml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index 5d7af2254f..4430773b78 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -1422,14 +1422,14 @@ No hay archivos GPX seleccionados. Para seleccionar presione y mantenga presionado en la traza disponible. Marcar para mostrar No se encontraron descargas, compruebe su conexión a Internet. - Ocultar edificios - Ocultar vías no aptas para vehículos - Ocultar textos - Ocultar bosques y matorrales + Edificios + Vías no aptas para vehículos + Textos + Bosques y matorrales Edificios en acercamiento 15 Más detalles Menos detalles - Ocultar restricciones de acceso + Restricciones de acceso Mostrar restricciones de acceso Mostrar calidad de carreteras Mostrar superficie de carreteras @@ -1729,7 +1729,7 @@ Almacenamiento del mapa Copiar ¿Quiere que OsmAnd también copie los archivos de datos al nuevo destino? - Ocultar números de casa + Números de casa Evita cruzar una frontera hacia otro país Límite de altura Especifique la altura del vehículo que se permite en las rutas @@ -1939,7 +1939,7 @@ Leyenda del mapa Actualizar Subir - Ocultar objetos propuestos + Objetos propuestos Leer más Novedades en Bajo Alemán @@ -2051,11 +2051,11 @@ Carretera bloqueada Seleccionar Invertir punto de partida y destino - Ocultar iconos de PDI + Iconos de PDI Número de colaboradores Número de ediciones Informe para -Ocultar objetos subterráneos +Objetos subterráneos No hay datos disponibles Leer más " OsmAnd Mapas y Navegación - encuentra ubicaciones en el mapa y calcula rutas sin conexión a Internet. Descarga un mapa de un país antes de que viajes para encontrar sitios y rutas en un área que no te sea familiar. Opciones básicas: • Mapas detallados de 200 países • Navegador fuera de línea con avisos de voz • Búsqueda de direcciones en modo sin conexión • Información sobre ubicaciones en el mapa: sitios de interés, cafeterías, aparcamientos, tiendas • Añadir ubicaciones a tus favoritos • Opciones adicionales de navegación en modos Conducción, Ciclismo y Pedestre : • Capacidad de ver y grabar trazas GPX • Descripciones de Wikipedia de los PDI • Añadir notas de foto, audio y vídeo al mapa • Modos de mapa Día y Noche para una conducción más conveniente • Información sobre rutas y paradas de transporte público • Vías ciclistas y caminos • Vías de senderismo para hacer turismo en todo el mundo • Mapas en línea de numerosas fuentes • Información sobre calidad del pavimento e iluminación de las calles • Añadir, editar y eliminar PDI (para usuarios deOpenstreetmap.org) • OsMo - monitorización de directo de otros dispositivos Consigue un explorador fiable en tu país - ya sea Francia, Alemania, México, Reino Unido, España, Holanda, EE.UU., Rusia, Brasil o cualquiera otro estado. Extras: • Mapas de contorno y sombreado del terreno https://goo.gl/7mojP8 Datos de curvas de nivel y visualización de terreno añadidos al mapa básico OsmAnd . • Mapas de esquí https://goo.gl/pX6DxJ La información sobre pistas de esquí, pistas de esquí de fondo, telecabinas y ascensores de esquí. • Mapa náutico https://goo.gl/0hEdxm Estilo de mapa especial para ver señales de navegación náutica para arteriales y navegación costera. • Posición de aparcamiento https://goo.gl/6jxQXF Te ayuda a marcar la ubicación de tu vehículo aparcado y ver cuánto tiempo queda si el aparcamiento es por tiempo limitado. ¡Mantente informado! Twitter: https://twitter.com/osmandapp Facebook: https://www.facebook.com/osmandapp Sitio: http://osmand.net Si necesitas ayuda con la aplicación OsmAnd, por favor contacta con nuestro equipo de soporte: support@osmand.net. " @@ -2136,4 +2136,5 @@ %s archivos GPX seleccionados Fino Mediano + Negrita From f86cafb6c677ccd1fb206088278f3d5915c7b33f Mon Sep 17 00:00:00 2001 From: Franco Date: Wed, 6 Apr 2016 18:42:11 +0200 Subject: [PATCH 37/67] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index 450627bdce..db002983d0 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -2149,4 +2149,6 @@ Delgado Mediano Grueso + Modo mapa + %s archivos GPX elegidos From 5a87d178331d80939845069c447291d457c9a3d6 Mon Sep 17 00:00:00 2001 From: Franco Date: Wed, 6 Apr 2016 18:43:28 +0200 Subject: [PATCH 38/67] Translated using Weblate (Spanish) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-es-rUS/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml index 684e796cb2..1cddc7d2e4 100644 --- a/OsmAnd/res/values-es-rUS/strings.xml +++ b/OsmAnd/res/values-es-rUS/strings.xml @@ -2146,7 +2146,9 @@ El nombre del archivo contiene caracteres ilegales Añade marcadores a través del mapa No se encontraron puntos de ruta - Delgado + Fino Mediano Grueso + Modo mapa + %s archivos GPX elegidos From 39df65ffc4abe1ea93056089aee2e1cadc712ef8 Mon Sep 17 00:00:00 2001 From: jf-simon Date: Wed, 6 Apr 2016 21:55:47 +0200 Subject: [PATCH 39/67] Translated using Weblate (German) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index b856b35e7b..995259c845 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -2133,4 +2133,6 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su Dünn Mittel Fett + Kartenmodus + %s GPX Dateien ausgewählt From 803ca9c7262bab9294cd5e1b6ce9eeebe9358683 Mon Sep 17 00:00:00 2001 From: sonora Date: Thu, 7 Apr 2016 01:18:30 +0200 Subject: [PATCH 40/67] use localized none string --- OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java | 2 +- OsmAnd/src/net/osmand/plus/views/POIMapLayer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index c8dd0d310d..f723335ec0 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -58,7 +58,7 @@ public class GpxSelectionHelper { File file = new File(selectedGPXFiles.get(0).getGpxFile().path); return Algorithms.getFileNameWithoutExtension(file); } else if (selectedGPXFiles.size() == 0) { - return app.getResources().getString(R.string.none); + return app.getResources().getString(R.string.shared_string_none); } else { return app.getResources().getString(R.string.number_of_gpx_files_selected_pattern, selectedGPXFiles.size()); diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index 4df16092f3..05782b65c4 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -319,7 +319,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon PoiFiltersHelper pfh = app.getPoiFilters(); String filterId = app.getSettings().SELECTED_POI_FILTER_FOR_MAP.get(); if (filterId == null) { - return app.getResources().getString(R.string.none); + return app.getResources().getString(R.string.shared_string_none); } PoiUIFilter filter = pfh.getFilterById(filterId); return filter.getName(); From 6b081278f0f7ba4cf51bc287aeb9056e30e1b27b Mon Sep 17 00:00:00 2001 From: Viktar Palstsiuk Date: Wed, 6 Apr 2016 19:11:37 +0200 Subject: [PATCH 41/67] Translated using Weblate (Belarusian) Currently translated at 99.8% (1954 of 1957 strings) --- OsmAnd/res/values-be/strings.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OsmAnd/res/values-be/strings.xml b/OsmAnd/res/values-be/strings.xml index 0bbba7c6c0..4f95898ba9 100644 --- a/OsmAnd/res/values-be/strings.xml +++ b/OsmAnd/res/values-be/strings.xml @@ -2180,4 +2180,12 @@ Тонкі Сярэдні Тоўсты + Рэжым мапы + Абрана %s GPX файлаў + Хочаце дадаць усе пункты да маркераў мапы? + Дадаць да маркераў мапы + Калі ласка, дадайце маркеры праз экран мапы + Абраны для захоўваньня зьвестак каталёг даступны толькі для чытаньня. Каталёг захоўваньня часова разьмешчаны ва ўнутранай памяці. Калі ласка, абярыце падыходзячы каталёг для захоўваньня зьвестак. + Неабходна прадаставіць інфармацыю пра ўкладальнікаў + Актывуе функцыю маркераў мапы From 26ccb010917626f2040dbced7b3a6d0ae742883d Mon Sep 17 00:00:00 2001 From: Roberto GEB Date: Wed, 6 Apr 2016 18:29:45 +0200 Subject: [PATCH 42/67] Translated using Weblate (Spanish) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-es/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index 4430773b78..9d46bde8f0 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -1293,8 +1293,8 @@ Interrumpir música Identificador único del dispositivo Configura los ajustes de rastreo y configura el canal de rastreo personal - "Este extra proporciona parcialmente la funcionalidad de Monitorización OpenStreetMap, ver https://osmo.mobi\n\nPuedes rastrear en tiempo real todos los dispositivos de un grupo en el que participes. También se pueden ver el punto y las pistas subidas al grupo al que perteneces. -\n\nEl grupo no ha sido eliminado después de meses, armonizarla con las normas que crear grupos en el sitio web OsMo.mobi " + "Este extra proporciona parcialmente la funcionalidad de Monitorización OpenStreetMap, ver https://osmo.mobi\n\nPuedes rastrear en tiempo real todos los dispositivos de un grupo en el que participes. También puedes ver el punto y las pistas subidas al grupo al que perteneces. +\n\nEl grupo no ha sido eliminado después de meses, actívalo con las normas que crear grupos en el sitio web OsMo.mobi " Monitorización OpenStreetMap OsMo Compartir la ruta como archivo GPX @@ -2121,7 +2121,7 @@ Ahora la aplicación puede escribir en el almacenamiento externo. Se necesita un rearranque manual de la aplicación. " • OSM en vivo. Apoya a colaboradores del mapa y desarrolladores y obtén actualizaciones de mapas cada hora. \n\n • Marcadores de mapa. Una nueva forma de seleccionar rápidamente lugares en el mapa.\n\n • Mapas de OSM más detallados con escudos de carreteras específicos de cada país y un montón de nuevas características del mapa.\n\n • Mejor aspecto visual en la preparación de la ruta. -\n\n • Muchas mejoras en el menú contextual del mapa como la búsqueda de direcciones contextual.\n\n y más... " +\n\n • Muchas mejoras en el menú contextual del mapa como la búsqueda de direcciones contextual.\n\n y más... " Mover hacia arriba Mover hacia abajo Finalizar navegación From 1daf31516e947b918778424870328b7574e3faf0 Mon Sep 17 00:00:00 2001 From: Franco Date: Wed, 6 Apr 2016 18:42:42 +0200 Subject: [PATCH 43/67] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index db002983d0..d9f4d18f13 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -2146,7 +2146,7 @@ El nombre del archivo contiene caracteres ilegales Añade marcadores a través del mapa No se encontraron puntos de ruta - Delgado + Fino Mediano Grueso Modo mapa From d5078bbf527429015e748474964986b078b1a49b Mon Sep 17 00:00:00 2001 From: "Igor B. Poretsky" Date: Thu, 31 Mar 2016 06:46:19 +0300 Subject: [PATCH 44/67] Removed obsolete accessibility wrappers. --- .../net/osmand/access/AccessibleActivity.java | 28 ----- .../net/osmand/access/AccessibleContent.java | 85 ------------- .../net/osmand/access/AccessibleLayout.java | 118 ------------------ .../net/osmand/access/ExplorableTextView.java | 103 --------------- .../access/OsmAndAccessibilityDelegate.java | 80 ------------ .../osmand/plus/activities/MapActivity.java | 3 +- 6 files changed, 1 insertion(+), 416 deletions(-) delete mode 100644 OsmAnd/src/net/osmand/access/AccessibleActivity.java delete mode 100644 OsmAnd/src/net/osmand/access/AccessibleContent.java delete mode 100644 OsmAnd/src/net/osmand/access/AccessibleLayout.java delete mode 100644 OsmAnd/src/net/osmand/access/ExplorableTextView.java delete mode 100644 OsmAnd/src/net/osmand/access/OsmAndAccessibilityDelegate.java diff --git a/OsmAnd/src/net/osmand/access/AccessibleActivity.java b/OsmAnd/src/net/osmand/access/AccessibleActivity.java deleted file mode 100644 index 74554bc407..0000000000 --- a/OsmAnd/src/net/osmand/access/AccessibleActivity.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.osmand.access; - -import net.osmand.plus.activities.OsmandActionBarActivity; -import android.view.MotionEvent; - -// Provide some additional accessibility means for activity view elements. -// -// To make use of these capabilities simply derive your activity from this class -// and then add view elements you wish to be accessible -// to the accessibleContent list. -// -public class AccessibleActivity extends OsmandActionBarActivity implements AccessibleContent.Callback { - - // List of accessible views. Use accessibleContent.add(element) - // to add element to it. - public final AccessibleContent accessibleContent = new AccessibleContent(this); - - @Override - public boolean dispatchNativeTouchEvent(MotionEvent event) { - return super.dispatchTouchEvent(event); - } - - @Override - public boolean dispatchTouchEvent(MotionEvent event) { - return accessibleContent.dispatchTouchEvent(event, this); - } - -} diff --git a/OsmAnd/src/net/osmand/access/AccessibleContent.java b/OsmAnd/src/net/osmand/access/AccessibleContent.java deleted file mode 100644 index 7808085787..0000000000 --- a/OsmAnd/src/net/osmand/access/AccessibleContent.java +++ /dev/null @@ -1,85 +0,0 @@ -package net.osmand.access; - -import java.util.ArrayList; - -import net.osmand.plus.OsmandApplication; -import android.content.Context; -import android.graphics.Rect; -import android.os.SystemClock; -import android.view.MotionEvent; -import android.view.View; -import android.view.accessibility.AccessibilityEvent; - -// Provide some additional accessibility means for individual view elements. -// These elements will be spoken on touch. Thus, you can slide your finger -// across the screen and hear available controls. -// Lift finger up on a control to make click. -// -// To make use of these capabilities instantiate an object of this class -// and pass touch event to it via dispatchTouchEvent() method. -// Then you can add view elements you wish to be accessible to this list. -// -public class AccessibleContent extends ArrayList { - - protected interface Callback { - public boolean dispatchNativeTouchEvent(MotionEvent event); - } - - private final Rect testFrame = new Rect(); - private View nowTouched; - private final Context ctx; - - public AccessibleContent(Context ctx) { - this.ctx = ctx; - } - - private View findTouch(MotionEvent event) { - int x = (int)event.getX(); - int y = (int)event.getY(); - for (View v : this) - if ((v.getVisibility() != View.INVISIBLE) && v.getGlobalVisibleRect(testFrame) && testFrame.contains(x, y)) - return v; - return null; - } - - public boolean dispatchTouchEvent(MotionEvent event, Callback callback) { - if (((OsmandApplication) ctx.getApplicationContext()).accessibilityExtensions()) { - int action = event.getAction(); - View newTouch; - switch (action) { - case MotionEvent.ACTION_MOVE: - newTouch = findTouch(event); - if ((newTouch != null) && (newTouch != nowTouched)) { - float x = event.getX(); - float y = event.getY(); - float pressure = event.getPressure(); - float size = event.getSize(); - int metaState = event.getMetaState(); - float xPrecision = event.getXPrecision(); - float yPrecision = event.getYPrecision(); - int deviceId = event.getDeviceId(); - int edgeFlags = event.getEdgeFlags(); - event.setAction(MotionEvent.ACTION_CANCEL); - callback.dispatchNativeTouchEvent(event); - newTouch.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); - long now = SystemClock.uptimeMillis(); - event.recycle(); - event = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, x, y, pressure, size, - metaState, xPrecision, yPrecision, deviceId, edgeFlags); - } - nowTouched = newTouch; - break; - case MotionEvent.ACTION_DOWN: - nowTouched = findTouch(event); - if (nowTouched != null) - nowTouched.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); - break; - default: - nowTouched = null; - break; - } - } - return callback.dispatchNativeTouchEvent(event); - } - -} diff --git a/OsmAnd/src/net/osmand/access/AccessibleLayout.java b/OsmAnd/src/net/osmand/access/AccessibleLayout.java deleted file mode 100644 index 410cb9cc57..0000000000 --- a/OsmAnd/src/net/osmand/access/AccessibleLayout.java +++ /dev/null @@ -1,118 +0,0 @@ -package net.osmand.access; - -import net.osmand.plus.OsmandApplication; -import android.content.Context; -import android.graphics.Rect; -import android.os.SystemClock; -import android.util.AttributeSet; -import android.view.MotionEvent; -import android.view.View; -import android.view.ViewGroup; -import android.view.accessibility.AccessibilityEvent; -import android.widget.FrameLayout; -import android.widget.TextView; - -// This class can be used in place of FrameLayout in order to provide -// a sort of touch exploration capability for enclosing View hierarchy. -// It means that elements will be spoken on touch. -// Thus, you can slide your finger across the screen -// and hear available controls and items. -// Lift finger up on a control to make click. -// -public class AccessibleLayout extends FrameLayout { - - private final Rect testFrame = new Rect(); - private View nowTouched; - - - // Conventional public constructors - - public AccessibleLayout(Context context) { - super(context); - } - - public AccessibleLayout(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public AccessibleLayout(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } - - - // Recursive search through View tree. - private View findTouch(MotionEvent event) { - if (!getGlobalVisibleRect(testFrame)) - return null; - final int x = (int)event.getX() + testFrame.left; - final int y = (int)event.getY() + testFrame.top; - View root = this; - View control = null; - View text = null; - while (root instanceof ViewGroup) { - int nBranches = ((ViewGroup)root).getChildCount(); - int i; - for (i = 0; i < nBranches; i++) { - View child = ((ViewGroup)root).getChildAt(i); - if ((child.getVisibility() != View.INVISIBLE) && child.getGlobalVisibleRect(testFrame) && testFrame.contains(x, y)) { - if (child.isClickable()) - control = child; - else if (child instanceof TextView) - text = child; - root = child; - break; - } - } - if (i == nBranches) - break; - } - if (control != null) - return control; - return text; - } - - @Override - public boolean dispatchTouchEvent(MotionEvent event) { - final boolean swallow = ((OsmandApplication) getContext().getApplicationContext()).accessibilityExtensions(); - if (swallow) { - int action = event.getAction(); - View newTouch; - switch (action) { - case MotionEvent.ACTION_MOVE: - newTouch = findTouch(event); - if ((newTouch != null) && (newTouch != nowTouched)) { - if (newTouch.isClickable()) { - float x = event.getX(); - float y = event.getY(); - float pressure = event.getPressure(); - float size = event.getSize(); - int metaState = event.getMetaState(); - float xPrecision = event.getXPrecision(); - float yPrecision = event.getYPrecision(); - int deviceId = event.getDeviceId(); - int edgeFlags = event.getEdgeFlags(); - event.setAction(MotionEvent.ACTION_CANCEL); - super.dispatchTouchEvent(event); - long now = SystemClock.uptimeMillis(); - event.recycle(); - event = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, x, y, pressure, size, - metaState, xPrecision, yPrecision, deviceId, edgeFlags); - } - newTouch.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); - } - nowTouched = newTouch; - break; - case MotionEvent.ACTION_DOWN: - nowTouched = findTouch(event); - if (nowTouched != null) - nowTouched.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); - break; - default: - nowTouched = null; - break; - } - } - return super.dispatchTouchEvent(event) || swallow; - } - -} diff --git a/OsmAnd/src/net/osmand/access/ExplorableTextView.java b/OsmAnd/src/net/osmand/access/ExplorableTextView.java deleted file mode 100644 index e4f2009572..0000000000 --- a/OsmAnd/src/net/osmand/access/ExplorableTextView.java +++ /dev/null @@ -1,103 +0,0 @@ -package net.osmand.access; - -import net.osmand.plus.OsmandApplication; -import android.content.Context; -import android.text.Layout; -import android.text.method.ArrowKeyMovementMethod; -import android.text.method.MovementMethod; -import android.util.AttributeSet; -import android.view.accessibility.AccessibilityEvent; -import android.widget.TextView; - -// This class is intended to be used in place of the TextView -// to provide accessible exploration capability by arrow keys. -// -public class ExplorableTextView extends TextView { - - private int cursor; - private int selectionStart; - private int selectionLength; - private boolean cursorTrackingEnabled = true; - - - // Conventional constructors. - - public ExplorableTextView(Context context) { - super(context); - } - - public ExplorableTextView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public ExplorableTextView(Context context, AttributeSet attrs, int style) { - super(context, attrs, style); - } - - - private boolean accessibilityExtensions() { - return ((OsmandApplication) getContext().getApplicationContext()).accessibilityExtensions(); - } - - // Overridden callback methods to provide accessible exploration means. - - @Override - public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { - if (!accessibilityExtensions()) - return super.dispatchPopulateAccessibilityEvent(event); - cursorTrackingEnabled = false; - boolean result = super.dispatchPopulateAccessibilityEvent(event); - if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED) { - if (isFocused()) { - event.getText().clear(); - event.getText().add(getText().subSequence(selectionStart, selectionStart + selectionLength)); - } - event.setAddedCount(selectionLength); - event.setRemovedCount(0); - event.setFromIndex(0); - event.setBeforeText(null); - result = true; - } - cursorTrackingEnabled =true; - return result; - } - - @Override - protected MovementMethod getDefaultMovementMethod() { - if (accessibilityExtensions()) - return ArrowKeyMovementMethod.getInstance(); - return super.getDefaultMovementMethod(); - } - - @Override - protected void onTextChanged(CharSequence text, int start, int before, int after) { - super.onTextChanged(text, start, before, after); - if (accessibilityExtensions() && !isFocused()) { - selectionLength = Math.min(text.length(), AccessibilityEvent.MAX_TEXT_LENGTH); - sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED); - } - } - - @Override - protected void onSelectionChanged(int start, int end) { - super.onSelectionChanged(start, end); - if (accessibilityExtensions() && cursorTrackingEnabled && isFocused()) { - if (end >= getText().length()) { - cursor = getText().length(); - } else if (cursor != end) { - if (Math.abs(cursor - end) > 1) { - final Layout layout = getLayout(); - final int line = layout.getLineForOffset(end); - selectionStart = layout.getLineStart(line); - selectionLength = Math.min(layout.getLineEnd(line) - selectionStart, AccessibilityEvent.MAX_TEXT_LENGTH); - } else { - selectionStart = end; - selectionLength = 1; - } - sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED); - cursor = end; - } - } - } - -} diff --git a/OsmAnd/src/net/osmand/access/OsmAndAccessibilityDelegate.java b/OsmAnd/src/net/osmand/access/OsmAndAccessibilityDelegate.java deleted file mode 100644 index f6d8218ae3..0000000000 --- a/OsmAnd/src/net/osmand/access/OsmAndAccessibilityDelegate.java +++ /dev/null @@ -1,80 +0,0 @@ -package net.osmand.access; - - -import android.app.Activity; -import android.app.Dialog; -import android.content.Context; -import android.view.View; -import android.view.ViewGroup; -import android.view.Window; -import android.widget.FrameLayout; - -// This class serves as a delegate of accessibility service -// providing a sort of touch exploration capability -// for a View hierarchy. It means that elements will be spoken -// on touch. Thus, you can slide your finger across the screen -// and hear available controls and items. -// Lift finger up on a control to make click. -// -// This class can not be instantiated directly. -// Use static method takeCareOf() to get it's functionality -// for respective objects. -// -public class OsmAndAccessibilityDelegate extends AccessibleLayout { - - private OsmAndAccessibilityDelegate(Context context) { - super(context); - } - - // Attach itself to a target View hierarchy to intercept touch events - // and provide on-touch accessibility feedback. - // Target View must be an instance of FrameLayout - // or have a parent which is an instance of ViewGroup. - private void attach(View target) { - ViewGroup parent; - if (target instanceof FrameLayout) { - parent = (ViewGroup)target; - while (parent.getChildCount() > 0) { - View child = parent.getChildAt(0); - parent.removeViewAt(0); - addView(child); - } - parent.addView(this, new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); - } else if (target.getParent() instanceof ViewGroup) { - parent = (ViewGroup)target.getParent(); - int position = parent.indexOfChild(target); - ViewGroup.LayoutParams params = target.getLayoutParams(); - parent.removeViewAt(position); - addView(target, new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); - parent.addView(this, position, params); - } - } - - - // Provide touch exploration capability for individual View - // or whole View hierarchy. The hierarchy root specified - // as an argument must either be an instance of FrameLayout - // or have a parent that is an instance of ViewGroup. - public static void takeCareOf(View hierarchy) { - final OsmAndAccessibilityDelegate delegate = new OsmAndAccessibilityDelegate(hierarchy.getContext()); - delegate.attach(hierarchy); - } - - // Provide touch exploration capability for given window. - public static void takeCareOf(Window window) { - takeCareOf(window.getDecorView()); - } - - // Provide touch exploration capability for an activity View content. - // Use after setContentView(). - public static void takeCareOf(Activity activity) { - takeCareOf(activity.getWindow()); - } - - // Provide touch exploration capability for a dialog View content. - // Use after setContentView(). - public static void takeCareOf(Dialog dialog) { - takeCareOf(dialog.getWindow()); - } - -} diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 9e5adc891e..0615a62364 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -44,7 +44,6 @@ import net.osmand.PlatformUtil; import net.osmand.StateChangedListener; import net.osmand.ValueHolder; import net.osmand.access.AccessibilityPlugin; -import net.osmand.access.AccessibleActivity; import net.osmand.access.AccessibleToast; import net.osmand.access.MapAccessibilityActions; import net.osmand.core.android.AtlasMapRendererView; @@ -115,7 +114,7 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; -public class MapActivity extends AccessibleActivity implements DownloadEvents, +public class MapActivity extends OsmandActionBarActivity implements DownloadEvents, ActivityCompat.OnRequestPermissionsResultCallback, IRouteInformationListener, MapMarkerChangedListener { public static final String INTENT_KEY_PARENT_MAP_ACTIVITY = "intent_parent_map_activity_key"; From 9b5acdb32f978e1daa2e02d313b22cd71d0735dd Mon Sep 17 00:00:00 2001 From: "Igor B. Poretsky" Date: Thu, 31 Mar 2016 06:52:10 +0300 Subject: [PATCH 45/67] Removed obsolete accessibility wrapper for AlertDialog.Builder class. --- OsmAnd/res/layout/alert.xml | 18 ------- .../osmand/access/AccessibleAlertBuilder.java | 50 ------------------- .../src/net/osmand/plus/AppInitializer.java | 3 +- .../activities/IntermediatePointsDialog.java | 3 +- .../plus/activities/MapActivityActions.java | 3 +- .../plus/activities/actions/ShareDialog.java | 3 +- .../activities/actions/StartGPSStatus.java | 5 +- .../AudioVideoNoteMenuController.java | 4 +- .../audionotes/AudioVideoNotesPlugin.java | 4 +- .../osmand/plus/base/FailSafeFuntions.java | 3 +- .../plus/osmedit/EditPOIMenuController.java | 4 +- 11 files changed, 13 insertions(+), 87 deletions(-) delete mode 100644 OsmAnd/res/layout/alert.xml delete mode 100644 OsmAnd/src/net/osmand/access/AccessibleAlertBuilder.java diff --git a/OsmAnd/res/layout/alert.xml b/OsmAnd/res/layout/alert.xml deleted file mode 100644 index 2a170848fb..0000000000 --- a/OsmAnd/res/layout/alert.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/OsmAnd/src/net/osmand/access/AccessibleAlertBuilder.java b/OsmAnd/src/net/osmand/access/AccessibleAlertBuilder.java deleted file mode 100644 index fc9acc3aae..0000000000 --- a/OsmAnd/src/net/osmand/access/AccessibleAlertBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -package net.osmand.access; - -import android.content.Context; -import android.support.v7.app.AlertDialog; - -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.R; - -// Since usual message in an AlertDialog that is set by -// AlertDialog.Builder.setMessage() is spoken only once -// at the best case and there is no way to explore or even repeat it, -// this class provides more accessible alternative -// that wraps the message into a dedicated view. -// Such message will be focusable and so it can be repeated -// by selecting. -// -// Note: when accessibility extensions option is not checked -// or system accessibility service is turned off this class -// acts just identical to it's direct parent. -// -public class AccessibleAlertBuilder extends AlertDialog.Builder { - - // The method getContext() is only available - // starting from API level 11, so store it here. - private final Context context; - - // Conventional constructor. - public AccessibleAlertBuilder(Context context) { - super(context); - this.context = context; - } - - - // Provided setMessage() alternatives. - - @Override - public AlertDialog.Builder setMessage(CharSequence msg) { - if (((OsmandApplication) context.getApplicationContext()).accessibilityExtensions()) - return setView(TextMessage.makeView(context, msg, R.layout.alert)); - return super.setMessage(msg); - } - - @Override - public AlertDialog.Builder setMessage(int msgid) { - if (((OsmandApplication) context.getApplicationContext()).accessibilityExtensions()) - return setView(TextMessage.makeView(context, msgid, R.layout.alert)); - return super.setMessage(msgid); - } - -} diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index 88a43b1abc..1fc7745b3c 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -13,7 +13,6 @@ import android.support.v7.app.AlertDialog; import net.osmand.IProgress; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleAlertBuilder; import net.osmand.map.OsmandRegions; import net.osmand.map.OsmandRegions.RegionTranslation; import net.osmand.map.WorldRegion; @@ -253,7 +252,7 @@ public class AppInitializer implements IProgress { boolean check = pref.getBoolean(VECTOR_INDEXES_CHECK, true); // do not show each time if (check && new Random().nextInt() % 5 == 1) { - AlertDialog.Builder builder = new AccessibleAlertBuilder(ctx); + AlertDialog.Builder builder = new AlertDialog.Builder(ctx); if (maps.isEmpty()) { builder.setMessage(R.string.vector_data_missing); } else if (!maps.basemapExists()) { diff --git a/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java b/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java index 01355fda80..2c4fecbd10 100644 --- a/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/IntermediatePointsDialog.java @@ -23,7 +23,6 @@ import android.widget.TextView; import net.osmand.Location; import net.osmand.TspAnt; -import net.osmand.access.AccessibleAlertBuilder; import net.osmand.data.LatLon; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; @@ -86,7 +85,7 @@ public class IntermediatePointsDialog { } }); - AlertDialog.Builder builder = new AccessibleAlertBuilder(activity); + AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.setView(contentView); builder.setInverseBackgroundForced(true); lv.setBackgroundColor(Color.WHITE); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index f914e1bc98..aa6245c0a0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -21,7 +21,6 @@ import android.widget.Toast; import net.osmand.IndexConstants; import net.osmand.Location; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleAlertBuilder; import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; @@ -483,7 +482,7 @@ public class MapActivityActions implements DialogProvider { } private Dialog createReloadTitleDialog(final Bundle args) { - AlertDialog.Builder builder = new AccessibleAlertBuilder(mapActivity); + AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity); builder.setMessage(R.string.context_menu_item_update_map_confirm); builder.setNegativeButton(R.string.shared_string_cancel, null); final OsmandMapTileView mapView = mapActivity.getMapView(); diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/ShareDialog.java b/OsmAnd/src/net/osmand/plus/activities/actions/ShareDialog.java index 33e935b224..f147eef5be 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/ShareDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/ShareDialog.java @@ -14,7 +14,6 @@ import android.text.ClipboardManager; import android.text.Html; import android.widget.Toast; -import net.osmand.access.AccessibleAlertBuilder; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.Version; @@ -194,7 +193,7 @@ public class ShareDialog { activity.startActivity(intent); } else { if (Version.isMarketEnabled((OsmandApplication) activity.getApplication())) { - AlertDialog.Builder builder = new AccessibleAlertBuilder(activity); + AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.setMessage(activity.getString(R.string.zxing_barcode_scanner_not_found)); builder.setPositiveButton(activity.getString(R.string.shared_string_yes), new DialogInterface.OnClickListener() { @Override diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/StartGPSStatus.java b/OsmAnd/src/net/osmand/plus/activities/actions/StartGPSStatus.java index ada138a548..ff46877ed0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/StartGPSStatus.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/StartGPSStatus.java @@ -22,7 +22,6 @@ import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; -import net.osmand.access.AccessibleAlertBuilder; import net.osmand.plus.R; import net.osmand.plus.Version; import net.osmand.plus.activities.MapActivity; @@ -103,7 +102,7 @@ public class StartGPSStatus extends OsmAndAction { res[i++] = g.stringRes; } OsmandMapTileView view = mapActivity.getMapView(); - AlertDialog.Builder builder = new AccessibleAlertBuilder(mapActivity); + AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity); LinearLayout ll = new LinearLayout(activity); final ListView lv = new ListView(activity); lv.setPadding(7, 3, 7, 0); @@ -168,7 +167,7 @@ public class StartGPSStatus extends OsmAndAction { mapActivity.startActivity(intent); } else { if (Version.isMarketEnabled(getMyApplication())) { - AlertDialog.Builder builder = new AccessibleAlertBuilder(mapActivity); + AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity); builder.setMessage(mapActivity. getString(R.string.gps_status_app_not_found)); builder.setPositiveButton(mapActivity.getString(R.string.shared_string_yes), new DialogInterface.OnClickListener() { @Override diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuController.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuController.java index 758934f710..05028c0371 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuController.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNoteMenuController.java @@ -5,8 +5,8 @@ import android.content.Intent; import android.graphics.drawable.Drawable; import android.media.MediaScannerConnection; import android.net.Uri; +import android.support.v7.app.AlertDialog; -import net.osmand.access.AccessibleAlertBuilder; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandApplication; @@ -43,7 +43,7 @@ public class AudioVideoNoteMenuController extends MenuController { rightTitleButtonController = new TitleButtonController() { @Override public void buttonPressed() { - AccessibleAlertBuilder bld = new AccessibleAlertBuilder(getMapActivity()); + AlertDialog.Builder bld = new AlertDialog.Builder(getMapActivity()); bld.setMessage(R.string.recording_delete_confirm); bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() { diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java index 77bb5a012a..b902186579 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java @@ -24,6 +24,7 @@ import android.os.Build; import android.os.StatFs; import android.provider.MediaStore; import android.support.v4.app.ActivityCompat; +import android.support.v7.app.AlertDialog; import android.view.Display; import android.view.KeyEvent; import android.view.Surface; @@ -40,7 +41,6 @@ import net.osmand.IProgress; import net.osmand.IndexConstants; import net.osmand.Location; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleAlertBuilder; import net.osmand.access.AccessibleToast; import net.osmand.data.DataTileManager; import net.osmand.data.LatLon; @@ -740,7 +740,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { } private void chooseDefaultAction(final double lat, final double lon, final MapActivity mapActivity) { - AccessibleAlertBuilder ab = new AccessibleAlertBuilder(mapActivity); + AlertDialog.Builder ab = new AlertDialog.Builder(mapActivity); ab.setItems( new String[]{mapActivity.getString(R.string.recording_context_menu_arecord), mapActivity.getString(R.string.recording_context_menu_vrecord), diff --git a/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java b/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java index 76956f5579..8fc64a0601 100644 --- a/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java +++ b/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java @@ -9,7 +9,6 @@ import android.support.v7.app.AlertDialog; import android.widget.TextView; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleAlertBuilder; import net.osmand.data.LatLon; import net.osmand.plus.GPXUtilities; import net.osmand.plus.GPXUtilities.GPXFile; @@ -48,7 +47,7 @@ public class FailSafeFuntions { @Override public void run() { - AlertDialog.Builder builder = new AccessibleAlertBuilder(ma); + AlertDialog.Builder builder = new AlertDialog.Builder(ma); final TextView tv = new TextView(ma); tv.setText(ma.getString(R.string.continue_follow_previous_route_auto, delay + "")); tv.setPadding(7, 5, 7, 5); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java index 586148ec90..cd7f48a8a2 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java @@ -3,8 +3,8 @@ package net.osmand.plus.osmedit; import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.support.annotation.NonNull; +import android.support.v7.app.AlertDialog; -import net.osmand.access.AccessibleAlertBuilder; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; @@ -52,7 +52,7 @@ public class EditPOIMenuController extends MenuController { rightTitleButtonController = new TitleButtonController() { @Override public void buttonPressed() { - AccessibleAlertBuilder bld = new AccessibleAlertBuilder(getMapActivity()); + AlertDialog.Builder bld = new AlertDialog.Builder(getMapActivity()); bld.setMessage(R.string.recording_delete_confirm); bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() { From 8a2064fd4f1b3af4e36104258045f698a4ffcdaa Mon Sep 17 00:00:00 2001 From: "Igor B. Poretsky" Date: Thu, 31 Mar 2016 06:57:29 +0300 Subject: [PATCH 46/67] Removed obsolete accessibility wrapper for the Toast widget. --- OsmAnd/res/layout/notification.xml | 18 -------- .../net/osmand/access/AccessibleToast.java | 44 ------------------- .../osmand/access/NotificationTextView.java | 41 ----------------- OsmAnd/src/net/osmand/access/TextMessage.java | 26 ----------- .../net/osmand/plus/NavigationService.java | 3 +- .../osmand/plus/OsmAndLocationSimulation.java | 5 +-- .../net/osmand/plus/OsmandApplication.java | 9 ++-- .../src/net/osmand/plus/SQLiteTileSource.java | 3 +- .../ContributionVersionActivity.java | 5 +-- .../plus/activities/DownloadTilesDialog.java | 5 +-- .../activities/FavoritesTreeFragment.java | 11 +++-- .../osmand/plus/activities/MapActivity.java | 15 +++---- .../plus/activities/MapActivityActions.java | 11 +++-- .../plus/activities/MapActivityLayers.java | 5 +-- .../plus/activities/SettingsBaseActivity.java | 3 +- .../activities/SettingsGeneralActivity.java | 7 ++- .../activities/search/GeoIntentActivity.java | 5 +-- .../search/SearchAddressFragment.java | 3 +- .../search/SearchAddressOnlineFragment.java | 3 +- .../activities/search/SearchPOIActivity.java | 9 ++-- .../search/SearchPoiFilterFragment.java | 3 +- .../search/SearchRegionByNameActivity.java | 3 +- .../audionotes/AudioVideoNotesPlugin.java | 11 +++-- .../dashboard/DashChooseAppDirFragment.java | 5 +-- .../plus/development/TestVoiceActivity.java | 3 +- .../osmand/plus/dialogs/ConfigureMapMenu.java | 3 +- .../osmand/plus/dialogs/FavoriteDialogs.java | 5 +-- .../DistanceCalculatorPlugin.java | 5 +-- .../plus/download/DownloadActivity.java | 5 +-- .../plus/download/DownloadIndexesThread.java | 5 +-- .../download/DownloadValidationManager.java | 3 +- .../ui/DataStoragePlaceDialogFragment.java | 3 +- .../plus/download/ui/ItemViewHolder.java | 5 +-- .../download/ui/LocalIndexesFragment.java | 11 +++-- .../osmand/plus/helpers/GpxImportHelper.java | 9 ++-- .../net/osmand/plus/helpers/GpxUiHelper.java | 7 ++- .../controllers/MapDataMenuController.java | 3 +- .../plus/monitoring/DashTrackFragment.java | 3 +- .../plus/myplaces/AvailableGPXFragment.java | 9 ++-- .../plus/osmedit/EditPoiDialogFragment.java | 11 +++-- .../plus/osmedit/OpenstreetmapRemoteUtil.java | 7 ++- .../net/osmand/plus/osmedit/OsmBugsLayer.java | 15 +++---- .../osmand/plus/osmedit/OsmEditingPlugin.java | 3 +- .../osmand/plus/osmedit/OsmEditsFragment.java | 3 +- .../osmedit/OsmEditsUploadListenerHelper.java | 3 +- .../plus/osmedit/UploadGPXFilesTask.java | 5 +-- .../osmand/plus/osmo/OsMoGroupsActivity.java | 3 +- .../plus/osmo/SettingsOsMoActivity.java | 3 +- .../rastermaps/OsmandRasterMapsPlugin.java | 11 +++-- .../plus/render/MapRenderRepositories.java | 7 ++- .../net/osmand/plus/views/MapTileLayer.java | 3 +- .../osmand/plus/views/OsmandMapTileView.java | 3 +- .../osmand/plus/views/TransportInfoLayer.java | 3 +- 53 files changed, 117 insertions(+), 295 deletions(-) delete mode 100644 OsmAnd/res/layout/notification.xml delete mode 100644 OsmAnd/src/net/osmand/access/AccessibleToast.java delete mode 100644 OsmAnd/src/net/osmand/access/NotificationTextView.java delete mode 100644 OsmAnd/src/net/osmand/access/TextMessage.java diff --git a/OsmAnd/res/layout/notification.xml b/OsmAnd/res/layout/notification.xml deleted file mode 100644 index 708aca87f5..0000000000 --- a/OsmAnd/res/layout/notification.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/OsmAnd/src/net/osmand/access/AccessibleToast.java b/OsmAnd/src/net/osmand/access/AccessibleToast.java deleted file mode 100644 index cdef08b3f7..0000000000 --- a/OsmAnd/src/net/osmand/access/AccessibleToast.java +++ /dev/null @@ -1,44 +0,0 @@ -package net.osmand.access; - -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.R; -import android.content.Context; -import android.view.accessibility.AccessibilityEvent; -import android.widget.Toast; - -// Use this class instead of regular Toast to have -// accessibility feedback on toast messages. -// -public class AccessibleToast extends Toast { - - public AccessibleToast(Context context) { - super(context); - } - - public static Toast makeText(Context context, int msg, int duration) { - if (((OsmandApplication) context.getApplicationContext()).accessibilityExtensions()) { - final Toast toast = new AccessibleToast(context); - toast.setView(TextMessage.makeView(context, msg, R.layout.notification)); - toast.setDuration(duration); - return toast; - } - return Toast.makeText(context, msg, duration); - } - - public static Toast makeText(Context context, CharSequence msg, int duration) { - if (((OsmandApplication) context.getApplicationContext()).accessibilityExtensions()) { - final Toast toast = new AccessibleToast(context); - toast.setView(TextMessage.makeView(context, msg, R.layout.notification)); - toast.setDuration(duration); - return toast; - } - return Toast.makeText(context, msg, duration); - } - - @Override - public void show() { - getView().sendAccessibilityEvent(AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED); - super.show(); - } - -} diff --git a/OsmAnd/src/net/osmand/access/NotificationTextView.java b/OsmAnd/src/net/osmand/access/NotificationTextView.java deleted file mode 100644 index 4f345f0746..0000000000 --- a/OsmAnd/src/net/osmand/access/NotificationTextView.java +++ /dev/null @@ -1,41 +0,0 @@ -package net.osmand.access; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.accessibility.AccessibilityEvent; -import android.widget.TextView; - -// This class is intended to be used in place of the TextView -// when constructing toast notifications to provide accessibility feedback. -// -public class NotificationTextView extends TextView { - - // Conventional constructors. - - public NotificationTextView(Context context) { - super(context); - } - - public NotificationTextView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public NotificationTextView(Context context, AttributeSet attrs, int style) { - super(context, attrs, style); - } - - - // Overridden callback methods to provide accessible exploration means. - - @Override - public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { - boolean result = super.dispatchPopulateAccessibilityEvent(event); - if (event.getEventType() == AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED) { - event.getText().clear(); - event.getText().add(getText().subSequence(0, Math.min(getText().length(), AccessibilityEvent.MAX_TEXT_LENGTH))); - result = true; - } - return result; - } - -} diff --git a/OsmAnd/src/net/osmand/access/TextMessage.java b/OsmAnd/src/net/osmand/access/TextMessage.java deleted file mode 100644 index d34982ce6f..0000000000 --- a/OsmAnd/src/net/osmand/access/TextMessage.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.osmand.access; - -import net.osmand.plus.R; -import android.content.Context; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.TextView; - -// This class contains only static methods intended to improve -// accessibility for AlertDialog and Toast messages. -// -public class TextMessage { - - protected static View makeView(Context ctx, CharSequence msg, int resid) { - View layout = ((LayoutInflater)(ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE))).inflate(resid, null); - ((TextView)layout.findViewById(R.id.message)).setText(msg); - return layout; - } - - protected static View makeView(Context ctx, int msgid, int resid) { - View layout = ((LayoutInflater)(ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE))).inflate(resid, null); - ((TextView)layout.findViewById(R.id.message)).setText(msgid); - return layout; - } - -} diff --git a/OsmAnd/src/net/osmand/plus/NavigationService.java b/OsmAnd/src/net/osmand/plus/NavigationService.java index b00465162f..0d4c767a8a 100644 --- a/OsmAnd/src/net/osmand/plus/NavigationService.java +++ b/OsmAnd/src/net/osmand/plus/NavigationService.java @@ -1,7 +1,6 @@ package net.osmand.plus; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.plus.monitoring.OsmandMonitoringPlugin; import net.osmand.plus.osmo.OsMoPlugin; import android.app.AlarmManager; @@ -246,7 +245,7 @@ public class NavigationService extends Service implements LocationListener { @Override public void onProviderDisabled(String provider) { - AccessibleToast.makeText(this, getString(R.string.off_router_service_no_gps_available), Toast.LENGTH_LONG).show(); + Toast.makeText(this, getString(R.string.off_router_service_no_gps_available), Toast.LENGTH_LONG).show(); } diff --git a/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java b/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java index 86255733d5..bc8375d351 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java @@ -15,7 +15,6 @@ import android.widget.Toast; import net.osmand.CallbackWithObject; import net.osmand.Location; -import net.osmand.access.AccessibleToast; import net.osmand.plus.helpers.GpxUiHelper; import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder; @@ -41,7 +40,7 @@ public class OsmAndLocationSimulation { // if (!isRouteAnimating()) { // List currentRoute = app.getRoutingHelper().getCurrentRoute(); // if (currentRoute.isEmpty()) { -// AccessibleToast.makeText(app, R.string.animate_routing_route_not_calculated, Toast.LENGTH_LONG).show(); +// Toast.makeText(app, R.string.animate_routing_route_not_calculated, Toast.LENGTH_LONG).show(); // } else { // startAnimationThread(app.getRoutingHelper(), ma, new ArrayList(currentRoute), false, 1); // } @@ -92,7 +91,7 @@ public class OsmAndLocationSimulation { } else { List currentRoute = app.getRoutingHelper().getCurrentCalculatedRoute(); if (currentRoute.isEmpty()) { - AccessibleToast.makeText(app, R.string.animate_routing_route_not_calculated, + Toast.makeText(app, R.string.animate_routing_route_not_calculated, Toast.LENGTH_LONG).show(); } else { startAnimationThread(app, new ArrayList(currentRoute), false, 1); diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index a632ab7136..60cf3d6bba 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -26,7 +26,6 @@ import android.widget.Toast; import net.osmand.CallbackWithObject; import net.osmand.PlatformUtil; import net.osmand.access.AccessibilityPlugin; -import net.osmand.access.AccessibleToast; import net.osmand.map.OsmandRegions; import net.osmand.osm.MapPoiTypes; import net.osmand.plus.AppInitializer.AppInitializeListener; @@ -564,7 +563,7 @@ public class OsmandApplication extends MultiDexApplication { uiHandler.post(new Runnable() { @Override public void run() { - AccessibleToast.makeText(OsmandApplication.this, getString(msgId, args), Toast.LENGTH_SHORT).show(); + Toast.makeText(OsmandApplication.this, getString(msgId, args), Toast.LENGTH_SHORT).show(); } }); } @@ -573,7 +572,7 @@ public class OsmandApplication extends MultiDexApplication { uiHandler.post(new Runnable() { @Override public void run() { - AccessibleToast.makeText(OsmandApplication.this, msg, Toast.LENGTH_SHORT).show(); + Toast.makeText(OsmandApplication.this, msg, Toast.LENGTH_SHORT).show(); } }); } @@ -582,7 +581,7 @@ public class OsmandApplication extends MultiDexApplication { uiHandler.post(new Runnable() { @Override public void run() { - AccessibleToast.makeText(OsmandApplication.this, getString(msgId, args), Toast.LENGTH_LONG).show(); + Toast.makeText(OsmandApplication.this, getString(msgId, args), Toast.LENGTH_LONG).show(); } }); } @@ -591,7 +590,7 @@ public class OsmandApplication extends MultiDexApplication { uiHandler.post(new Runnable() { @Override public void run() { - AccessibleToast.makeText(OsmandApplication.this, msg, Toast.LENGTH_LONG).show(); + Toast.makeText(OsmandApplication.this, msg, Toast.LENGTH_LONG).show(); } }); } diff --git a/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java b/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java index 642e52b34e..bcbb56ff8d 100644 --- a/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java +++ b/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java @@ -10,7 +10,6 @@ import java.util.List; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.data.QuadRect; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager; @@ -124,7 +123,7 @@ public class SQLiteTileSource implements ITileSource { return (String) bshInterpreter.eval("getTileUrl("+zoom+","+x+","+y+");"); } catch (bsh.EvalError e) { LOG.debug("getUrlToLoad Error" + e.getMessage()); - AccessibleToast.makeText(ctx, e.getMessage(), Toast.LENGTH_LONG).show(); + Toast.makeText(ctx, e.getMessage(), Toast.LENGTH_LONG).show(); LOG.error(e.getMessage(), e); return null; } diff --git a/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java b/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java index 0e780ff39b..e40c6f0557 100644 --- a/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java @@ -16,7 +16,6 @@ import android.widget.TextView; import android.widget.Toast; import net.osmand.AndroidUtils; -import net.osmand.access.AccessibleToast; import net.osmand.osm.io.NetworkUtils; import net.osmand.plus.R; @@ -103,7 +102,7 @@ public class ContributionVersionActivity extends OsmandListActivity { } if(operationId == DOWNLOAD_BUILDS_LIST){ if(e != null){ - AccessibleToast.makeText(this, getString(R.string.loading_builds_failed) + " : " + e.getMessage(), Toast.LENGTH_LONG).show(); + Toast.makeText(this, getString(R.string.loading_builds_failed) + " : " + e.getMessage(), Toast.LENGTH_LONG).show(); finish(); } else { setListAdapter(new OsmandBuildsAdapter(downloadedBuilds)); @@ -128,7 +127,7 @@ public class ContributionVersionActivity extends OsmandListActivity { private void updateInstalledApp(boolean showMessage, Date d) { if (showMessage) { - AccessibleToast.makeText( + Toast.makeText( this, MessageFormat.format(getString(R.string.build_installed), currentSelectedBuild.tag, AndroidUtils.formatDateTime(getMyApplication(), currentSelectedBuild.date.getTime())), Toast.LENGTH_LONG).show(); diff --git a/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java b/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java index 8ab074954f..914d840d67 100644 --- a/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java @@ -11,7 +11,6 @@ import android.widget.TextView; import android.widget.Toast; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.data.QuadRect; import net.osmand.data.RotatedTileBox; import net.osmand.map.ITileSource; @@ -50,11 +49,11 @@ public class DownloadTilesDialog { public void openDialog(){ BaseMapLayer mainLayer = mapView.getMainLayer(); if(!(mainLayer instanceof MapTileLayer) || !((MapTileLayer) mainLayer).isVisible()){ - AccessibleToast.makeText(ctx, R.string.maps_could_not_be_downloaded, Toast.LENGTH_SHORT).show(); + Toast.makeText(ctx, R.string.maps_could_not_be_downloaded, Toast.LENGTH_SHORT).show(); } final ITileSource mapSource = ((MapTileLayer) mainLayer).getMap(); if(mapSource == null || !mapSource.couldBeDownloadedFromInternet()){ - AccessibleToast.makeText(ctx, R.string.maps_could_not_be_downloaded, Toast.LENGTH_SHORT).show(); + Toast.makeText(ctx, R.string.maps_could_not_be_downloaded, Toast.LENGTH_SHORT).show(); return; } final RotatedTileBox rb = mapView.getCurrentRotatedTileBox(); diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java index 740459bffc..3ece15f7f0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java @@ -31,7 +31,6 @@ import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; -import net.osmand.access.AccessibleToast; import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; @@ -472,7 +471,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment { private void shareFavourites() { if (favouritesAdapter.isEmpty()) { - AccessibleToast.makeText(getActivity(), R.string.no_fav_to_save, Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity(), R.string.no_fav_to_save, Toast.LENGTH_LONG).show(); } else { final AsyncTask exportTask = new AsyncTask() { @Override @@ -518,9 +517,9 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment { protected void export() { final File tosave = getMyApplication().getAppPath(FavouritesDbHelper.FILE_TO_SAVE); if (favouritesAdapter.isEmpty()) { - AccessibleToast.makeText(getActivity(), R.string.no_fav_to_save, Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity(), R.string.no_fav_to_save, Toast.LENGTH_LONG).show(); } else if (!tosave.getParentFile().exists()) { - AccessibleToast.makeText(getActivity(), R.string.sd_dir_not_accessible, Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity(), R.string.sd_dir_not_accessible, Toast.LENGTH_LONG).show(); } else { final AsyncTask exportTask = new AsyncTask() { @Override @@ -537,12 +536,12 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment { protected void onPostExecute(String warning) { hideProgressBar(); if (warning == null) { - AccessibleToast.makeText( + Toast.makeText( getActivity(), MessageFormat.format(getString(R.string.fav_saved_sucessfully), tosave.getAbsolutePath()), Toast.LENGTH_LONG).show(); } else { - AccessibleToast.makeText(getActivity(), warning, Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity(), warning, Toast.LENGTH_LONG).show(); } } }; diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 0615a62364..3ed052fc49 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -44,7 +44,6 @@ import net.osmand.PlatformUtil; import net.osmand.StateChangedListener; import net.osmand.ValueHolder; import net.osmand.access.AccessibilityPlugin; -import net.osmand.access.AccessibleToast; import net.osmand.access.MapAccessibilityActions; import net.osmand.core.android.AtlasMapRendererView; import net.osmand.data.LatLon; @@ -700,12 +699,12 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven -1); getMapActions().enterRoutePlanningModeGivenGpx(null, null, null, false, true); } catch (NumberFormatException e) { - AccessibleToast.makeText(this, + Toast.makeText(this, getString(R.string.navigation_intent_invalid, schemeSpecificPart), Toast.LENGTH_LONG).show(); //$NON-NLS-1$ } } else { - AccessibleToast.makeText(this, + Toast.makeText(this, getString(R.string.navigation_intent_invalid, schemeSpecificPart), Toast.LENGTH_LONG).show(); //$NON-NLS-1$ } @@ -814,16 +813,16 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven final int newZoom = mapView.getZoom() + stp; final double zoomFrac = mapView.getZoomFractionalPart(); if (newZoom > 22) { - AccessibleToast.makeText(this, R.string.edit_tilesource_maxzoom, Toast.LENGTH_SHORT).show(); //$NON-NLS-1$ + Toast.makeText(this, R.string.edit_tilesource_maxzoom, Toast.LENGTH_SHORT).show(); //$NON-NLS-1$ return; } if (newZoom < 1) { - AccessibleToast.makeText(this, R.string.edit_tilesource_minzoom, Toast.LENGTH_SHORT).show(); //$NON-NLS-1$ + Toast.makeText(this, R.string.edit_tilesource_minzoom, Toast.LENGTH_SHORT).show(); //$NON-NLS-1$ return; } mapView.getAnimatedDraggingThread().startZooming(newZoom, zoomFrac, changeLocation); if (app.accessibilityEnabled()) - AccessibleToast.makeText(this, getString(R.string.zoomIs) + " " + newZoom, Toast.LENGTH_SHORT).show(); //$NON-NLS-1$ + Toast.makeText(this, getString(R.string.zoomIs) + " " + newZoom, Toast.LENGTH_SHORT).show(); //$NON-NLS-1$ showAndHideMapPosition(); } @@ -1095,9 +1094,9 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven if (Environment.MEDIA_MOUNTED.equals(state)) { // ok } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { - AccessibleToast.makeText(this, R.string.sd_mounted_ro, Toast.LENGTH_LONG).show(); + Toast.makeText(this, R.string.sd_mounted_ro, Toast.LENGTH_LONG).show(); } else { - AccessibleToast.makeText(this, R.string.sd_unmounted, Toast.LENGTH_LONG).show(); + Toast.makeText(this, R.string.sd_unmounted, Toast.LENGTH_LONG).show(); } } diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index aa6245c0a0..256071d43d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -21,7 +21,6 @@ import android.widget.Toast; import net.osmand.IndexConstants; import net.osmand.Location; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.data.QuadRect; @@ -136,7 +135,7 @@ public class MapActivityActions implements DialogProvider { String name = editText.getText().toString(); SavingTrackHelper savingTrackHelper = mapActivity.getMyApplication().getSavingTrackHelper(); savingTrackHelper.insertPointData(latitude, longitude, System.currentTimeMillis(), null, name, null, 0); - AccessibleToast.makeText(mapActivity, MessageFormat.format(getString(R.string.add_waypoint_dialog_added), name), Toast.LENGTH_SHORT) + Toast.makeText(mapActivity, MessageFormat.format(getString(R.string.add_waypoint_dialog_added), name), Toast.LENGTH_SHORT) .show(); dialog.dismiss(); } @@ -166,7 +165,7 @@ public class MapActivityActions implements DialogProvider { mapActivity.runOnUiThread(new Runnable() { @Override public void run() { - AccessibleToast.makeText(mapActivity, msg, Toast.LENGTH_LONG).show(); + Toast.makeText(mapActivity, msg, Toast.LENGTH_LONG).show(); } }); } @@ -262,7 +261,7 @@ public class MapActivityActions implements DialogProvider { @Override protected void onPostExecute(String result) { if (result != null) { - AccessibleToast.makeText(app, result, Toast.LENGTH_LONG).show(); + Toast.makeText(app, result, Toast.LENGTH_LONG).show(); } } @@ -492,12 +491,12 @@ public class MapActivityActions implements DialogProvider { int zoom = args.getInt(KEY_ZOOM); BaseMapLayer mainLayer = mapView.getMainLayer(); if (!(mainLayer instanceof MapTileLayer) || !((MapTileLayer) mainLayer).isVisible()) { - AccessibleToast.makeText(mapActivity, R.string.maps_could_not_be_downloaded, Toast.LENGTH_SHORT).show(); + Toast.makeText(mapActivity, R.string.maps_could_not_be_downloaded, Toast.LENGTH_SHORT).show(); return; } final ITileSource mapSource = ((MapTileLayer) mainLayer).getMap(); if (mapSource == null || !mapSource.couldBeDownloadedFromInternet()) { - AccessibleToast.makeText(mapActivity, R.string.maps_could_not_be_downloaded, Toast.LENGTH_SHORT).show(); + Toast.makeText(mapActivity, R.string.maps_could_not_be_downloaded, Toast.LENGTH_SHORT).show(); return; } final RotatedTileBox tb = mapView.getCurrentRotatedTileBox(); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index 3527586365..14432cd5f3 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -10,7 +10,6 @@ import android.widget.Toast; import net.osmand.CallbackWithObject; import net.osmand.ResultMatcher; import net.osmand.StateChangedListener; -import net.osmand.access.AccessibleToast; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager.TileSourceTemplate; import net.osmand.plus.ContextMenuAdapter; @@ -228,7 +227,7 @@ public class MapActivityLayers { if (g.showCurrentTrack) { if (!settings.SAVE_TRACK_TO_GPX.get() && ! settings.SAVE_GLOBAL_TRACK_TO_GPX.get()) { - AccessibleToast.makeText(activity, + Toast.makeText(activity, R.string.gpx_monitoring_disabled_warn, Toast.LENGTH_LONG).show(); } else { g.path = getString(R.string.show_current_gpx_title); @@ -316,7 +315,7 @@ public class MapActivityLayers { public void selectMapLayer(final OsmandMapTileView mapView) { if (OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) == null) { - AccessibleToast.makeText(activity, R.string.map_online_plugin_is_not_installed, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, R.string.map_online_plugin_is_not_installed, Toast.LENGTH_LONG).show(); return; } final OsmandSettings settings = getApplication().getSettings(); diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java index e01487194c..e75ac26255 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java @@ -21,7 +21,6 @@ import android.widget.ArrayAdapter; import android.widget.TextView; import android.widget.Toast; -import net.osmand.access.AccessibleToast; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; @@ -533,7 +532,7 @@ public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity runOnUiThread(new Runnable() { @Override public void run() { - AccessibleToast.makeText(SettingsBaseActivity.this, b.toString(), Toast.LENGTH_LONG).show(); + Toast.makeText(SettingsBaseActivity.this, b.toString(), Toast.LENGTH_LONG).show(); } }); diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java index 645c3abed9..50bd4a6c86 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java @@ -25,7 +25,6 @@ import android.widget.LinearLayout; import android.widget.Toast; import net.osmand.IProgress; import net.osmand.IndexConstants; -import net.osmand.access.AccessibleToast; import net.osmand.osm.io.NetworkUtils; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; @@ -466,7 +465,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity { final File path = new File(newDir); path.mkdirs(); if (!path.canRead() || !path.exists()) { - AccessibleToast.makeText(this, R.string.specified_dir_doesnt_exist, Toast.LENGTH_LONG).show(); + Toast.makeText(this, R.string.specified_dir_doesnt_exist, Toast.LENGTH_LONG).show(); return; } AlertDialog.Builder builder = new AlertDialog.Builder(this); @@ -548,7 +547,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity { protected void onPostExecute(Void result) { setProgressVisibility(false); if (!NativeOsmandLibrary.isNativeSupported(storage, getMyApplication())) { - AccessibleToast.makeText(SettingsGeneralActivity.this, R.string.native_library_not_supported, Toast.LENGTH_LONG).show(); + Toast.makeText(SettingsGeneralActivity.this, R.string.native_library_not_supported, Toast.LENGTH_LONG).show(); } } }.execute(); @@ -571,7 +570,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity { runOnUiThread(new Runnable() { @Override public void run() { - AccessibleToast.makeText(SettingsGeneralActivity.this, b.toString(), Toast.LENGTH_LONG).show(); + Toast.makeText(SettingsGeneralActivity.this, b.toString(), Toast.LENGTH_LONG).show(); } }); diff --git a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java index 7b692113d5..fe192b5b6a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java @@ -17,7 +17,6 @@ import android.widget.TextView; import android.widget.Toast; import net.osmand.ResultMatcher; -import net.osmand.access.AccessibleToast; import net.osmand.data.Amenity; import net.osmand.data.City; import net.osmand.data.LatLon; @@ -127,7 +126,7 @@ public class GeoIntentActivity extends OsmandListActivity { progress.dismiss(); if (result != null) { if (result.isEmpty()) { - AccessibleToast.makeText(GeoIntentActivity.this, getString(R.string.search_nothing_found), + Toast.makeText(GeoIntentActivity.this, getString(R.string.search_nothing_found), Toast.LENGTH_LONG).show(); } else { if (result.hasZoom()) { @@ -143,7 +142,7 @@ public class GeoIntentActivity extends OsmandListActivity { } finish(); } else { - AccessibleToast.makeText(GeoIntentActivity.this, + Toast.makeText(GeoIntentActivity.this, getString(R.string.search_offline_geo_error, intent.getData()), Toast.LENGTH_LONG).show(); } } diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java index 95e8b15671..356ef88790 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java @@ -18,7 +18,6 @@ import android.widget.RadioGroup; import android.widget.TextView; import android.widget.Toast; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandApplication; @@ -319,7 +318,7 @@ public class SearchAddressFragment extends Fragment { public void select(int mode) { if (searchPoint == null) { - AccessibleToast.makeText(getActivity(), R.string.please_select_address, Toast.LENGTH_SHORT).show(); + Toast.makeText(getActivity(), R.string.please_select_address, Toast.LENGTH_SHORT).show(); return; } AddressInformation ai = new AddressInformation(); diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java index 30f8ca2856..11d914d16b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineFragment.java @@ -8,7 +8,6 @@ import java.util.List; import java.util.Locale; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.osm.io.NetworkUtils; @@ -219,7 +218,7 @@ public class SearchAddressOnlineFragment extends Fragment implements SearchActiv protected void onPostExecute(Void result) { view.findViewById(R.id.ProgressBar).setVisibility(View.INVISIBLE); if(places == null){ - AccessibleToast.makeText(getActivity(), warning, Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity(), warning, Toast.LENGTH_LONG).show(); } else { adapter.setPlaces(places); } diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java index 46fa8d11cb..9afe0bd504 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java @@ -37,7 +37,6 @@ import android.widget.Toast; import net.osmand.Location; import net.osmand.ResultMatcher; -import net.osmand.access.AccessibleToast; import net.osmand.access.NavigationInfo; import net.osmand.data.Amenity; import net.osmand.data.LatLon; @@ -191,7 +190,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa private boolean search() { String query = searchFilter.getText().toString().trim(); if (query.length() < 2 && isNameSearch()) { - AccessibleToast.makeText(SearchPOIActivity.this, R.string.poi_namefinder_query_empty, Toast.LENGTH_LONG) + Toast.makeText(SearchPOIActivity.this, R.string.poi_namefinder_query_empty, Toast.LENGTH_LONG) .show(); return true; } @@ -607,7 +606,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa updateButtonState(); if (isNameSearch()) { if (isNominatimFilter() && !Algorithms.isEmpty(((NominatimPoiFilter) filter).getLastError())) { - AccessibleToast.makeText(SearchPOIActivity.this, ((NominatimPoiFilter) filter).getLastError(), + Toast.makeText(SearchPOIActivity.this, ((NominatimPoiFilter) filter).getLastError(), Toast.LENGTH_LONG).show(); } amenityAdapter.setNewModel(result); @@ -888,7 +887,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa public void onClick(DialogInterface dialog, int which) { if (app.getPoiFilters().removePoiFilter(filter)) { - AccessibleToast.makeText( + Toast.makeText( SearchPOIActivity.this, MessageFormat.format(SearchPOIActivity.this.getText(R.string.edit_filter_delete_message).toString(), filter.getName()), Toast.LENGTH_SHORT).show(); @@ -924,7 +923,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa nFilter.setSavedFilterByName(searchFilter.getText().toString()); } if (app.getPoiFilters().createPoiFilter(nFilter)) { - AccessibleToast.makeText( + Toast.makeText( SearchPOIActivity.this, MessageFormat.format(SearchPOIActivity.this.getText(R.string.edit_filter_create_message).toString(), editText.getText().toString()), Toast.LENGTH_SHORT).show(); diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java index 5a723a1b96..ba38e856af 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPoiFilterFragment.java @@ -27,7 +27,6 @@ import android.widget.Toast; import net.osmand.CollatorStringMatcher; import net.osmand.CollatorStringMatcher.StringMatcherMode; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.osm.AbstractPoiType; import net.osmand.osm.PoiType; @@ -213,7 +212,7 @@ public class SearchPoiFilterFragment extends OsmAndListFragment implements Searc final Object item = getListAdapter().getItem(position); ResourceManager rm = getApp().getResourceManager(); if (!rm.containsAmenityRepositoryToSearch(false)) { - AccessibleToast.makeText(getActivity(), R.string.data_to_search_poi_not_available, Toast.LENGTH_LONG); + Toast.makeText(getActivity(), R.string.data_to_search_poi_not_available, Toast.LENGTH_LONG); return; } if (item instanceof PoiUIFilter) { diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchRegionByNameActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchRegionByNameActivity.java index c4f8452ee0..0f231e9c40 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchRegionByNameActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchRegionByNameActivity.java @@ -4,7 +4,6 @@ import java.text.Collator; import java.util.ArrayList; import java.util.Comparator; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; @@ -47,7 +46,7 @@ public class SearchRegionByNameActivity extends SearchByNameAbstractActivity(((OsmandApplication)getApplication()).getResourceManager().getAddressRepositories()); NamesAdapter namesAdapter = new NamesAdapter(new ArrayList(initialListToFilter),createComparator()); //$NON-NLS-1$ diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java index b902186579..c677a60fc2 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java @@ -41,7 +41,6 @@ import net.osmand.IProgress; import net.osmand.IndexConstants; import net.osmand.Location; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.data.DataTileManager; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; @@ -726,7 +725,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { // double lat = mapActivity.getMapView().getLatitude(); // double lon = mapActivity.getMapView().getLongitude(); if (loc == null) { - AccessibleToast.makeText(app, R.string.audionotes_location_not_defined, Toast.LENGTH_LONG).show(); + Toast.makeText(app, R.string.audionotes_location_not_defined, Toast.LENGTH_LONG).show(); return; } double lon = loc.getLongitude(); @@ -965,7 +964,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { private void logErr(Exception e) { log.error("Error starting recorder ", e); - AccessibleToast.makeText(app, app.getString(R.string.recording_error) + " : " + e.getMessage(), Toast.LENGTH_LONG).show(); + Toast.makeText(app, app.getString(R.string.recording_error) + " : " + e.getMessage(), Toast.LENGTH_LONG).show(); } protected void openCamera() { @@ -1094,7 +1093,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { mediaRecFile = f; } catch (Exception e) { - AccessibleToast.makeText(app, e.getMessage(), Toast.LENGTH_LONG).show(); + Toast.makeText(app, e.getMessage(), Toast.LENGTH_LONG).show(); e.printStackTrace(); res = false; } @@ -1118,7 +1117,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { runMediaRecorder(mapActivity, mr, f); } catch (Exception e) { log.error("Error starting audio recorder ", e); - AccessibleToast.makeText(app, app.getString(R.string.recording_error) + " : " + Toast.makeText(app, app.getString(R.string.recording_error) + " : " + e.getMessage(), Toast.LENGTH_LONG).show(); } } else { @@ -1410,7 +1409,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { mapActivity.startActivityForResult(takePictureIntent, 205); } catch (Exception e) { log.error("Error taking a picture ", e); - AccessibleToast.makeText(app, app.getString(R.string.recording_error) + " : " + e.getMessage(), Toast.LENGTH_LONG).show(); + Toast.makeText(app, app.getString(R.string.recording_error) + " : " + e.getMessage(), Toast.LENGTH_LONG).show(); } } diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java index eda1ca041b..2cf95a7d61 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java @@ -26,7 +26,6 @@ import android.widget.Toast; import net.osmand.IndexConstants; import net.osmand.ValueHolder; -import net.osmand.access.AccessibleToast; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.ProgressImplementation; @@ -294,7 +293,7 @@ public class DashChooseAppDirFragment { mapsCopied = true; getMyApplication().getResourceManager().resetStoreDirectory(); } else { - AccessibleToast.makeText(activity, R.string.copying_osmand_file_failed, + Toast.makeText(activity, R.string.copying_osmand_file_failed, Toast.LENGTH_SHORT).show(); } updateView(); @@ -324,7 +323,7 @@ public class DashChooseAppDirFragment { .remove(fragment).commit(); } } else { - AccessibleToast.makeText(activity, R.string.specified_directiory_not_writeable, + Toast.makeText(activity, R.string.specified_directiory_not_writeable, Toast.LENGTH_LONG).show(); } if(dlg != null) { diff --git a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java index d3678c7c18..7f67716dcc 100644 --- a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java @@ -17,7 +17,6 @@ import android.widget.TextView; import android.widget.Toast; import net.osmand.IndexConstants; -import net.osmand.access.AccessibleToast; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.OsmandActionBarActivity; @@ -118,7 +117,7 @@ public class TestVoiceActivity extends OsmandActionBarActivity { public void run() { CommandPlayer p = app.getRoutingHelper().getVoiceRouter().getPlayer(); if (p == null) { - AccessibleToast.makeText(TestVoiceActivity.this, "Voice player not initialized", Toast.LENGTH_SHORT).show(); + Toast.makeText(TestVoiceActivity.this, "Voice player not initialized", Toast.LENGTH_SHORT).show(); } else { addButtons(ll, p); } diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index d3f7cdfabf..3959ca78c6 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -14,7 +14,6 @@ import android.widget.CompoundButton; import android.widget.Toast; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.core.android.MapRendererContext; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuAdapter.ItemClickListener; @@ -304,7 +303,7 @@ public class ConfigureMapMenu { app.getRendererRegistry().setCurrentSelectedRender(loaded); refreshMapComplete(activity); } else { - AccessibleToast.makeText(app, R.string.renderer_load_exception, Toast.LENGTH_SHORT).show(); + Toast.makeText(app, R.string.renderer_load_exception, Toast.LENGTH_SHORT).show(); } adapter.getItem(pos).setDescription(getRenderDescr(activity)); activity.getDashboard().refreshContent(true); diff --git a/OsmAnd/src/net/osmand/plus/dialogs/FavoriteDialogs.java b/OsmAnd/src/net/osmand/plus/dialogs/FavoriteDialogs.java index 1abfd26bb1..b44d10ab34 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/FavoriteDialogs.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/FavoriteDialogs.java @@ -19,7 +19,6 @@ import android.widget.ListView; import android.widget.Toast; import net.osmand.AndroidUtils; -import net.osmand.access.AccessibleToast; import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; @@ -72,7 +71,7 @@ public class FavoriteDialogs { } final String[] names = new String[points.size()]; if(points.size() == 0){ - AccessibleToast.makeText(activity, activity.getString(R.string.fav_points_not_exist), Toast.LENGTH_SHORT).show(); + Toast.makeText(activity, activity.getString(R.string.fav_points_not_exist), Toast.LENGTH_SHORT).show(); return null; } return showFavoritesDialog(activity, favouritesAdapter, click, null, dlgHolder, true); @@ -154,7 +153,7 @@ public class FavoriteDialogs { protected void addFavorite(final Activity activity, FavouritePoint point, final FavouritesDbHelper helper) { boolean added = helper.addFavourite(point); if (added) { - AccessibleToast.makeText(activity, MessageFormat.format( + Toast.makeText(activity, MessageFormat.format( activity.getString(R.string.add_favorite_dialog_favourite_added_template), point.getName()), Toast.LENGTH_SHORT) .show(); } diff --git a/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java b/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java index 26f28d718f..8172292ce3 100644 --- a/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java +++ b/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java @@ -27,7 +27,6 @@ import android.widget.Toast; import net.osmand.CallbackWithObject; import net.osmand.IndexConstants; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.data.RotatedTileBox; @@ -374,11 +373,11 @@ public class DistanceCalculatorPlugin extends OsmandPlugin { @Override protected void onPostExecute(String warning) { if (warning == null) { - AccessibleToast.makeText(activity, + Toast.makeText(activity, MessageFormat.format(app.getString(R.string.gpx_saved_sucessfully), toSave.getAbsolutePath()), Toast.LENGTH_LONG).show(); } else { - AccessibleToast.makeText(activity, warning, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, warning, Toast.LENGTH_LONG).show(); } if(dlg != null && dlg.isShowing()) { dlg.dismiss(); diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index de2839b60d..d2329e1ea9 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -34,7 +34,6 @@ import android.widget.Toast; import net.osmand.IProgress; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.map.WorldRegion; @@ -524,7 +523,7 @@ public class DownloadActivity extends AbstractDownloadActivity implements Downlo } b.append(w); } - AccessibleToast.makeText(DownloadActivity.this, b.toString(), Toast.LENGTH_LONG).show(); + Toast.makeText(DownloadActivity.this, b.toString(), Toast.LENGTH_LONG).show(); } newDownloadIndexes(); } @@ -635,7 +634,7 @@ public class DownloadActivity extends AbstractDownloadActivity implements Downlo } }, 1); } else { - AccessibleToast.makeText(this, + Toast.makeText(this, R.string.missing_write_external_storage_permission, Toast.LENGTH_LONG).show(); } diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java index d88c16036e..b1775afab3 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java @@ -23,7 +23,6 @@ import android.widget.Toast; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings.OsmandPreference; import net.osmand.plus.R; @@ -274,7 +273,7 @@ public class DownloadIndexesThread { private boolean checkRunning() { if (getCurrentRunningTask() != null) { - AccessibleToast.makeText(app, R.string.wait_current_task_finished, Toast.LENGTH_SHORT).show(); + Toast.makeText(app, R.string.wait_current_task_finished, Toast.LENGTH_SHORT).show(); return true; } return false; @@ -429,7 +428,7 @@ public class DownloadIndexesThread { @Override protected void onPostExecute(String result) { if (result != null && result.length() > 0) { - AccessibleToast.makeText(ctx, result, Toast.LENGTH_LONG).show(); + Toast.makeText(ctx, result, Toast.LENGTH_LONG).show(); } if (uiActivity instanceof Activity) { View mainView = ((Activity) uiActivity).findViewById(R.id.MainLayout); diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadValidationManager.java b/OsmAnd/src/net/osmand/plus/download/DownloadValidationManager.java index 01a1b472e5..47fc26a054 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadValidationManager.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadValidationManager.java @@ -12,7 +12,6 @@ import android.support.v4.app.FragmentActivity; import android.support.v7.app.AlertDialog; import android.widget.Toast; -import net.osmand.access.AccessibleToast; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; @@ -147,7 +146,7 @@ public class DownloadValidationManager { builder.setNegativeButton(R.string.shared_string_no, null); builder.show(); } else { - AccessibleToast.makeText(context, R.string.no_index_file_to_download, Toast.LENGTH_LONG).show(); + Toast.makeText(context, R.string.no_index_file_to_download, Toast.LENGTH_LONG).show(); } } else { downloadFilesCheck_3_ValidateSpace(context, items); diff --git a/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java index ea81a394ad..3e99e98c46 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java @@ -15,7 +15,6 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; -import net.osmand.access.AccessibleToast; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; @@ -200,7 +199,7 @@ public class DataStoragePlaceDialogFragment extends BottomSheetDialogFragment { .setExternalStorageDirectory(type, selectedFile.getAbsolutePath()); reloadData(); } else { - AccessibleToast.makeText(context, R.string.specified_directiory_not_writeable, + Toast.makeText(context, R.string.specified_directiory_not_writeable, Toast.LENGTH_LONG).show(); } return wr; diff --git a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java index 628bcda87c..0e814e326d 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java @@ -18,7 +18,6 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; -import net.osmand.access.AccessibleToast; import net.osmand.map.WorldRegion; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; @@ -304,7 +303,7 @@ public class ItemViewHolder { case ASK_FOR_SEAMARKS_PLUGIN: context.startActivity(new Intent(context, context.getMyApplication().getAppCustomization() .getPluginsActivity())); - AccessibleToast.makeText(context.getApplicationContext(), + Toast.makeText(context.getApplicationContext(), context.getString(R.string.activate_seamarks_plugin), Toast.LENGTH_SHORT).show(); break; case ASK_FOR_SRTM_PLUGIN_PURCHASE: @@ -314,7 +313,7 @@ public class ItemViewHolder { case ASK_FOR_SRTM_PLUGIN_ENABLE: context.startActivity(new Intent(context, context.getMyApplication().getAppCustomization() .getPluginsActivity())); - AccessibleToast.makeText(context, context.getString(R.string.activate_srtm_plugin), + Toast.makeText(context, context.getString(R.string.activate_srtm_plugin), Toast.LENGTH_SHORT).show(); break; case DOWNLOAD: diff --git a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java index 47f81ca608..68b19eee39 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java @@ -37,7 +37,6 @@ import android.widget.TextView; import android.widget.Toast; import net.osmand.IndexConstants; -import net.osmand.access.AccessibleToast; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuAdapter.ItemClickListener; import net.osmand.plus.ContextMenuItem; @@ -289,7 +288,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement } File dest = new File(f.getParentFile(), newName); if (dest.exists()) { - AccessibleToast.makeText(a, R.string.file_with_name_already_exists, + Toast.makeText(a, R.string.file_with_name_already_exists, Toast.LENGTH_LONG).show(); return; } else { @@ -301,7 +300,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement callback.run(); } } else { - AccessibleToast.makeText(a, R.string.file_can_not_be_renamed, + Toast.makeText(a, R.string.file_can_not_be_renamed, Toast.LENGTH_LONG).show(); } } @@ -504,7 +503,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement @Override protected void onPostExecute(String result) { a.setProgressBarIndeterminateVisibility(false); - AccessibleToast.makeText(a, result, Toast.LENGTH_LONG).show(); + Toast.makeText(a, result, Toast.LENGTH_LONG).show(); if (operation == RESTORE_OPERATION || operation == BACKUP_OPERATION) { a.reloadLocalIndexes(); } else { @@ -688,7 +687,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement listAdapter.cancelFilter(); expandAllGroups(); listAdapter.notifyDataSetChanged(); - AccessibleToast.makeText(getDownloadActivity(), getString(R.string.local_index_no_items_to_do, actionButton.toLowerCase()), Toast.LENGTH_SHORT).show(); + Toast.makeText(getDownloadActivity(), getString(R.string.local_index_no_items_to_do, actionButton.toLowerCase()), Toast.LENGTH_SHORT).show(); return; } expandAllGroups(); @@ -717,7 +716,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement @Override public boolean onActionItemClicked(ActionMode mode, MenuItem item) { if (selectedItems.isEmpty()) { - AccessibleToast.makeText(getDownloadActivity(), + Toast.makeText(getDownloadActivity(), getString(R.string.local_index_no_items_to_do, actionButton.toLowerCase()), Toast.LENGTH_SHORT).show(); return true; } diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java index 494f7f0cbe..ba799220a3 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java @@ -12,7 +12,6 @@ import android.support.v7.app.AlertDialog; import android.widget.Toast; import net.osmand.IndexConstants; -import net.osmand.access.AccessibleToast; import net.osmand.data.FavouritePoint; import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.GPXUtilities; @@ -190,7 +189,7 @@ public class GpxImportHelper { @Override protected void onPostExecute(GPXUtilities.GPXFile result) { progress.dismiss(); - AccessibleToast.makeText(mapActivity, R.string.fav_imported_sucessfully, Toast.LENGTH_LONG).show(); + Toast.makeText(mapActivity, R.string.fav_imported_sucessfully, Toast.LENGTH_LONG).show(); final Intent newIntent = new Intent(mapActivity, application.getAppCustomization().getFavoritesActivity()); mapActivity.startActivity(newIntent); } @@ -244,7 +243,7 @@ public class GpxImportHelper { private void handleResult(final GPXUtilities.GPXFile result, final String name, final boolean save) { if (result != null) { if (result.warning != null) { - AccessibleToast.makeText(mapActivity, result.warning, Toast.LENGTH_LONG).show(); + Toast.makeText(mapActivity, result.warning, Toast.LENGTH_LONG).show(); } else { if (save) { new SaveAsyncTask(result, name).execute(); @@ -253,7 +252,7 @@ public class GpxImportHelper { } } } else { - AccessibleToast.makeText(mapActivity, R.string.error_reading_gpx, Toast.LENGTH_LONG).show(); + Toast.makeText(mapActivity, R.string.error_reading_gpx, Toast.LENGTH_LONG).show(); } } @@ -312,7 +311,7 @@ public class GpxImportHelper { @Override protected void onPostExecute(final String warning) { final String msg = warning == null ? MessageFormat.format(application.getString(R.string.gpx_saved_sucessfully), result.path) : warning; - AccessibleToast.makeText(mapActivity, msg, Toast.LENGTH_LONG).show(); + Toast.makeText(mapActivity, msg, Toast.LENGTH_LONG).show(); showGpxOnMap(result); } diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index 52058fdd46..e8c7de43fb 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -24,7 +24,6 @@ import android.widget.Toast; import net.osmand.CallbackWithObject; import net.osmand.IndexConstants; -import net.osmand.access.AccessibleToast; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; import net.osmand.plus.GPXUtilities; @@ -139,7 +138,7 @@ public class GpxUiHelper { final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR); final List allGpxList = getSortedGPXFilenames(dir, false); if (allGpxList.isEmpty()) { - AccessibleToast.makeText(activity, R.string.gpx_files_not_found, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, R.string.gpx_files_not_found, Toast.LENGTH_LONG).show(); } if (!allGpxList.isEmpty() || showCurrentGpx) { @@ -159,7 +158,7 @@ public class GpxUiHelper { final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR); final List list = getSortedGPXFilenames(dir, false); if (list.isEmpty()) { - AccessibleToast.makeText(activity, R.string.gpx_files_not_found, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, R.string.gpx_files_not_found, Toast.LENGTH_LONG).show(); } if (!list.isEmpty() || showCurrentGpx) { if (showCurrentGpx) { @@ -473,7 +472,7 @@ public class GpxUiHelper { @Override public void run() { if (warn.length() > 0) { - AccessibleToast.makeText(activity, warn, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, warn, Toast.LENGTH_LONG).show(); } else { callbackWithObject.processResult(result); } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java index a601e6d79e..e8393f2646 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java @@ -10,7 +10,6 @@ import android.widget.Toast; import net.osmand.IProgress; import net.osmand.IndexConstants; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandApplication; @@ -103,7 +102,7 @@ public class MapDataMenuController extends MenuController { } else { mapActivity.startActivity(new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization() .getPluginsActivity())); - AccessibleToast.makeText(mapActivity, mapActivity.getString(R.string.activate_srtm_plugin), + Toast.makeText(mapActivity, mapActivity.getString(R.string.activate_srtm_plugin), Toast.LENGTH_SHORT).show(); } } else { diff --git a/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java index a62e22209a..a15e3bcfd7 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java @@ -13,7 +13,6 @@ import android.widget.TextView; import android.widget.Toast; import net.osmand.IndexConstants; -import net.osmand.access.AccessibleToast; import net.osmand.plus.GPXUtilities; import net.osmand.plus.GPXUtilities.GPXFile; import net.osmand.plus.GpxSelectionHelper; @@ -211,7 +210,7 @@ public class DashTrackFragment extends DashBaseFragment { private void showOnMap(GPXUtilities.GPXFile file){ if (file.isEmpty()) { - AccessibleToast.makeText(getActivity(), R.string.gpx_file_is_empty, Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity(), R.string.gpx_file_is_empty, Toast.LENGTH_LONG).show(); return; } diff --git a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java index 76c8554d2a..c1b998750b 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java @@ -34,7 +34,6 @@ import android.widget.TextView; import android.widget.Toast; import net.osmand.IndexConstants; -import net.osmand.access.AccessibleToast; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuAdapter.ItemClickListener; import net.osmand.plus.ContextMenuItem; @@ -490,7 +489,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } final String actionButton = value; if (allGpxAdapter.getGroupCount() == 0) { - AccessibleToast.makeText(getActivity(), + Toast.makeText(getActivity(), app.getString(R.string.local_index_no_items_to_do, actionButton.toLowerCase()), Toast.LENGTH_SHORT) .show(); return; @@ -520,7 +519,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { @Override public boolean onActionItemClicked(ActionMode mode, MenuItem item) { if (selectedItems.isEmpty()) { - AccessibleToast.makeText(getActivity(), + Toast.makeText(getActivity(), app.getString(R.string.local_index_no_items_to_do, actionButton.toLowerCase()), Toast.LENGTH_SHORT).show(); return true; @@ -559,7 +558,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } } if (e) { - AccessibleToast.makeText(getActivity(), R.string.gpx_file_is_empty, Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity(), R.string.gpx_file_is_empty, Toast.LENGTH_LONG).show(); } } @@ -1063,7 +1062,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { @Override protected void onPostExecute(String result) { getActivity().setProgressBarIndeterminateVisibility(false); - AccessibleToast.makeText(getActivity(), result, Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity(), result, Toast.LENGTH_LONG).show(); } } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java index 95660d7748..4196095fad 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java @@ -48,7 +48,6 @@ import android.widget.Toast; import net.osmand.CallbackWithObject; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.data.Amenity; import net.osmand.data.LatLon; import net.osmand.osm.PoiCategory; @@ -463,7 +462,7 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment { final Activity activity, final OpenstreetmapUtil openstreetmapUtil) { if (info == null && OsmPoint.Action.CREATE != action && openstreetmapUtil instanceof OpenstreetmapRemoteUtil) { - AccessibleToast.makeText(activity, activity.getResources().getString(R.string.poi_error_info_not_loaded), Toast.LENGTH_LONG).show(); + Toast.makeText(activity, activity.getResources().getString(R.string.poi_error_info_not_loaded), Toast.LENGTH_LONG).show(); return; } new AsyncTask() { @@ -598,7 +597,7 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment { EditPoiDialogFragment.createInstance(n, false); fragment.show(activity.getSupportFragmentManager(), TAG); } else { - AccessibleToast.makeText(activity, + Toast.makeText(activity, activity.getString(R.string.poi_error_poi_not_found), Toast.LENGTH_SHORT).show(); } @@ -653,7 +652,7 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment { protected void onPostExecute(final Node n) { if (n == null) { - AccessibleToast.makeText(activity, activity.getResources().getString(R.string.poi_error_poi_not_found), Toast.LENGTH_LONG).show(); + Toast.makeText(activity, activity.getResources().getString(R.string.poi_error_poi_not_found), Toast.LENGTH_LONG).show(); return; } AlertDialog.Builder builder = new AlertDialog.Builder(activity); @@ -700,10 +699,10 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment { public boolean processResult(Node result) { if (result != null) { if (isLocalEdit) { - AccessibleToast.makeText(activity, R.string.osm_changes_added_to_local_edits, + Toast.makeText(activity, R.string.osm_changes_added_to_local_edits, Toast.LENGTH_LONG).show(); } else { - AccessibleToast.makeText(activity, R.string.poi_remove_success, Toast.LENGTH_LONG) + Toast.makeText(activity, R.string.poi_remove_success, Toast.LENGTH_LONG) .show(); } if (activity instanceof MapActivity) { diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java index 0a65e268f9..4a661b0e63 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java @@ -17,7 +17,6 @@ import java.util.LinkedHashMap; import java.util.Map; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.data.Amenity; import net.osmand.osm.PoiType; import net.osmand.osm.edit.Entity; @@ -343,7 +342,7 @@ public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil { } catch (IOException | XmlPullParserException e) { log.error("Loading node failed " + nodeId, e); //$NON-NLS-1$ - AccessibleToast.makeText(ctx, ctx.getResources().getString(R.string.shared_string_io_error), + Toast.makeText(ctx, ctx.getResources().getString(R.string.shared_string_io_error), Toast.LENGTH_LONG).show(); } return null; @@ -386,7 +385,7 @@ public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil { @Override public void run() { - AccessibleToast.makeText(ctx, ctx.getResources().getString(R.string.shared_string_io_error), + Toast.makeText(ctx, ctx.getResources().getString(R.string.shared_string_io_error), Toast.LENGTH_LONG).show(); } }); @@ -398,7 +397,7 @@ public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil { ctx.runInUIThread(new Runnable() { @Override public void run() { - AccessibleToast.makeText(ctx, msg, Toast.LENGTH_LONG).show(); + Toast.makeText(ctx, msg, Toast.LENGTH_LONG).show(); } }); } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java index 1588e750dd..991a1f4c7b 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java @@ -19,7 +19,6 @@ import android.widget.Toast; import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.data.QuadRect; @@ -331,20 +330,20 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider protected void onPostExecute(OsmBugResult obj) { if (obj != null && obj.warning == null) { if(local == osmbugsUtil) { - AccessibleToast.makeText(activity, R.string.osm_changes_added_to_local_edits, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, R.string.osm_changes_added_to_local_edits, Toast.LENGTH_LONG).show(); if(obj.local != null) { PointDescription pd = new PointDescription(PointDescription.POINT_TYPE_OSM_BUG, obj.local.getText()); activity.getContextMenu().show(new LatLon(obj.local.getLatitude(), obj.local.getLongitude()), pd, obj.local); } } else { if(action == Action.REOPEN) { - AccessibleToast.makeText(activity, R.string.osn_add_dialog_success, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, R.string.osn_add_dialog_success, Toast.LENGTH_LONG).show(); } else if(action == Action.MODIFY) { - AccessibleToast.makeText(activity, R.string.osb_comment_dialog_success, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, R.string.osb_comment_dialog_success, Toast.LENGTH_LONG).show(); } else if(action == Action.DELETE) { - AccessibleToast.makeText(activity, R.string.osn_close_dialog_success, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, R.string.osn_close_dialog_success, Toast.LENGTH_LONG).show(); } else if(action == Action.CREATE) { - AccessibleToast.makeText(activity, R.string.osn_add_dialog_success, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, R.string.osn_add_dialog_success, Toast.LENGTH_LONG).show(); } } @@ -363,7 +362,7 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider } else { commentBug(bug, text); } - AccessibleToast.makeText(activity, activity.getResources().getString(r) + "\n" + obj, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, activity.getResources().getString(r) + "\n" + obj, Toast.LENGTH_LONG).show(); } } }; @@ -448,7 +447,7 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider String text = offline ? getMessageText(view) : getTextAndUpdateUserPwd(view); // server validation will handle it // if (us.length() == 0 || pwd.length() == 0) { -// AccessibleToast.makeText(activity, activity.getString(R.string.osb_author_or_password_not_specified), +// Toast.makeText(activity, activity.getString(R.string.osb_author_or_password_not_specified), // Toast.LENGTH_SHORT).show(); // } activity.getContextMenu().close(); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index 9ffa99379c..8fe7643452 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -15,7 +15,6 @@ import android.widget.Spinner; import android.widget.Toast; import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleToast; import net.osmand.data.Amenity; import net.osmand.osm.PoiType; import net.osmand.osm.edit.Node; @@ -358,7 +357,7 @@ public class OsmEditingPlugin extends OsmandPlugin { String name = settings.USER_NAME.get(); String pwd = settings.USER_PASSWORD.get(); if (Algorithms.isEmpty(name) || Algorithms.isEmpty(pwd)) { - AccessibleToast.makeText(la, R.string.validate_gpx_upload_name_pwd, Toast.LENGTH_LONG).show(); + Toast.makeText(la, R.string.validate_gpx_upload_name_pwd, Toast.LENGTH_LONG).show(); return false; } AlertDialog.Builder bldr = new AlertDialog.Builder(la); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java index 5565935a78..109918fcb7 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java @@ -28,7 +28,6 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; -import net.osmand.access.AccessibleToast; import net.osmand.data.PointDescription; import net.osmand.osm.edit.Node; import net.osmand.plus.OsmandApplication; @@ -650,7 +649,7 @@ public class OsmEditsFragment extends OsmAndListFragment protected void onPostExecute(String result) { getActivity().setProgressBarIndeterminateVisibility(false); if (result != null) { - AccessibleToast.makeText(getActivity(), getString(R.string.local_osm_changes_backup_failed) + " " + result, Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity(), getString(R.string.local_osm_changes_backup_failed) + " " + result, Toast.LENGTH_LONG).show(); } else { final Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java index 1c0c0dabc8..1379af6aff 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsUploadListenerHelper.java @@ -22,7 +22,6 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; -import net.osmand.access.AccessibleToast; import net.osmand.plus.IconsCache; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; @@ -60,7 +59,7 @@ public class OsmEditsUploadListenerHelper implements OsmEditsUploadListener { } } if (uploaded == pointsNum) { - AccessibleToast.makeText(activity, + Toast.makeText(activity, MessageFormat.format(numberFormat, uploaded), Toast.LENGTH_LONG) .show(); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/UploadGPXFilesTask.java b/OsmAnd/src/net/osmand/plus/osmedit/UploadGPXFilesTask.java index 60bb7a7dc4..c49b49aad0 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/UploadGPXFilesTask.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/UploadGPXFilesTask.java @@ -2,7 +2,6 @@ package net.osmand.plus.osmedit; import java.io.File; -import net.osmand.access.AccessibleToast; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.myplaces.AvailableGPXFragment.GpxInfo; @@ -58,7 +57,7 @@ public class UploadGPXFilesTask extends AsyncTask { } b.append(values[i]); } - AccessibleToast.makeText(la, b.toString(), Toast.LENGTH_LONG).show(); + Toast.makeText(la, b.toString(), Toast.LENGTH_LONG).show(); } } @@ -70,7 +69,7 @@ public class UploadGPXFilesTask extends AsyncTask { @Override protected void onPostExecute(String result) { la.setProgressBarIndeterminateVisibility(false); - AccessibleToast.makeText(la, result, Toast.LENGTH_LONG).show(); + Toast.makeText(la, result, Toast.LENGTH_LONG).show(); } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java index d9a997c6fd..d0c7f0228d 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java @@ -66,7 +66,6 @@ import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.PlatformUtil; import net.osmand.StateChangedListener; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.NavigationService; @@ -672,7 +671,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements public static void shareSessionUrl(OsMoPlugin osMoPlugin, Activity ctx) { String sessionURL = osMoPlugin.getTracker().getSessionURL(); if (sessionURL == null) { - AccessibleToast.makeText(ctx, R.string.osmo_session_not_available, Toast.LENGTH_SHORT).show(); + Toast.makeText(ctx, R.string.osmo_session_not_available, Toast.LENGTH_SHORT).show(); } else { ShareDialog dlg = new ShareDialog(ctx); dlg.setTitle(ctx.getString(R.string.osmo_share_session)); diff --git a/OsmAnd/src/net/osmand/plus/osmo/SettingsOsMoActivity.java b/OsmAnd/src/net/osmand/plus/osmo/SettingsOsMoActivity.java index 345e802b93..fb6f58d0f1 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/SettingsOsMoActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmo/SettingsOsMoActivity.java @@ -16,7 +16,6 @@ import android.widget.ScrollView; import android.widget.TextView; import android.widget.Toast; -import net.osmand.access.AccessibleToast; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.SettingsBaseActivity; @@ -150,7 +149,7 @@ public class SettingsOsMoActivity extends SettingsBaseActivity { OsMoService service = plugin.getService(); SessionInfo ci = service.getCurrentSessionInfo(); if(ci == null || ci.trackerId == null) { - AccessibleToast.makeText(this, R.string.osmo_auth_pending, Toast.LENGTH_SHORT).show(); + Toast.makeText(this, R.string.osmo_auth_pending, Toast.LENGTH_SHORT).show(); } else { ShareDialog dlg = new ShareDialog(this); dlg.setTitle(getString(R.string.osmo_tracker_id)); diff --git a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java index c6c2c2d0d4..8e8720c779 100644 --- a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java @@ -18,7 +18,6 @@ import android.widget.Toast; import net.osmand.IndexConstants; import net.osmand.ResultMatcher; import net.osmand.StateChangedListener; -import net.osmand.access.AccessibleToast; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager; import net.osmand.map.TileSourceManager.TileSourceTemplate; @@ -322,7 +321,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { final OsmandSettings settings = app.getSettings(); final Map entriesMap = settings.getTileSourceEntries(); if (!settings.isInternetConnectionAvailable(true)) { - AccessibleToast.makeText(activity, R.string.internet_not_available, Toast.LENGTH_LONG).show(); + Toast.makeText(activity, R.string.internet_not_available, Toast.LENGTH_LONG).show(); return; } AsyncTask> t = new AsyncTask>() { @@ -333,7 +332,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { protected void onPostExecute(final java.util.List downloaded) { if (downloaded == null || downloaded.isEmpty()) { - AccessibleToast.makeText(activity, R.string.shared_string_io_error, Toast.LENGTH_SHORT).show(); + Toast.makeText(activity, R.string.shared_string_io_error, Toast.LENGTH_SHORT).show(); return; } AlertDialog.Builder builder = new AlertDialog.Builder(activity); @@ -348,7 +347,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { public void onClick(DialogInterface dialog, int which, boolean isChecked) { selected[which] = isChecked; if (entriesMap.containsKey(downloaded.get(which).getName()) && isChecked) { - AccessibleToast.makeText(activity, R.string.tile_source_already_installed, Toast.LENGTH_SHORT).show(); + Toast.makeText(activity, R.string.tile_source_already_installed, Toast.LENGTH_SHORT).show(); } } }); @@ -447,13 +446,13 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { .replace("{$y}", "{2}").replace("{$z}", "{0}")); if (r.getName().length() > 0) { if (settings.installTileSource(r)) { - AccessibleToast.makeText(activity, activity.getString(R.string.edit_tilesource_successfully, r.getName()), + Toast.makeText(activity, activity.getString(R.string.edit_tilesource_successfully, r.getName()), Toast.LENGTH_SHORT).show(); resultMatcher.publish(r); } } } catch (RuntimeException e) { - AccessibleToast.makeText(activity, e.getMessage(), Toast.LENGTH_SHORT).show(); + Toast.makeText(activity, e.getMessage(), Toast.LENGTH_SHORT).show(); } } }); diff --git a/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java b/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java index 16b729fac7..3b6d75f4d0 100644 --- a/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java +++ b/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java @@ -25,7 +25,6 @@ import net.osmand.IProgress; import net.osmand.NativeLibrary.NativeSearchResult; import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; -import net.osmand.access.AccessibleToast; import net.osmand.binary.BinaryMapDataObject; import net.osmand.binary.BinaryMapIndexReader; import net.osmand.binary.BinaryMapIndexReader.MapIndex; @@ -812,7 +811,7 @@ public class MapRenderRepositories { handler.post(new Runnable() { @Override public void run() { - AccessibleToast.makeText(context, msg, Toast.LENGTH_LONG).show(); + Toast.makeText(context, msg, Toast.LENGTH_LONG).show(); } }); } @@ -821,7 +820,7 @@ public class MapRenderRepositories { handler.post(new Runnable() { @Override public void run() { - AccessibleToast.makeText(context, R.string.rendering_exception, Toast.LENGTH_SHORT).show(); + Toast.makeText(context, R.string.rendering_exception, Toast.LENGTH_SHORT).show(); } }); } catch (OutOfMemoryError e) { @@ -838,7 +837,7 @@ public class MapRenderRepositories { int max = (int) (Runtime.getRuntime().maxMemory() / (1 << 20)); int avl = (int) (Runtime.getRuntime().freeMemory() / (1 << 20)); String s = " (" + avl + " MB available of " + max + ") "; - AccessibleToast.makeText(context, context.getString(R.string.rendering_out_of_memory) + s , Toast.LENGTH_SHORT).show(); + Toast.makeText(context, context.getString(R.string.rendering_out_of_memory) + s , Toast.LENGTH_SHORT).show(); } }); } finally { diff --git a/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java b/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java index 19d7872fbe..1729efbf33 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapTileLayer.java @@ -1,6 +1,5 @@ package net.osmand.plus.views; -import net.osmand.access.AccessibleToast; import net.osmand.data.QuadRect; import net.osmand.data.RotatedTileBox; import net.osmand.map.ITileSource; @@ -241,7 +240,7 @@ public class MapTileLayer extends BaseMapLayer { if (mainMap && !oneTileShown && !useInternet && warningToSwitchMapShown < 3) { if (resourceManager.getRenderer().containsLatLonMapData(view.getLatitude(), view.getLongitude(), nzoom)) { - AccessibleToast.makeText(view.getContext(), R.string.switch_to_vector_map_to_see, Toast.LENGTH_LONG).show(); + Toast.makeText(view.getContext(), R.string.switch_to_vector_map_to_see, Toast.LENGTH_LONG).show(); warningToSwitchMapShown++; } } diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index c732bdbae0..54a524f5b7 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -33,7 +33,6 @@ import android.widget.Toast; import net.osmand.PlatformUtil; import net.osmand.access.AccessibilityActionsProvider; -import net.osmand.access.AccessibleToast; import net.osmand.access.MapExplorer; import net.osmand.core.android.MapRendererView; import net.osmand.data.LatLon; @@ -885,7 +884,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback { handler.post(new Runnable() { @Override public void run() { - AccessibleToast.makeText(application, msg, Toast.LENGTH_SHORT).show(); //$NON-NLS-1$ + Toast.makeText(application, msg, Toast.LENGTH_SHORT).show(); //$NON-NLS-1$ } }); } diff --git a/OsmAnd/src/net/osmand/plus/views/TransportInfoLayer.java b/OsmAnd/src/net/osmand/plus/views/TransportInfoLayer.java index 221ba985eb..026cc426c5 100644 --- a/OsmAnd/src/net/osmand/plus/views/TransportInfoLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/TransportInfoLayer.java @@ -2,7 +2,6 @@ package net.osmand.plus.views; import java.util.List; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.RotatedTileBox; import net.osmand.data.TransportRoute; @@ -139,7 +138,7 @@ public class TransportInfoLayer extends OsmandMapLayer { int x = (int) tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude()); int y = (int) tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude()); if (Math.abs(x - ex) < getRadius(tileBox) * 3 /2 && Math.abs(y - ey) < getRadius(tileBox) * 3 /2) { - AccessibleToast.makeText(view.getContext(), st.getName(view.getSettings().MAP_PREFERRED_LOCALE.get()) + " : " + //$NON-NLS-1$ + Toast.makeText(view.getContext(), st.getName(view.getSettings().MAP_PREFERRED_LOCALE.get()) + " : " + //$NON-NLS-1$ route.getType() + " " + route.getRef() //$NON-NLS-1$ , Toast.LENGTH_LONG).show(); return true; From edd55fa1cdcd98fee0af984ae56501b220b57a95 Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Wed, 6 Apr 2016 16:18:57 +0200 Subject: [PATCH 47/67] Translated using Weblate (Traditional Chinese) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 7a202a19a8..178c4fc52b 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -2160,4 +2160,5 @@ 粗的 細的 %s GPX 檔案已選擇 + 地圖模式 From df5fe90b9665db54870627ceb7673d5d2a54e2d1 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Thu, 7 Apr 2016 11:18:02 +0300 Subject: [PATCH 48/67] Finalized configure map and configure screen. --- OsmAnd/res/layout/list_item_single_line_descrition_narrow.xml | 2 +- OsmAnd/res/layout/list_item_single_line_descrition_wide.xml | 2 +- OsmAnd/res/menu/refresh_menu.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/layout/list_item_single_line_descrition_narrow.xml b/OsmAnd/res/layout/list_item_single_line_descrition_narrow.xml index 90bbb2f622..b777be5c7b 100644 --- a/OsmAnd/res/layout/list_item_single_line_descrition_narrow.xml +++ b/OsmAnd/res/layout/list_item_single_line_descrition_narrow.xml @@ -35,7 +35,7 @@ android:layout_weight="1" android:gravity="center_vertical" android:maxLines="2" - android:textSize="@dimen/default_list_text_size" + android:textAppearance="@style/TextAppearance.ListItemCategoryTitle" tools:text="Overlay map..."/> \ No newline at end of file From 6ae276be330f3565dd7ead6164c649a1041c6b20 Mon Sep 17 00:00:00 2001 From: Franco Date: Thu, 7 Apr 2016 02:50:32 +0200 Subject: [PATCH 49/67] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index d9f4d18f13..a775bbf7b4 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -164,8 +164,8 @@ Caminos en alto contraste Cruce de ferrocarril Cruce peatonal - Mostrar cruces de ferrocarril - Mostrar cruces peatonales + Cruces de ferrocarril + Cruces peatonales Atlas de caminos americanos Sin reglas de navegación v1.9 No usar reglas de navegación introducidas en v.1.9 @@ -254,10 +254,10 @@ Más detalles Menos detalles Restricciones de acceso - Mostrar restricciones de acceso - Mostrar calidad de los caminos - Mostrar superficie de los caminos - Mostrar rutas ciclistas + Restricciones de acceso + Calidad de los caminos + Superficie de los caminos + Rutas ciclistas Falló la autorización Entrar por invitación Autoconectar @@ -772,7 +772,7 @@ Dibujar senderos según la escala SAC Superponer símbolo de senderismo Dibujar senderos según trazas OSMC - Ocultar fronteras + Fronteras Ocultar fronteras regionales (niveles administrativos 5-9) Límite de velocidad GPX @@ -964,7 +964,7 @@ Mapa día/noche Estilo del mapa Configurar pantalla - Mostrar carriles + Carriles Evitar caminos sin pavimentar Evitar ferris/transbordadores Evitar… @@ -998,8 +998,8 @@ Desbloquear pantalla Pantalla bloqueada Definir intervalo de activación: - Mostrar radares - Mostrar límites de velocidad + Radares + Límites de velocidad Evitar peajes La navegación anterior no finalizó. ¿Continuar siguiéndola? (%1$s segundos) La ruta será calculada cuando se encuentre la ubicación @@ -1043,7 +1043,7 @@ Mantente a la izquierda y continúa por Mantente a la derecha y continúa por Hacer todas las funciones del terreno transparentes en el mapa - Ocultar polígonos + Polígonos Modo de dibujo Optimizar mapa para Mostrar desde el nivel de ampliación (requiere datos de contorno): @@ -2081,7 +2081,7 @@ Encontrar estacionamiento Mostrar polígonos Transparencia subyacente - Mostrar rutas de BTT + Rutas de BTT Invertir orden Marcadores del mapa Activar función de marcadores del mapa From 573b162037b730e61977b585f1ab48f1813cab80 Mon Sep 17 00:00:00 2001 From: sonora Date: Thu, 7 Apr 2016 11:06:13 +0200 Subject: [PATCH 50/67] use shared_string_none --- OsmAnd/res/values-de/strings.xml | 2 +- OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 995259c845..739995716a 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -476,7 +476,7 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su Underlay-Karte Wähle Underlay-Karte Overlay-Karte… - Keine + Keine(r/s) Overlay-Karte Wähle Overlay-Karte Karte schon installiert, Einstellungen werden aktualisiert diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java index ac5b43cea8..85ce46fe64 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java @@ -322,7 +322,7 @@ public class SelectedGPXFragment extends OsmAndListFragment { List options = new ArrayList(); - options.add(app.getString(R.string.none)); + options.add(app.getString(R.string.shared_string_none)); distanceSplit.add(-1d); timeSplit.add(-1); addOptionSplit(30, true, options, distanceSplit, timeSplit, checkedItem, groups); // 50 feet, 20 yards, 20 From ace24289752c7d11991606971da0b5ffb825bcc3 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Thu, 7 Apr 2016 12:38:46 +0300 Subject: [PATCH 51/67] Fix opening hours parser test --- OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java b/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java index a44c8b2c2f..0ea1fdf232 100644 --- a/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java +++ b/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java @@ -1008,7 +1008,7 @@ public class OpeningHoursParser { String assembledString = hours.toStringNoMonths(); boolean isCorrect = assembledString.equalsIgnoreCase(timeString); System.out.printf(" %sok: Expected: \"%s\" got: \"%s\"\n", - (isCorrect ? "NOT " : ""), timeString, assembledString); + (!isCorrect ? "NOT " : ""), timeString, assembledString); if (!isCorrect) { throw new IllegalArgumentException("BUG!!!"); } From 148f88bb6bf9c6024bb2e96f2d58da0db06def39 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Thu, 7 Apr 2016 11:38:51 +0200 Subject: [PATCH 52/67] Translated using Weblate (Danish) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-da/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 9456370f34..a850d837ee 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -146,8 +146,8 @@ Global mobilkort for visning & navigation til offline og online OSM kort Opret interessepunkt-filter - Transportform: - Vælg transportform + Transporttilstand: + Vælg transporttilstand Solopgang: %1$s \nSolnedgang: %2$s @@ -1552,9 +1552,9 @@ Foretrukket sprog for etiketter på kortet (hvis sprog ikke findes skiftes til engelsk eller lokale navne) Foretrukket sprog på kort Stop - Aktiver GPS baggrundstjenesten + Aktiver GPS baggrundstilstand GPS vågn-op interval - Stop GPS baggrundstjenesten? + Stop GPS baggrundstilstand? Hold Albansk Arabisk @@ -2241,7 +2241,7 @@ " OsmAnd Maps & Navigation - find steder på kortet og beregn ruter uden en internetforbindelse. Hent kort for et land, før rejsen og find steder og ruter i et ukendt område. \n\nGrundlæggende indstillinger: \n• Detaljerede kort for 200 lande -\n• Offline navigation med stemmevejledning\n• Adressesøgning i offline mode +\n• Offline navigation med stemmevejledning\n• Adressesøgning i offline tilstand \n• Info om steder på kortet: steder af interesse, caféer, parkeringspladser, butikker \n• Tilføj steder til foretrukne \n• Kørsel-, cykel- og fodgængernavigation From 4f0de12515ce9ef00b17d9b570fa72d8ffb6e6aa Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Thu, 7 Apr 2016 13:20:31 +0300 Subject: [PATCH 53/67] Configure map small tweak. --- OsmAnd/res/layout/list_item_icon_and_menu.xml | 4 +++- OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/layout/list_item_icon_and_menu.xml b/OsmAnd/res/layout/list_item_icon_and_menu.xml index 2d5dbae0a7..417066c61a 100644 --- a/OsmAnd/res/layout/list_item_icon_and_menu.xml +++ b/OsmAnd/res/layout/list_item_icon_and_menu.xml @@ -51,8 +51,10 @@ android:id="@+id/description" android:layout_width="match_parent" android:layout_height="wrap_content" + android:ellipsize="end" + android:lines="1" android:textSize="@dimen/default_desc_text_size" - tools:text="Some subtitle text"/> + tools:text="Some very long subtitle text, that won't fit into one line"/> Date: Thu, 7 Apr 2016 11:43:07 +0200 Subject: [PATCH 54/67] Translated using Weblate (Danish) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-da/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index a850d837ee..cf20674b59 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -375,7 +375,7 @@ Jeg er her Skift kortzoom via vandrette trackball bevægelser Brug trackball til zoom - Brug korte objektnavne i touch udforskning tilstand + Brug korte objektnavne i berøringstilstand Objektnavne Tilgængelighedsrelaterede indstillinger Tilgængelighed @@ -435,7 +435,7 @@ Nødvendige for ændringer i openstreetmap.org OSM-kodeord Nødvendig for ændringer i openstreetmap.org - Kørsel i baggrunden + Baggrundstilstand OsmAnd kører i baggrunden, mens skærmen er slukket @@ -1190,7 +1190,7 @@ Autofokus Hyperfokalafstand Uendelig fokus - Makro (nærbillede) fokusindstilling + Makrofokustilstand (nærbillede) Udvidet dybdeskarphed (EDOF) Kameraet forsøger løbende at fokusere Spil lyd når foto tages From d89161a6ce3ff7d1c40a69117b0d300a8996a061 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Thu, 7 Apr 2016 14:09:03 +0300 Subject: [PATCH 55/67] Fixed bug with back button on GPX dialog. --- .../osmand/plus/dialogs/ConfigureMapMenu.java | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index 3959ca78c6..b76bc27494 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -85,7 +85,8 @@ public class ConfigureMapMenu { private final class LayerMenuListener extends OnRowItemClick { private MapActivity ma; private ContextMenuAdapter cm; - @ColorRes final int defaultColor; + @ColorRes + final int defaultColor; private LayerMenuListener(MapActivity ma, ContextMenuAdapter cm) { this.ma = ma; @@ -109,7 +110,8 @@ public class ConfigureMapMenu { selectPOILayer(adapter, adapter.getItem(pos)); return false; } else if (itemId == R.string.layer_gpx_layer && cm.getItem(pos).getSelected()) { - showGpxSelectionDialog(); + showGpxSelectionDialog(adapter, adapter.getItem(pos)); + return false; } else { CompoundButton btn = (CompoundButton) view.findViewById(R.id.toggle_item); @@ -149,7 +151,7 @@ public class ConfigureMapMenu { selectedGpxHelper.clearAllGpxFileToShow(); adapter.getItem(pos).setDescription(selectedGpxHelper.getGpxDescription()); } else { - showGpxSelectionDialog(); + showGpxSelectionDialog(adapter, adapter.getItem(pos)); } } else if (itemId == R.string.layer_map) { if (OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) == null) { @@ -167,8 +169,21 @@ public class ConfigureMapMenu { return false; } - private void showGpxSelectionDialog() { - ma.getMapLayers().showGPXFileLayer(getAlreadySelectedGpx(), ma.getMapView()); + private void showGpxSelectionDialog(final ArrayAdapter adapter, + final ContextMenuItem item) { + AlertDialog dialog = ma.getMapLayers().showGPXFileLayer(getAlreadySelectedGpx(), + ma.getMapView()); + dialog.setOnDismissListener(new DialogInterface.OnDismissListener() { + @Override + public void onDismiss(DialogInterface dialog) { + OsmandApplication app = ma.getMyApplication(); + boolean selected = app.getSelectedGpxHelper().isShowingAnyGpxFiles(); + item.setSelected(app.getSelectedGpxHelper().isShowingAnyGpxFiles()); + item.setDescription(app.getSelectedGpxHelper().getGpxDescription()); + item.setColorRes(selected ? R.color.osmand_orange : defaultColor); + adapter.notifyDataSetChanged(); + } + }); } protected void selectPOILayer(final ArrayAdapter adapter, @@ -499,7 +514,7 @@ public class ConfigureMapMenu { createProperties(customRules, R.string.rendering_category_details, R.drawable.widget_no_icon, "details", adapter, activity); createProperties(customRules, R.string.rendering_category_hide, - R.drawable.ic_action_hide,"hide", adapter, activity); + R.drawable.ic_action_hide, "hide", adapter, activity); createProperties(customRules, R.string.rendering_category_routes, R.drawable.ic_action_map_routes, "routes", adapter, activity); From 82b947e7f037a2b238baeb2b16d479c50a7ba3fb Mon Sep 17 00:00:00 2001 From: ace shadow Date: Thu, 7 Apr 2016 20:27:09 +0200 Subject: [PATCH 56/67] Translated using Weblate (Slovak) Currently translated at 100.0% (1957 of 1957 strings) --- OsmAnd/res/values-sk/strings.xml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index 68394c1e68..a6055a4333 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -1282,14 +1282,14 @@ Zapnúť zaznamenávanie GPX Zastaviť zaznamenávanie GPX Začať nový segment - Skryť budovy - Skryť cesty, ktoré nie sú pre vozidlá - Skryť text - Skryť lesy a kríky + Budovy + Cesty, ktoré nie sú pre vozidlá + Text + Lesy a kríky Budovy pri priblížení 15 Viac detailov Menej detailov - Skryť obmedzenia prístupu + Obmedzenia prístupu Zobraziť obmedzenia prístupu Zobraziť kvalitu ciest Zobraziť povrch ciest @@ -1603,7 +1603,7 @@ Úložisko máp Kopírovať Chcete aby OsmAnd skopíroval svoje údaje do nového cieľa? - Skryť čísla domov + Čísla domov Vyhnúť sa prekročeniu hranice do inej krajiny Výškový limit @@ -1815,7 +1815,7 @@ Vysvetlivky k mape Odoslať Aktualizovať - Skryť plánované objekty + Plánované objekty Prečítať viac Čo je nové v @@ -1928,7 +1928,7 @@ Cesta zablokovaná Vybrať Vymeniť východzí a cieľový bod - Skryť ikony bodov záujmu (POI) + Ikony bodov záujmu (POI) Počet prispievateľov Počet zmien Výkaz pre @@ -1936,7 +1936,7 @@ Stav Uložiť zmeny E-mailová adresa - Skryť podzemné objekty + Podzemné objekty Prečítať viac Nájsť parkovanie Zobraziť polygóny @@ -2011,4 +2011,6 @@ Tenké Stredné Tučné + Režim mapy + %s vybraných GPX súborov From 719529d8937fb881a6ecff6905e080bf71b02b07 Mon Sep 17 00:00:00 2001 From: "Igor B. Poretsky" Date: Sun, 3 Apr 2016 11:47:18 +0300 Subject: [PATCH 57/67] Removed obsolete accessibility options. --- OsmAnd/res/values-af/strings.xml | 6 ------ OsmAnd/res/values-ar/strings.xml | 6 ------ OsmAnd/res/values-be-rBY/strings.xml | 6 ------ OsmAnd/res/values-be/strings.xml | 6 ------ OsmAnd/res/values-bg/strings.xml | 6 ------ OsmAnd/res/values-ca/strings.xml | 6 ------ OsmAnd/res/values-cs/strings.xml | 6 ------ OsmAnd/res/values-cy/strings.xml | 2 -- OsmAnd/res/values-da/strings.xml | 6 ------ OsmAnd/res/values-de/strings.xml | 6 ------ OsmAnd/res/values-el/strings.xml | 6 ------ OsmAnd/res/values-es-rAR/strings.xml | 6 ------ OsmAnd/res/values-es-rUS/strings.xml | 6 ------ OsmAnd/res/values-es/strings.xml | 6 ------ OsmAnd/res/values-eu/strings.xml | 6 ------ OsmAnd/res/values-fa/strings.xml | 6 ------ OsmAnd/res/values-fi/strings.xml | 2 -- OsmAnd/res/values-fr/strings.xml | 6 ------ OsmAnd/res/values-gl/strings.xml | 6 ------ OsmAnd/res/values-he/strings.xml | 6 ------ OsmAnd/res/values-hr/strings.xml | 1 - OsmAnd/res/values-hu/strings.xml | 6 ------ OsmAnd/res/values-it/strings.xml | 6 ------ OsmAnd/res/values-ja/strings.xml | 6 ------ OsmAnd/res/values-ka/strings.xml | 6 ------ OsmAnd/res/values-ko/strings.xml | 6 ------ OsmAnd/res/values-lt/strings.xml | 6 ------ OsmAnd/res/values-lv/strings.xml | 6 ------ OsmAnd/res/values-nb/strings.xml | 6 ------ OsmAnd/res/values-nl/strings.xml | 6 ------ OsmAnd/res/values-pl/strings.xml | 6 ------ OsmAnd/res/values-pt-rBR/strings.xml | 6 ------ OsmAnd/res/values-pt/strings.xml | 6 ------ OsmAnd/res/values-ro/strings.xml | 6 ------ OsmAnd/res/values-ru/strings.xml | 6 ------ OsmAnd/res/values-sc/strings.xml | 6 ------ OsmAnd/res/values-sk/strings.xml | 6 ------ OsmAnd/res/values-sl/strings.xml | 6 ------ OsmAnd/res/values-sv/strings.xml | 6 ------ OsmAnd/res/values-tr/strings.xml | 6 ------ OsmAnd/res/values-uk/strings.xml | 6 ------ OsmAnd/res/values-zh-rCN/strings.xml | 4 ---- OsmAnd/res/values-zh-rTW/strings.xml | 6 ------ OsmAnd/res/values/strings.xml | 6 ------ .../access/SettingsAccessibilityActivity.java | 16 ++-------------- .../src/net/osmand/plus/OsmandApplication.java | 4 ---- OsmAnd/src/net/osmand/plus/OsmandSettings.java | 12 ------------ 47 files changed, 2 insertions(+), 279 deletions(-) diff --git a/OsmAnd/res/values-af/strings.xml b/OsmAnd/res/values-af/strings.xml index 09a35c78aa..9266ce1917 100644 --- a/OsmAnd/res/values-af/strings.xml +++ b/OsmAnd/res/values-af/strings.xml @@ -116,8 +116,6 @@ Terug na ligging Help - Toeganklikheid uitbreidings vir ou Android-weergawes - Toeganklikheid uitbreidings Toeganklikheid gebruikswyse Skakel die toeganklikheid funksies aan Aan @@ -162,13 +160,9 @@ Kies die styl om relatiewe rigtings uit te druk tydens beweging Begin outo-aankondiging Stop outo-aankondiging - Beweeg kaart deur gebare op die raakskerm - Natuurlike kaart beweging Ek is hier Verander kaart vergroting deur horisontale trekbal bewegings Gebruik trekbal vir vergrotingsbeheer - Gebruik kort voorwerp name in aanraking ondersoek gebruikswyse - Gebruik voorwerp name Toeganklikheid voorkeure Toeganklikheid Nie genoeg proses geheue om geselekteerde area te vertoon nie diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml index bfe4612b24..d20f227cee 100644 --- a/OsmAnd/res/values-ar/strings.xml +++ b/OsmAnd/res/values-ar/strings.xml @@ -167,8 +167,6 @@ عودة إلى الموقع مساعدة - ملحقات الوصول لإصدارات أندرويد القديمة - ملحقات لإتاحة الوصول وضع إتاحة الوصول تفعيل مميزات إتاحة الوصول تفعيل @@ -567,7 +565,6 @@ الأيمن الخلفي الدقة الارتفاع - استخدام أسماء الكائنات التفضيلات المتعلقة بالإتاحة الإتاحة ذاكرة التشغيل غير كافية لعرض المنطقة المختارة @@ -603,8 +600,6 @@ جانبان (12 قطاع) نمط التّوجه اختر نمط التّعبير عن الاتّجاهات النّسبية أثناء الحركة - تمرير الخريطة بالإيماء على شاشة اللمس - تمرير الخريطة الطبيعي أنا هنا الحزم الصوتية (مسجلة، ميزات محدودة) الحزم الصوتية (صوت آلي، مفضلة) @@ -632,7 +627,6 @@ تفعيل الإخطار التلقائي من المحتمل أن الطريق طويلة جدا قد لايتمكن جهاز توجيه OsmAnd من حساب المسافة إلا بعد وضع نقطة وصل واحدة أو أكثر ↵ → متوسط طول المسافة المحتسب هو 200 كيلو متر تقريبًا. لذلك يرجى إضافة نقطة وصل أو أكثر على طول الطريق حتى يتمكن الجهاز من حساب طول مسافة الطريق. لم يعين المكان المرتبط بالملاحظة. استخدم \"استخدم المكان …\" لتعيين ملاحظة لمكان محدد - استخدم أسماء عناصر صغيرة في نمط التّصفح اللمسي رجاء، احتسب المسار أولا حاكي باستخدام المسار المحتسب حاكي باستخدام مسار GPX diff --git a/OsmAnd/res/values-be-rBY/strings.xml b/OsmAnd/res/values-be-rBY/strings.xml index a08886b004..5b7f2fc725 100644 --- a/OsmAnd/res/values-be-rBY/strings.xml +++ b/OsmAnd/res/values-be-rBY/strings.xml @@ -884,8 +884,6 @@ Viarnucca da pazіcyі Dapamoha - Pašyreńnі dastupnaścі dlia starych versіj Android - Pašyreńnі dastupnaścі Režym dastupnaścі Ukliučyć ulaścіvaścі dastupnaścі Ukl @@ -930,13 +928,9 @@ Abiarycie styĺ jak pakazvać adnosnyja napramkі padčas ruchu Pačać aŭtamatyčnyja anonsy Spynіć aŭtamatyčnyja anonsy - Pasoŭvać mapu ruchamі na tačskrynie - Naturaĺnaje pasoŭvańnie mapy Ja tut Źmianiać maštab haryzantaĺnymі ruchamі trekbolu Karystacca trekbolam dlia źmieny maštabu - Užyvać karotkіja nazvy abektaŭ u režymie ahliadu - Užyvać nazvy abektaŭ Nalady dastupnaścі Dastupnaść Raniej diff --git a/OsmAnd/res/values-be/strings.xml b/OsmAnd/res/values-be/strings.xml index 4f95898ba9..e99943ec45 100644 --- a/OsmAnd/res/values-be/strings.xml +++ b/OsmAnd/res/values-be/strings.xml @@ -439,8 +439,6 @@ Інфармацыя Вярнуцца да становішча - Пашырэньні даступнасьці для старых вэрсій Android - Пашырэньні даступнасьці Рэжым даступнасьці Уключыць уласьцівасьці даступнасьці Паводле глябальных наладаў сыстэмы @@ -483,13 +481,9 @@ Абярыце стыль як паказваць адносныя напрамкі падчас руху Уключыць аўтаматычнае агалошваньне Выключыць аўтаматычнае агалошваньне - Пасоўваць мапу рухамі на тачскрыне - Натуральнае пасоўваньне мапы Я тут Зьмяняць маштаб гарызантальнымі рухамі трэкболу Карыстацца трэкболам для зьмены маштабу - Ужываць кароткія назвы аб\'ектаў у рэжыме агляду - Ужываць назвы аб\'ектаў Налады даступнасьці Даступнасьць Недастаткова памяці каб паказаць абраную прастору diff --git a/OsmAnd/res/values-bg/strings.xml b/OsmAnd/res/values-bg/strings.xml index e60b98ab1e..f6fc08bad0 100644 --- a/OsmAnd/res/values-bg/strings.xml +++ b/OsmAnd/res/values-bg/strings.xml @@ -417,8 +417,6 @@ Назад към позицията Помощ - Достъпност за по-стари версии на Android - Разширения за достъпност режим на достъпност Включване на функции за достъпност и улесняване Вкл. @@ -463,13 +461,9 @@ Изберете стил за относителните посоки при движение Старт на гласовите напътствия Край на анонсирането - Преместване на картата с плъзгане по екрана - Движение на картата Аз съм тук Хоризонталното движение на тракбола за мащабира картата Тракбола за мащабиране - Кратки имена на обекти в режим разглеждане - Използване на имена на обекти Настройки за достъпност Достъпност Няма достатъчно памет за избрания район diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index c01c6012d7..7d860837eb 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -105,8 +105,6 @@ Informació Torna a la ubicació Ajuda - Extensions d\'accessibilitat per versions d\'Android antigues - Extensions d\'accessibilitat Mode d\'accessibilitat Activa Inactiva @@ -185,11 +183,8 @@ Traieu el cotxe de l\'aparcament Optimitza el mapa per Reprodueix les instruccions de la veu seleccionada - Desplaçament del mapa per gestos a la pantalla tàctil - Desplaçament natural del mapa Canvia el zoom del mapa amb moviments horitzontals al ratolí de bola Utilitza el ratolí de bola per controlar el zoom - Utilitza el nom dels objectes Es van penjar {0} PDI/notes PDIs/Notes d\'OSM desades localment Mostra i gestiona els PDI/notes d\'OSM de la base de dades local @@ -422,7 +417,6 @@ Direcció de visió Neteja-ho tot Mitjà de transport: - Utilitza el nom curt dels objectes en el mode d\'exploració tàctil Definit per l\'usuari Visualització del mapa centrada automàticament Només centra automàticament en la navegació diff --git a/OsmAnd/res/values-cs/strings.xml b/OsmAnd/res/values-cs/strings.xml index c274628acd..32423d0820 100644 --- a/OsmAnd/res/values-cs/strings.xml +++ b/OsmAnd/res/values-cs/strings.xml @@ -13,8 +13,6 @@ Informace Zpět na zobrazení pozice Nápověda - Moduly pro Usnadnění pro starší verze Androidu - Moduly pro Usnadnění Režim usnadnění Aktivuje funkce usnadnění Zapnuto @@ -59,13 +57,9 @@ Vyberte způsob vyjádření relativního směru pohybu Spustit automatické ohlašování Zastavit automatické ohlašování - Posouvat mapu pohybem prstů po dotykovém displeji - Přirozené posouvání mapy Jsem zde Měnit zvětšení vodorovnými pohyby trackballu Ovládat zvětšení pomocí trackballu - Použít krátká jména objektů - Krátká jména objektů Konfigurace usnadnění pro uživatele s omezením zraku Usnadnění Fluorescentní barvy diff --git a/OsmAnd/res/values-cy/strings.xml b/OsmAnd/res/values-cy/strings.xml index 837b42960a..c0797b4dd7 100644 --- a/OsmAnd/res/values-cy/strings.xml +++ b/OsmAnd/res/values-cy/strings.xml @@ -178,8 +178,6 @@ Cyfrannol cof %4$s MB (terfyn Android %5$s MB, Dalvik %6$s MB). Gwybodaeth Gefn i leoliad Cymorth -Estyniadau Hygyrchedd ar gyfer fersiynau Android hen -Estyniadau Hygyrchedd Modd Hygyrchedd Troi ar y nodweddion hygyrchedd Ar diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index cf20674b59..4ce3d554d8 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -321,8 +321,6 @@ Vis målestok Tilbage til placering - Tilgængelighedsudvidelser for gamle Android versioner - Tilgængelighedsudvidelser Tilgængelighedstilstand PM Støt @@ -370,13 +368,9 @@ Vælg stil til at udtrykke relative retninger under bevægelse Begynd autoannoncering Stop autoannoncering - Rul kort med fagter på den berøringsfølsomme skærm - Naturlig kortrulning Jeg er her Skift kortzoom via vandrette trackball bevægelser Brug trackball til zoom - Brug korte objektnavne i berøringstilstand - Objektnavne Tilgængelighedsrelaterede indstillinger Tilgængelighed Ikke nok proceshukommelse til at vise det valgte område diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 739995716a..072f8ed494 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -216,8 +216,6 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su Zurück zum Standort Hilfe - Barrierefreiheit-Erweiterungen für alte Android-Versionen - Barrierefreiheit-Erweiterungen Barrierefreiheit-Modus Schaltet die Eingabehilfen-Funktionen ein An @@ -262,13 +260,9 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su Wähle eine Art um relative Richtungen während der Bewegung auszudrücken Automatische Ankündigungen ein Automatische Ankündigungen aus - Scrolle die Karte mit Gesten auf dem Touchscreen - Natürliches Scrollen der Karte Ich bin hier Horizontale Trackball-Bewegung zoomt Karte Benutze den Trackball zum Zoomen - Benutze kurze Objektnamen im Touch-Entdeckungsmodus - Benutze Objektnamen Einstellungen zur Barrierefreiheit Bedienungshilfen Zu wenig Prozess-Speicher zum Anzeigen des gewählten Gebietes diff --git a/OsmAnd/res/values-el/strings.xml b/OsmAnd/res/values-el/strings.xml index 5175401dbc..8105f3c261 100644 --- a/OsmAnd/res/values-el/strings.xml +++ b/OsmAnd/res/values-el/strings.xml @@ -202,8 +202,6 @@ Πληροφορίες Επιστροφή στη θέση - Επεκτάσεις προσβασιμότητας για παλιές εκδόσεις Android - Επεκτάσεις προσβασιμότητας Λειτουργία προσβασιμότητας Ενεργοποιεί τις δυνατότητες προσβασιμότητας Ενεργό @@ -248,13 +246,9 @@ Επιλέξτε στυλ έκφρασης των σχετικών κατευθύνσεων κατά τη κίνηση Έναρξη αυτόματης εκφώνησης Διακοπή αυτόματης εκφώνησης - Μετακίνηση του χάρτη με χειρονομίες στην οθόνη αφής - Φυσική κύλιση χάρτη Είμαι εδώ Αλλαγή κλίμακας του χάρτη με οριζόντιες κινήσεις του trackball Χρήση του trackball για έλεγχο τις κλίμακας - Χρήση μικρών ονομάτων αντικειμένων στη λειτουργία αφής εξερεύνησης - Χρήση ονομάτων αντικειμένων Προτιμήσεις σχετικές με προσβασιμότητα Προσβασιμότητα Δεν υπάρχει αρκετή μνήμη για να εμφανιστεί η επιλεγμένη περιοχή diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index a775bbf7b4..0ea905ae3b 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -1093,8 +1093,6 @@ Mostrar escala Información Volver a la ubicación - Extensión de accesibilidad para versiones viejas de Android - Extensiones de accesibilidad Modo accesibilidad Activa las funciones de accesibilidad Usar ajuste global del sistema @@ -1137,13 +1135,9 @@ Elige el estilo para expresar direcciones relativas en movimiento Iniciar auto-anuncios Parar auto-anuncios - Desplaza el mapa con gestos en la pantalla táctil - Desplazamiento natural del mapa Estoy aquí Cambia la ampliación del mapa con movimientos horizontales de la rueda de desplazamiento Usar la rueda de desplazamiento para controlar la ampliación - Usa nombres cortos de objetos en modo de exploración táctil - Usar nombre de objetos Preferencias de accesibilidad Cerca Normal diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml index 1cddc7d2e4..bbc1d56a5f 100644 --- a/OsmAnd/res/values-es-rUS/strings.xml +++ b/OsmAnd/res/values-es-rUS/strings.xml @@ -1093,8 +1093,6 @@ Mostrar escala Información Volver a la ubicación - Extensión de accesibilidad para versiones viejas de Android - Extensiones de accesibilidad Modo accesibilidad Activa las funciones de accesibilidad Usar ajuste global del sistema @@ -1137,13 +1135,9 @@ Elige el estilo para expresar direcciones relativas en movimiento Iniciar auto-anuncios Parar auto-anuncios - Desplaza el mapa con gestos en la pantalla táctil - Desplazamiento natural del mapa Estoy aquí Cambia la ampliación del mapa con movimientos horizontales de la rueda de desplazamiento Usar la rueda de desplazamiento para controlar la ampliación - Usa nombres cortos de objetos en modo de exploración táctil - Usar nombre de objetos Preferencias de accesibilidad Cerca Normal diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index 9d46bde8f0..fd973012e0 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -651,8 +651,6 @@ Información Volver a la posición Ayuda - Extensión de accesibilidad para versiones viejas de Android - Extensiones de accesibilidad Modo accesibilidad Activa las características de accesibilidad Activado @@ -697,13 +695,9 @@ Selecciona el estilo para expresar direcciones relativas mientras se mueve Comenzar anuncios automáticos Parar anuncios automáticos - Desplaza el mapa por gestos en la pantalla táctil - Desplazamiento de mapa natural Estoy aquí Cambia el acercamiento del mapa con los movimientos horizontales de la bola de desplazamiento Utilizar la bola de desplazamiento para control del acercamiento - Usa nombres cortos de objetos en modo de exploración táctil - Utilizar nombre de objetos Preferencias relativas a la accesibilidad Accesibilidad Datos de la navegación diff --git a/OsmAnd/res/values-eu/strings.xml b/OsmAnd/res/values-eu/strings.xml index 7fa8a0fa5f..096cb643e4 100644 --- a/OsmAnd/res/values-eu/strings.xml +++ b/OsmAnd/res/values-eu/strings.xml @@ -441,8 +441,6 @@ Kokapenera itzuli Laguntza - Androiden bertsio zaharreko erabilerraztasunerako luzapenak - Erabilerraztasunerako luzapenak Erabilerraztasun modua Erabilerraztasun ezaugarriak gaitu On @@ -487,13 +485,9 @@ Aukeratu mugimenduan egotean ematen diren argibide erlatiboen estiloa Iragarpen automatikoa hasi Iragarpen automatikoa gelditu - Korritu mapa ukipen-pantailaren keinuen bidez - Maparen korritze naturala Hemen nago Maparen zooma aldatu trackball-aren mugimendu orizontalaren bidez Trackball-a erabili zooma kontrolatzeko - Objektuen izen motzak erabili ukipen-esplorazio moduan - Objetuen izenak erabili Erabilerraztasunari erlazionaturiko hobespenak Erabilerraztasuna Aukeratutako area erakusteko ez dago memoria nahikorik diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml index ef2c634122..fa4a0ab956 100644 --- a/OsmAnd/res/values-fa/strings.xml +++ b/OsmAnd/res/values-fa/strings.xml @@ -1232,17 +1232,11 @@ OsmAnd منبع باز است و فعالانه در حال توسعه است. پخش دستورات صوتی صدای انتخاب شده رندر بومی - افزونه دسترسی برای نسخه های قدیمی آندروید - افزونه دسترسی حالت دسترسی روشن کردن ویژگی های دسترسی راه های جانبی (۸ بخشی) - حرکات نقشه بر روی صفحه نمایش لمسی - حرکات طبیعی نقشه تغییر زوم نقشه توسط حرکت افقی گوی مکان نما استفاده از گوی مکان نما برای کنترل زوم - استفاده از نام کوتاه شی در حالت اکتشاف لمسی - استفاده از نام شی تنظیمات مربوط به دسترسی دسترسی diff --git a/OsmAnd/res/values-fi/strings.xml b/OsmAnd/res/values-fi/strings.xml index 3133eb4a9b..6c84f986d9 100644 --- a/OsmAnd/res/values-fi/strings.xml +++ b/OsmAnd/res/values-fi/strings.xml @@ -543,8 +543,6 @@ Natiivi renderöinti Lähetä GPX-tiedostot OSM:iin? Näkyvyys - Esteettömyys laajennokset vanhoille Android versioille - Esteettömyys laajennokset Esteettömyys moodi Globaalien systeemiasetusten mukaan ZXing viivakoodinlukusovellusta ei ole asennettuna. Etsitäänkö se Marketisa? diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index ccc9e0afbd..51c30d3d16 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -715,8 +715,6 @@ Retourner à la position Aide - Extensions d\'accessibilité pour les anciennes versions Android - Extensions d\'accessibilité Mode accessibilité Activer les fonctionnalités d\'accessibilité Oui @@ -761,13 +759,9 @@ Sélectionnez un style pour indiquer la direction générale lors du déplacement Démarrer les annonces automatiques Arrêter les annonces automatiques - Faire défiler la carte par gestes sur l\'écran - Défilement naturel de la carte Je suis ici Modifier le niveau de zoom par mouvements horizontaux du trackball Utiliser le trackball pour le contrôle du zoom - Utiliser les noms d\'objets courts - Utiliser les noms d\'objets Configurer les paramètres liés à l\'accessibilité Accessibilité Sur-couche fluorescente diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml index 8bf25ffe5d..9b760f089c 100644 --- a/OsmAnd/res/values-gl/strings.xml +++ b/OsmAnd/res/values-gl/strings.xml @@ -813,8 +813,6 @@ Regresar á posición Axuda - Extensións de accesibibidade para versións antigas de Android - Extensións de accesibilidade Modo de accesibilidade Activa as funcionalidades de accesibibidade Activar @@ -859,13 +857,9 @@ Escolla o estilo para expresar as direccións relativas cando se estea en movemento Iniciar os anuncios automáticos Parar os anuncios automáticos - Desprazar o mapa con xestos na pantalla táctil - Desprazamento natural do mapa Estou aquí Cambiar a ampliación do mapa con movementos horizontais da trackball Empregar a trackball para controlar a ampliación - Empregar os nomes curtos dos obxectos no modo de exploración con toques - Empregar os nomes dos obxectos Preferencias relacionadas coa accesibilidade Accesibilidade Cedo diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml index 3812112a48..e0b0c7d906 100644 --- a/OsmAnd/res/values-he/strings.xml +++ b/OsmAnd/res/values-he/strings.xml @@ -228,8 +228,6 @@ חזרה למיקום עזרה - הרחבות נגישות לגרסאות ישנות של אנדרויד - הרחבות נגישות מצב נגישות הפעלת תכונות הנגישות פעיל @@ -274,13 +272,9 @@ נא לבחור את הסגנון להבעת יחס ההכוונה בעת התזוזה התחלת הכרזה אוטומטית הפסקת ההכרזה האוטומטית - ניתן לגלול את המפה על ידי נגיעה במסך - גלילת מפה טבעית הנני כאן החלפת התקריב למפה על ידי תזוזות אופקיות של כדור המעקב שימוש בכדור המעקב לצורך שליטה בתקריב - שימוש בשמות קצרים לפריטים במצב חקירה במגע - שימוש בשמות של פריטים העדפות הקשורות בנגישות נגישות אין די זיכרון לתהליך כדי להציג את האיזור הנבחר diff --git a/OsmAnd/res/values-hr/strings.xml b/OsmAnd/res/values-hr/strings.xml index 6808ca9c9a..fe4154d6ee 100644 --- a/OsmAnd/res/values-hr/strings.xml +++ b/OsmAnd/res/values-hr/strings.xml @@ -261,7 +261,6 @@ prema Nema informacija Ja sam ovdje - Koristite imena objekata Nedovoljno memorije za prikaz odabranog područja E-pošta diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml index b0a3b74fbc..4816716324 100644 --- a/OsmAnd/res/values-hu/strings.xml +++ b/OsmAnd/res/values-hu/strings.xml @@ -13,8 +13,6 @@ Vissza a pozícióra Súgó - Akadálymentesítési kiegészítés régi Android verzióhoz - Akadálymentesítési kiegészítés Akadálymentesítési mód Akadálymentesítési lehetőségek bekapcsolása Be @@ -59,13 +57,9 @@ Mozgás közbeni relatív irány megjelenítés stílusának kiválasztása Automatikus bemondás indítása Automatikus bemondás leállítása - Térkép görgetése érintőképernyős gesztusokkal - Természetes térképgörgetés Itt vagyok Térképnagyítás vízszintes \'trackball\' mozdulatokkal \'trackball\' használata térképnagyításhoz - Rövid objektumnevek használata felfedező módban - Objektumnevek használata Akadálymentesítéssel kapcsolatos beállítások Akadálymentesítés Kevés a folyamatmemória a terület megjelenítéséhez diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index 396ca05f24..a0493aa242 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -677,8 +677,6 @@ Info Torna alla posizione - Estensioni per l\'accessibilità per vecchie versioni di Android - Estensioni per l\'accessibilità Modalità accessibile Abilita le funzioni relative all\'accessibilità Basata sulle impostazioni globali di sistema @@ -721,13 +719,9 @@ Scegli lo stile in cui vengono espresse in movimento le direzioni relative Avvia gli annunci automatici Ferma gli annunci automatici - Muovi la mappa con i gesti sullo schermo tattile - Scorrimento naturale della mappa Io sono qui Cambia lo zoom della mappa con movimenti orizzontali della trackball Usa la trackball per il controllo dello zoom - Usa i nomi corti degli oggetti in modalità esplorazione col tocco - Usa i nomi degli oggetti Preferenze relative all\'accessibilità Accessibilità Nord America diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index 8ef490bdba..8a11ef9f1f 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -1016,8 +1016,6 @@ POIの更新は利用できません 現在位置に戻す ヘルプ - 古いバージョンのAndroid用アクセシビリティ拡張します - アクセシビリティ拡張 アクセシビリティモード アクセシビリティ(ユーザー補助)機能を設定します オン @@ -1062,13 +1060,9 @@ POIの更新は利用できません 移動中での相対方向を示す方法を選択します 自動アナウンスの開始 自動アナウンスの停止 - タッチスクリーン上のジェスチャーでマップをスクロールします - 自然なマップスクロール 私はここです(現在位置) トラックボールを水平方向に動かすことでマップズームを変更できます ズームコントロールにトラックボールを使用 - タッチで検索する場合に短いオブジェクト名を使用します - オブジェクト名を使用 アクセシビリティ関連の設定をします アクセシビリティ 蛍光色の重ね表示 diff --git a/OsmAnd/res/values-ka/strings.xml b/OsmAnd/res/values-ka/strings.xml index c13c075b33..3d7251e065 100644 --- a/OsmAnd/res/values-ka/strings.xml +++ b/OsmAnd/res/values-ka/strings.xml @@ -55,8 +55,6 @@ ადგილზე დაბრუნება დახმარება - წვდომადობის გაფართოებები ანდროიდის ძველი ვერსიებისათვის - წვდომადობის გაფართოებები წვდომადობის რეჟიმი რთავს წვდომადობის თვისებებს ჩართული @@ -101,13 +99,9 @@ მიუთითეთ მოძრაობისას მიმართულებაზე დამოკიდებული მიმართულების სტილი თვითგამოცხადების ჩართვა თვითგამოცხადების გამორთვა - რუკის მოძრაობა ეკრანზე შეხებით - რუკის ავტომატური გადახვევა აქ ვარ რუკის გადიდება ტრეკბოლის ჰორიზონტალური მოძრაობით ტრეკბოლის გამოყენება გასადიდებლად - დათვალიერების რეჟიმში ობიექტების მოკლე დასახელებების გამოყენება - ობიექტების სახელების გამოყენება წვდომადობის პარამეტრები წვდომა არასაკმარისი მეხსიერება არჩეული ადგილის საჩვენებლად diff --git a/OsmAnd/res/values-ko/strings.xml b/OsmAnd/res/values-ko/strings.xml index 30ff35fb9e..0224e504cc 100644 --- a/OsmAnd/res/values-ko/strings.xml +++ b/OsmAnd/res/values-ko/strings.xml @@ -23,8 +23,6 @@ 위치로 돌아감 - 이전 안드로이드 버전에 대한 접근성(내게 필요한 옵션) 확장 - 접근성 확장 접근성 모드 접근성(내게 필요한 옵션) 기능을 켭니다 글로벌 시스템 설정에 따름 @@ -38,13 +36,9 @@ 이동하면서 상대적인 방향을 표현하는스타일을 선택합니다 자동알림 시작 자동알림 정지 - 터치스크린에서 제스쳐를 통해 지도를 스크롤합니다 - 자연스런 지도 스크롤 현재 나의 위치 수평으로 트랙볼을 움직여 지도의 확대와 축소를 변경합니다 줌 제어를 위한 트랙볼 사용 - 터치 탐색 모드에서 짧은 개체 이름을 사용합니다 - 개체 이름 사용 접근성(내게 필요한 옵션) 관련 선호도를 선택합니다 접근성 diff --git a/OsmAnd/res/values-lt/strings.xml b/OsmAnd/res/values-lt/strings.xml index 8a11775ec6..bd3b589ace 100644 --- a/OsmAnd/res/values-lt/strings.xml +++ b/OsmAnd/res/values-lt/strings.xml @@ -104,8 +104,6 @@ Atgal į vietą Pagalba - Prieigos plėtiniai skirti senesnėms Android versijoms - Prieigos plėtiniai Prieigos režimas Įjungia prieigos savybes Įjungta @@ -150,13 +148,9 @@ Pasirinkite stilių, kuriuo bus duodami reliatyvios krypties nurodymai važiuojant Pradėti automatinį pranešinėjimą Stabdyti automatinį pranešinėjimą - Stumdyti žemėlapį judesiais ant ekrano - Natūralus žemėlapio slinkimas Aš čia Keisti žemėlapio didinimą horizontaliais rutulio valdiklio judesiais Naudoti rytulio valdiklį žemėlapio didinimo valdymui - Rodyti trumpus objektų pavadinimus tyrinėjimo režime - Naudoti objektų pavadinimus Su prieiga susiję nustatymai Prieiga Pasirinktos vietos atvaizdavimui nepakanka atminties diff --git a/OsmAnd/res/values-lv/strings.xml b/OsmAnd/res/values-lv/strings.xml index 2fc0b5cfa9..3bbc5ec6b3 100644 --- a/OsmAnd/res/values-lv/strings.xml +++ b/OsmAnd/res/values-lv/strings.xml @@ -27,8 +27,6 @@ Atgriezties atrašanās vietā Palīdzība - Pieejamības paplašinājumi vecākām Android versijām - Pieejamības paplašinājumi Pieejamības režīms Ieslēdz pieejamības iespējas Ieslēgts @@ -73,13 +71,9 @@ Izvēlaties relatīvās virziena norādes izteiksmes stilus kustības laikā Sākt automātisku ziņošanu Pārtraukt automātisku ziņošanu - Ritināt karti ar kustībām uz ekrāna - Dabīga kartes ritināšana Es esmu šeit Mainīt mērogu ar horizontālā rulīša kustībām Mērogošana ar rullīti - Lietot īsos objektu nosaukumus pieskārienu skata režīmā - Lietot objektu vārdus Ar pieejamību saistītās izvēles Pieejamība Nepietiek atmiņas, lai attēlotu izvēlēto apgabalu diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml index 019dc2d19c..f518c4c269 100644 --- a/OsmAnd/res/values-nb/strings.xml +++ b/OsmAnd/res/values-nb/strings.xml @@ -128,8 +128,6 @@ Info Tilbake til posisjon - Tilgjengelighetsmoduler for gamle Android-versjoner - Tilgjengelighetsmoduler Tilgjengelighetsmodus Slår på tilgjengelighetsfunksjonene @@ -174,13 +172,9 @@ Velg stil til å uttrykke relative retninger under bevegelse Start auto-annonsering Stopp auto-annonsering - Rull kartet med bevegelser på berøringsskjermen - Naturlig kartrulling Jeg er her Endre kartzooming ved horisontale styrekulebevegelser Bruk styrekule for zoomkontroll - Bruk korte objektnavn i berøringsmodus - Bruk objektnavn Tilgjengelighetsrelaterte innstillinger Tilgjengelighet Ikke nok prosessminne til å vise valgt område diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml index d98252409f..916f524a4d 100644 --- a/OsmAnd/res/values-nl/strings.xml +++ b/OsmAnd/res/values-nl/strings.xml @@ -39,8 +39,6 @@ Info Terug naar locatie - Toegankelijkheidsmodules voor oude Android versies - Toegankelijkheidsmodules Toegankelijkheidsmodus Zet toegankelijkheidsmodus aan Gelijk aan systeeminstelling @@ -82,13 +80,9 @@ Kies stijl van richtingsaanduidingen tijdens het verplaatsen Start automatische aankondigingen Stop automatische aankondigingen - Verschuif de kaart door beweging van het scherm - Natuurlijke kaartverschuivingen Hier ben ik Zoom kaart door trackball horizontaal te bewegen Gebruik trackball om te zoomen - Gebruik korte objectnamen in aanraakmodus - Gebruik korte objectnamen Toegankelijkheidsgerelateerde instellingen Toegankelijkheid Niet genoeg werkgeheugen voor weergave van het geselecteerde gebied diff --git a/OsmAnd/res/values-pl/strings.xml b/OsmAnd/res/values-pl/strings.xml index 44a1faaf6c..74709fc52a 100644 --- a/OsmAnd/res/values-pl/strings.xml +++ b/OsmAnd/res/values-pl/strings.xml @@ -660,8 +660,6 @@ Powróć do pozycji Pomoc - Rozszerzenia ułatwienia dostępu dla starych wersji Androida - Rozszerzenia ułatwień dostępu Tryb ułatwień dostępu Przełącza funkcje ułatwień dostępu Włączone @@ -706,13 +704,9 @@ Wybierz styl określania kierunków względnych podczas ruchu Włącz automatyczne ogłaszanie Wyłącz automatyczne ogłaszanie - Przesuwaj mapę za pomocą gestów na ekranie dotykowym - Naturalne przewijanie mapy Jestem tutaj Zmienia stopień przybliżenia mapy poziomymi ruchami trackballa Przybliżanie mapy za pomocą trackballa - Używa krótkich nazw obiektów w trybie eksploracji dotykowej - Nazwy obiektów Ustawienia ułatwień dostępu Ułatwienia dostępu Odblaskowe nakładki diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index 948443422d..ffa047296d 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -1023,8 +1023,6 @@ Informação Voltar à posição - Extensões de acessibilidade para versões antigas do Android - Extensões de acessibilidade Modo de acessibilidade Ativar as opções de acessibilidade De acordo com a configuração do sistema global @@ -1062,13 +1060,9 @@ No sentido horário (12 setores) Estilo de direção Escolher o estilo para expressar sentidos relativos ao mover - Deslizar na tela para mover o mapa - Movimentação natural do mapa Estou aqui Alterar zoom do mapa por movimentos horizontais do trackball Usar trackball para controle de zoom - Usar nomes curtos de objetos em modo de exploração por toque - Usar nomes de objetos Preferências relacionadas com a acessibilidade Adiantado Normal diff --git a/OsmAnd/res/values-pt/strings.xml b/OsmAnd/res/values-pt/strings.xml index 00eb046a91..6644d43b73 100644 --- a/OsmAnd/res/values-pt/strings.xml +++ b/OsmAnd/res/values-pt/strings.xml @@ -500,8 +500,6 @@ Back to location Ajuda - Extensões de acessibilidade para versões Android antigas - Extensões de acessibilidade Modo de acessibilidade Activa as opções de acessibilidade Ligado @@ -546,13 +544,9 @@ Escolha o estilo para expressar sentidos relativos ao movimento Começar auto-anunciar Parar auto-anunciar - Usar gestos no ecrã táctil para mover o mapa - Movimentação natural do mapa Estou aqui Alterar zoom do mapa por movimentos horizontais da trackball Usar trackball para controle de zoom - Use nomes curtos de objetos em modo de exploração por toque - Usar nomes de objetos Preferências relacionadas com a acessibilidade Acessibilidade Sobreposições Fluorescentes diff --git a/OsmAnd/res/values-ro/strings.xml b/OsmAnd/res/values-ro/strings.xml index 682762b36a..f67e7290dc 100644 --- a/OsmAnd/res/values-ro/strings.xml +++ b/OsmAnd/res/values-ro/strings.xml @@ -234,8 +234,6 @@ Înapoi la poziție Ajutor - Extensii de accesibilitate pentru versiuni mai vechi de de Android - Extensii de accesibilitate Modul de accesibilitate Activează funcțiile de accesibilitate Pornit @@ -280,13 +278,9 @@ Alegeți sistemul de exprimare a direcțiilor relative pe timpul deplasării Pornește anunțurile automate Oprește anunțurile automate - Defilați harta prin gesturi pe display - Defilare automată hartă Sunt aici Schimbați nivelul de zoom prin mișcări orizontale ale trackball-ului Folosește trackball-ul pentru controlul zoom-ului - Folosește prescurtări ale denumirilor în modul explorare a hărții - Folosește prescurtări Preferințe pentru accesibilitate Accesibilitate Nu există suficientă memorie disponibilă pentru a afișa zona selectată diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index c1cc7a6a77..dcecdbeec1 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -759,15 +759,9 @@ Выберите стиль указания относительных направлений во время движения Включить автооповещение Выключить автооповещение - Перемещать карту жестами на сенсорном экране - Естественное управление картой Я здесь Менять масштаб карты горизонтальными движениями трекбола Использовать трекбол для изменения масштаба - Использовать краткие названия объектов при исследовании карты - Использовать краткие названия объектов - Дополнительные возможности невизуального доступа для старых версий Android - Дополнительные возможности невизуального доступа Настройки для невизуального доступа Специальные возможности Настройки векторного рендеринга diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index c11837e8cd..7083d4ec4a 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -776,7 +776,6 @@ Bùssola (12 setores) Istile de sa diretzione Deo so inoghe - Imprea sos nùmenes de sos ogetos Preferèntzias ligadas a s’atzessibilidade Atzessibilidade Carrigamentu … @@ -891,8 +890,6 @@ Peruna mapa vetoriale est disponìbile pro custa positzione. Ne podes iscarrigare una in Impostatziones (Amministra sos documentos de sas mapas), o colare a sas mapas in lìnia (abìlita sas mapas in lìnia pro lu fàghere). Faghe una donatzione pro tènnere funtzionalidades noas implementadas in s’àplicu - Estensiones pro s’atzessibilidade pro versiones betzas de Android - Estensiones pro s’atzessibilidade Basada in supra de sas impostatziones globales de sistema Ismanniamentu in segus Ismanniamentu in antis @@ -906,11 +903,8 @@ Issèbera s’istile in su cale benint espressadas in movimentu sas diretziones relativas Incumentza s’autosinnalatzione Firma s’autosinnalatzione - Move sa mapa cun sos gestos in s’ischermu tàtile - Iscurrimentu naturale de sa mapa Muda su zoom de sa mapa cun movimentos orizontales de sa trackball Imprea sa trackball pro controllare su zoom - Imprea sos nùmenes curtzos de sos ogetos in sa modalidade esploratzione tàtile Chitzo Normale Tardu diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index a6055a4333..5f51214083 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -100,8 +100,6 @@ Zobraziť pravítko Info Späť na umiestnenie - Rozšírenia uľahčenia prístupu pre staršie verzie Androidu - Rozšírenia uľahčenia prístupu Režim uľahčenia prístupu Zapnutie funkcií uľahčenia prístupu Podľa globálnych nastavení systému @@ -144,13 +142,9 @@ Výber štýlu na vyjadrenie relatívneho smerovania počas pohybu Spustiť autom. oznamovanie Zastaviť autom. oznamovanie - Posúvať mapu pohybmi po obrazovke - Prirodzené posúvanie mapy Tu som Zmeniť priblíženie mapy horizontálnymi pohybmi trackballu Použiť trackball na približovanie - Použiť skrátené názvy objektov v režime prezerania dotykom - Použiť názvy objektov Predvoľby týkajúce sa uľahčenia prístupu Uľahčenie prístupu Nedostatok procesnej pamäte na zobrazenie zvolenej oblasti diff --git a/OsmAnd/res/values-sl/strings.xml b/OsmAnd/res/values-sl/strings.xml index fd320466a0..9030954c00 100644 --- a/OsmAnd/res/values-sl/strings.xml +++ b/OsmAnd/res/values-sl/strings.xml @@ -573,8 +573,6 @@ Nazaj na mesto Pomoč - Razširitve dostopnosti za starejše različice na Androidu - Razširitve dostopnosti Način dostopnosti Vklopi zmožnosti dostopnosti Omogočeno @@ -609,12 +607,8 @@ Spletni in shranjeni zemljevidi Spletni in shranjeni zemljevidi Počisti - Drsanje po zemljevidi s potezami na zaslonu na dotik - Naravno drsenje zemljevida Spremeni povečavo zemljevida z vodoravnimi premiki sledilne kroglice Uporabi sledilno kroglico za nadzor povečave - Uporabi kratka imena predmetov v načinu raziskovanja dotika - Uporabi imena predmetov Z dostopnostjo povezane možnosti Dostopnost Ni dovolj pomnilnika za prikaz izbranega področja diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index 743b65362b..f324125ddf 100644 --- a/OsmAnd/res/values-sv/strings.xml +++ b/OsmAnd/res/values-sv/strings.xml @@ -152,8 +152,6 @@ Beskrivning Vänligen ange OSM användarnamn och lösenord för att ladda upp GPX-filer. - Tillgänglighetstillägg för gamla Android-versioner - Tillgänglighetstillägg Tillgänglighetsläge Sätter på tillgänglighetsfunktioner @@ -264,13 +262,9 @@ Välj sätt att uttrycka relativa riktningar under rörelse Börja meddela automatiskt Sluta meddela automatiskt - Bläddra i kartan med gester på pekskärmen - Naturlig kartrullning Jag är här Ändra kartzoom med horisontell flyttning av styrkulan Använd styrkula för zoom-kontroll - Använd korta objektnamn i \"touch exploration mode\" - Använd objektnamn Tillgänglighetsrelaterade inställningar Tillgänglighet Inte tillräckligt med processminne för att visa valt område diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index 8f25ca7527..2e9abd8a7d 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -538,8 +538,6 @@ Ekran cetveli Bilgi Konuma geri dön - Eski Android sürümleri için Erişilebilirlik uzantıları - Erişilebilirlik uzantıları Erişilebilirlik modu Erişilebilirlik özelliklerine dön Global sistem ayarına göre @@ -578,12 +576,8 @@ Hareket ederken göreceli yönleri ifade etmek için bir stil seçin Duyuruyu otomatik başlat Duyuruyu otomatik durdur - Dokunmatik ekrandaki hareketler ile ilerleyin haritası - Doğal harita kaydırma Yatay topunu hamle ile yakınlaştırarak haritayı değiştirme Zoom kontrolü için topunu kullan - Dokunarak keşfetme modunda kısa nesne adları kullan - Nesne adları kullan Erişilebilirlik ile ilgili tercihler Erişilebilirlik Seçilen alanı görüntülemek için işlem belleği yeterli değil diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index d2377ed35d..5c50d51fd8 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -77,8 +77,6 @@ Повернутись Допомога - Допоміжні можливості для старих версій Android - Розширення допоміжних можливостей Режим допоміжних можливостей Вмикає допоміжні можливості Увімкнено @@ -123,13 +121,9 @@ Виберіть стиль вказівника відносних напрямків під час руху Увімкнути автоповідомлення Вимкнути автоповідомлення - Пересувати карту жестами на сенсорному екрані - Звичайне управління картою Я тут Змінювати масштаб горизонтальним рухом трекбола Використовувати трекбол для зміни масштабу - Використовувати короткі назви для об’єктів при огляді мапи - Використовувати короткі назви для об’єктів Налаштування для невізуального доступу Спеціальні можливості Недостатньо пам’яті для процесу показу мапи для виділеної ділянки diff --git a/OsmAnd/res/values-zh-rCN/strings.xml b/OsmAnd/res/values-zh-rCN/strings.xml index 7d4630c6b0..a252b148c7 100644 --- a/OsmAnd/res/values-zh-rCN/strings.xml +++ b/OsmAnd/res/values-zh-rCN/strings.xml @@ -135,8 +135,6 @@ 信息 帮助 - 无障碍扩展旧的Android版本 - 无障碍扩展 无障碍模式 打开辅助功能 @@ -169,9 +167,7 @@ 准确性 海拔 没有资料 - 天然地图滚动 我在这里 - 使用对象名 无障碍相关的喜好 无障碍 离线编辑 diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 178c4fc52b..d82f13e8ce 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -218,8 +218,6 @@ 資訊 回到目前位置 - 給舊 Android 版本的無障礙擴展 - 無障礙擴展 無障礙模式 開啟無障礙功能 開啟 @@ -264,13 +262,9 @@ 在行進當中,以選擇的樣式來表示相對的方向 啟動自動告知 關閉自動告知 - 在觸控螢幕上用手勢移動地圖 - 自然的捲動地圖 我的位置 以軌跡球水平移動改變地圖縮放 以軌跡球控制地圖縮放 - 在觸摸探索模式中用簡短的物件名稱 - 使用物件名稱 無障礙相關的偏好設定 無障礙 處理記憶體不足,無法顯示已選取的區域 diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 4a56eafe6c..5168cf4c52 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -1561,8 +1561,6 @@ If you need help with OsmAnd application, please contact our support team: suppo Info Back to position - Accessibility extensions for old Android versions - Accessibility extensions Accessibility mode Turns on the accessibility features According to the global system setting @@ -1605,13 +1603,9 @@ If you need help with OsmAnd application, please contact our support team: suppo Choose style to express relative directions while moving Start auto announcing Stop auto announcing - Scroll map by gestures on the touchscreen - Natural map scrolling I am here Change map zooming by horizontal trackball moves Use trackball for zoom control - Use short object names in touch exploration mode - Use object names Accessibility related preferences Early Normal diff --git a/OsmAnd/src/net/osmand/access/SettingsAccessibilityActivity.java b/OsmAnd/src/net/osmand/access/SettingsAccessibilityActivity.java index b0828c1747..7532de51c0 100644 --- a/OsmAnd/src/net/osmand/access/SettingsAccessibilityActivity.java +++ b/OsmAnd/src/net/osmand/access/SettingsAccessibilityActivity.java @@ -1,7 +1,6 @@ package net.osmand.access; -import android.os.Build; import android.os.Bundle; import android.preference.ListPreference; import android.preference.Preference; @@ -23,7 +22,7 @@ public class SettingsAccessibilityActivity extends SettingsBaseActivity { @Override - public void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { ((OsmandApplication) getApplication()).applyTheme(this); super.onCreate(savedInstanceState); getToolbar().setTitle(R.string.shared_string_accessibility); @@ -74,18 +73,7 @@ public class SettingsAccessibilityActivity extends SettingsBaseActivity { cat.addPreference(createCheckBoxPreference(settings.ZOOM_BY_TRACKBALL, R.string.zoom_by_trackball, R.string.zoom_by_trackball_descr)); - - cat.addPreference(createCheckBoxPreference(settings.USE_SHORT_OBJECT_NAMES, R.string.use_short_object_names, - R.string.use_short_object_names_descr)); - - - if (Build.VERSION.SDK_INT < 14) { // Build.VERSION_CODES.ICE_CREAM_SANDWICH - cat.addPreference(createCheckBoxPreference(settings.SCROLL_MAP_BY_GESTURES, R.string.scroll_map_by_gestures, - R.string.scroll_map_by_gestures_descr)); - cat.addPreference(createCheckBoxPreference(settings.ACCESSIBILITY_EXTENSIONS, R.string.accessibility_extensions, - R.string.accessibility_extensions)); - } - } + } protected void addSpeechRateSetting(PreferenceGroup grp) { diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 60cf3d6bba..5186ef420e 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -694,10 +694,6 @@ public class OsmandApplication extends MultiDexApplication { public OsmandRegions getRegions() { return regions; } - - public boolean accessibilityExtensions() { - return (Build.VERSION.SDK_INT < 14) ? getSettings().ACCESSIBILITY_EXTENSIONS.get() : false; - } public boolean accessibilityEnabled() { final AccessibilityMode mode = getSettings().ACCESSIBILITY_MODE.get(); diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 86e4bd2287..93b60495dc 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -783,18 +783,6 @@ public class OsmandSettings { public final OsmandPreference ZOOM_BY_TRACKBALL = new BooleanAccessibilityPreference("zoom_by_trackball", false).makeGlobal(); - // this value string is synchronized with settings_pref.xml preference name - public final OsmandPreference SCROLL_MAP_BY_GESTURES = - new BooleanAccessibilityPreference("scroll_map_by_gestures", true).makeGlobal(); - - // this value string is synchronized with settings_pref.xml preference name - public final OsmandPreference USE_SHORT_OBJECT_NAMES = - new BooleanAccessibilityPreference("use_short_object_names", false).makeGlobal(); - - // this value string is synchronized with settings_pref.xml preference name - public final OsmandPreference ACCESSIBILITY_EXTENSIONS = - new BooleanAccessibilityPreference("accessibility_extensions", false).makeGlobal(); - // magnetic field doesn'torkmost of the time on some phones public final OsmandPreference USE_MAGNETIC_FIELD_SENSOR_COMPASS = new BooleanPreference("use_magnetic_field_sensor_compass", false).makeGlobal().cache(); From 9195f3cf9dbadcce968f79dd8056fe3f2bbfbbb9 Mon Sep 17 00:00:00 2001 From: "Igor B. Poretsky" Date: Thu, 31 Mar 2016 19:08:34 +0300 Subject: [PATCH 58/67] Removed obsolete and anyway unused touch exploration mode for map view. --- OsmAnd/src/net/osmand/access/MapExplorer.java | 119 ------------------ .../osmand/plus/views/OsmandMapTileView.java | 5 +- 2 files changed, 2 insertions(+), 122 deletions(-) delete mode 100644 OsmAnd/src/net/osmand/access/MapExplorer.java diff --git a/OsmAnd/src/net/osmand/access/MapExplorer.java b/OsmAnd/src/net/osmand/access/MapExplorer.java deleted file mode 100644 index ff02d72537..0000000000 --- a/OsmAnd/src/net/osmand/access/MapExplorer.java +++ /dev/null @@ -1,119 +0,0 @@ -package net.osmand.access; - -import android.graphics.PointF; -import android.view.GestureDetector.SimpleOnGestureListener; -import android.view.MotionEvent; - -import net.osmand.data.LatLon; -import net.osmand.data.PointDescription; -import net.osmand.data.QuadPoint; -import net.osmand.data.RotatedTileBox; -import net.osmand.plus.R; -import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider; -import net.osmand.plus.views.OsmandMapTileView; - -import java.util.List; -import java.util.Map; - -// Provide touch exploration mode for map view -// when scrolling it by gestures is disabled. -// -public class MapExplorer extends SimpleOnGestureListener implements IContextMenuProvider { - - private static final float VICINITY_RADIUS = 15; - - private OsmandMapTileView mapView; - private SimpleOnGestureListener fallback; - private Map selectedObjects = null; - - - // OnGestureListener specified as a second argument - // will be used when scrolling map by gestures - // is enabled. - public MapExplorer(OsmandMapTileView mapView, SimpleOnGestureListener fallback) { - this.mapView = mapView; - this.fallback = fallback; - } - - - // OnGestureListener interface implementation. - - @Override - public boolean onDown(MotionEvent e) { - return fallback.onDown(e); - } - - @Override - public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { - return fallback.onFling(e1, e2, velocityX / 3, velocityY / 3); - } - - @Override - public void onLongPress(MotionEvent e) { - fallback.onLongPress(e); - } - - @Override - public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { - return fallback.onScroll(e1, e2, distanceX, distanceY); - } - - @Override - public void onShowPress(MotionEvent e) { - fallback.onShowPress(e); - } - - @Override - public boolean onSingleTapConfirmed(MotionEvent e) { - return fallback.onSingleTapConfirmed(e); - } - - @Override - public boolean onDoubleTap(MotionEvent e) { - return fallback.onDoubleTap(e); - } - - // IContextMenuProvider interface implementation. - - @Override - public boolean disableSingleTap() { - return false; - } - - @Override - public boolean disableLongPressOnMap() { - return false; - } - - @Override - public boolean isObjectClickable(Object o) { - return false; - } - - @Override - public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List objects) { - int radius = (int)(VICINITY_RADIUS * tileBox.getDensity()); - final QuadPoint p = tileBox.getCenterPixelPoint(); - int dx = (int)Math.abs(point.x - p.x); - int dy = (int)Math.abs(point.y - p.y); - if ((dx < radius) && (dy < radius)) - objects.add(this); - } - - @Override - public LatLon getObjectLocation(Object o) { - final RotatedTileBox tb = mapView.getCurrentRotatedTileBox(); - return tb.getCenterLatLon(); - } - - @Override - public String getObjectDescription(Object o) { - return mapView.getContext().getString(R.string.i_am_here); - } - - @Override - public PointDescription getObjectName(Object o) { - return new PointDescription(PointDescription.POINT_TYPE_MARKER, mapView.getContext().getString(R.string.i_am_here)); - } - -} diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index 54a524f5b7..e224109dbf 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -33,7 +33,6 @@ import android.widget.Toast; import net.osmand.PlatformUtil; import net.osmand.access.AccessibilityActionsProvider; -import net.osmand.access.MapExplorer; import net.osmand.core.android.MapRendererView; import net.osmand.data.LatLon; import net.osmand.data.QuadPoint; @@ -220,7 +219,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback { handler = new Handler(); baseHandler = new Handler(application.getResourceManager().getRenderingBufferImageThread().getLooper()); animatedDraggingThread = new AnimateDraggingMapThread(this); - gestureDetector = new GestureDetector(ctx, new MapExplorer(this, new MapTileViewOnGestureListener())); + gestureDetector = new GestureDetector(ctx, new MapTileViewOnGestureListener()); multiTouchSupport = new MultiTouchSupport(ctx, new MapTileViewMultiTouchZoomListener()); doubleTapScaleDetector = new DoubleTapScaleDetector(activity, new MapTileViewMultiTouchZoomListener()); @@ -1037,7 +1036,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback { @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { - animatedDraggingThread.startDragging(velocityX, velocityY, + animatedDraggingThread.startDragging(velocityX / 3, velocityY / 3, e1.getX(), e1.getY(), e2.getX(), e2.getY(), true); return true; } From bbe60cfb9de31e207098bef2c6320f39be550910 Mon Sep 17 00:00:00 2001 From: CJTmmr Date: Fri, 8 Apr 2016 10:45:09 +0200 Subject: [PATCH 59/67] Translated using Weblate (Dutch) Currently translated at 100.0% (1951 of 1951 strings) --- OsmAnd/res/values-nl/strings.xml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml index 916f524a4d..fee08961b9 100644 --- a/OsmAnd/res/values-nl/strings.xml +++ b/OsmAnd/res/values-nl/strings.xml @@ -1477,14 +1477,14 @@ Alleen toegang met uitnodiging Aanmelding mislukt OsMo aanmeldings fout: %1$s.\nMogelijk is de service tijdelijk niet beschikbaar of is uw registratie verlopen.\nWilt u verder gaan met een nieuwe registratie? - Verberg gebouwen - Verberg voetpaden - Verberg tekst - Verberg bossen en beplanting + Gebouwen + Voet- en fietspaden + Tekst + Bossen en beplanting Gebouwen tonen vanaf zoomstap 15 Toon meer details Minder details - Toegankelijkheid niet tonen + Toegangsbeperkingen Toegangsbeperkingen tonen Kwaliteit van wegen tonen Wegoppervlak tonen @@ -1821,7 +1821,7 @@ Bericht Niet gebruiken Adres - Verberg huisnummers + Huisnummers Moet OsmAnd de gegevensbestanden ook naar de nieuwe locatie kopiëren? In de opgegeven directory kunnen geen kaarten opgeslagen worden Het kopiëren van bestanden is niet gelukt @@ -2052,7 +2052,7 @@ Legenda Meer lezen Wat is er nieuw in - Verberg voorgestelde objecten + Voorgestelde objecten Via OsmAnd gedeelde OSM-bewerkingen Nederduits Macedonisch @@ -2157,7 +2157,7 @@ Item verwijderd items verwijderd Alles terugzetten - Verberg POI-iconen + POI-iconen Start en bestemming verwisselen Aantal Bijdragers Aantal Bewerkingen @@ -2168,7 +2168,7 @@ Blokkeer... Verslag voor: Gegevens niet beschikbaar - Verberg ondergrondse objecten + Ondergrondse objecten Lees meer... Status Wijzigingen opslaan @@ -2243,4 +2243,6 @@ Dun Normaal Vet + Dag-Nacht stijl + %s GPX-files geselecteerd From 519b97897f66cf78493d88bb462c626be6d061fd Mon Sep 17 00:00:00 2001 From: Mirco Zorzo Date: Fri, 8 Apr 2016 11:56:21 +0200 Subject: [PATCH 60/67] Translated using Weblate (Italian) Currently translated at 100.0% (1951 of 1951 strings) --- OsmAnd/res/values-it/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index a0493aa242..0107b28355 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -2223,4 +2223,6 @@ Sottile Medio Grosso + Modalità mappa + %s file GPX selezionati From af90a35f151c364b44486b6382ab0c15f7d2a1ae Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Fri, 8 Apr 2016 11:44:10 +0300 Subject: [PATCH 61/67] Tiny list item layout tweaks. --- OsmAnd/res/layout/list_item_icon_and_menu.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OsmAnd/res/layout/list_item_icon_and_menu.xml b/OsmAnd/res/layout/list_item_icon_and_menu.xml index 417066c61a..db92744542 100644 --- a/OsmAnd/res/layout/list_item_icon_and_menu.xml +++ b/OsmAnd/res/layout/list_item_icon_and_menu.xml @@ -44,7 +44,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:textAppearance="@style/TextAppearance.ListItemTitle" - android:textSize="@dimen/default_list_text_size" tools:text="Some title text"/> Date: Fri, 8 Apr 2016 14:59:55 +0300 Subject: [PATCH 62/67] Fixed Overlay Map layout. --- .../layout/list_item_icon_and_menu_wide.xml | 96 +++++++++++++++++++ ...s_list_item.xml => list_item_progress.xml} | 5 +- OsmAnd/res/layout/two_line_list_item.xml | 52 ---------- .../net/osmand/plus/ContextMenuAdapter.java | 3 +- .../src/net/osmand/plus/ContextMenuItem.java | 17 +++- .../osmand/plus/dialogs/RasterMapMenu.java | 8 +- 6 files changed, 122 insertions(+), 59 deletions(-) create mode 100644 OsmAnd/res/layout/list_item_icon_and_menu_wide.xml rename OsmAnd/res/layout/{progress_list_item.xml => list_item_progress.xml} (92%) delete mode 100644 OsmAnd/res/layout/two_line_list_item.xml diff --git a/OsmAnd/res/layout/list_item_icon_and_menu_wide.xml b/OsmAnd/res/layout/list_item_icon_and_menu_wide.xml new file mode 100644 index 0000000000..042de39fd7 --- /dev/null +++ b/OsmAnd/res/layout/list_item_icon_and_menu_wide.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/progress_list_item.xml b/OsmAnd/res/layout/list_item_progress.xml similarity index 92% rename from OsmAnd/res/layout/progress_list_item.xml rename to OsmAnd/res/layout/list_item_progress.xml index a6aa644fe2..5c4f3ebbe5 100644 --- a/OsmAnd/res/layout/progress_list_item.xml +++ b/OsmAnd/res/layout/list_item_progress.xml @@ -3,10 +3,11 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" - android:layout_height="74dp" + android:layout_height="wrap_content" + android:background="?attr/bg_color" android:descendantFocusability="blocksDescendants" android:gravity="center_vertical" - android:minHeight="@dimen/list_item_height" + android:minHeight="72dp" android:orientation="vertical" android:paddingLeft="16dp"> diff --git a/OsmAnd/res/layout/two_line_list_item.xml b/OsmAnd/res/layout/two_line_list_item.xml deleted file mode 100644 index c7052a0d12..0000000000 --- a/OsmAnd/res/layout/two_line_list_item.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java index 8ad753e4ba..3b0c3c4aeb 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java @@ -243,7 +243,8 @@ public class ContextMenuAdapter { View dividerView = convertView.findViewById(R.id.divider); if (dividerView != null) { - if (getCount() - 1 == position || getItem(position + 1).isCategory()) { + if (getCount() - 1 == position || getItem(position + 1).isCategory() + || item.shouldHideDivider()) { dividerView.setVisibility(View.GONE); } else { dividerView.setVisibility(View.VISIBLE); diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java index fc0cb2bb17..16fdafe17e 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuItem.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuItem.java @@ -32,6 +32,7 @@ public class ContextMenuItem { private String description; private final ContextMenuAdapter.ItemClickListener itemClickListener; private final ContextMenuAdapter.OnIntegerValueChangedListener integerListener; + private final boolean hideDivider; private ContextMenuItem(@StringRes int titleId, String title, @@ -46,7 +47,8 @@ public class ContextMenuItem { boolean skipPaintingWithoutColor, int pos, String description, ContextMenuAdapter.ItemClickListener itemClickListener, - ContextMenuAdapter.OnIntegerValueChangedListener integerListener) { + ContextMenuAdapter.OnIntegerValueChangedListener integerListener, + boolean hideDivider) { this.titleId = titleId; this.title = title; this.mIcon = icon; @@ -62,6 +64,7 @@ public class ContextMenuItem { this.description = description; this.itemClickListener = itemClickListener; this.integerListener = integerListener; + this.hideDivider = hideDivider; } @StringRes @@ -139,6 +142,10 @@ public class ContextMenuItem { return integerListener; } + public boolean shouldHideDivider() { + return hideDivider; + } + public void setTitle(String title) { this.title = title; } @@ -188,6 +195,7 @@ public class ContextMenuItem { private ContextMenuAdapter.ItemClickListener mItemClickListener = null; private ContextMenuAdapter.OnIntegerValueChangedListener mIntegerListener = null; private boolean mSkipPaintingWithoutColor; + private boolean mHideDivider; public ItemBuilder setTitleId(@StringRes int titleId, @Nullable Context context) { this.mTitleId = titleId; @@ -268,10 +276,15 @@ public class ContextMenuItem { return this; } + public ItemBuilder hideDivider(boolean hideDivider) { + mHideDivider = hideDivider; + return this; + } + public ContextMenuItem createItem() { return new ContextMenuItem(mTitleId, mTitle, mIcon, mColorRes, mSecondaryIcon, mSelected, mProgress, mLayout, mLoading, mIsCategory, mSkipPaintingWithoutColor, - mPosition, mDescription, mItemClickListener, mIntegerListener); + mPosition, mDescription, mItemClickListener, mIntegerListener, mHideDivider); } } } diff --git a/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java index a7b61a80c5..930798b137 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java @@ -116,13 +116,15 @@ public class RasterMapMenu { mapTypeDescr = selected ? mapTypeDescr : mapActivity.getString(R.string.shared_string_none); contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(toggleActionStringId, mapActivity) + .hideDivider(true) .setListener(l) .setSelected(selected).createItem()); if (selected) { contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(mapTypeString, mapActivity) + .hideDivider(true) .setListener(l) - .setLayout(R.layout.two_line_list_item) + .setLayout(R.layout.list_item_icon_and_menu_wide) .setDescription(mapTypeDescr).createItem()); ContextMenuAdapter.OnIntegerValueChangedListener integerListener = new ContextMenuAdapter.OnIntegerValueChangedListener() { @@ -136,7 +138,8 @@ public class RasterMapMenu { // android:max="255" in layout is expected contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(mapTypeStringTransparency, mapActivity) - .setLayout(R.layout.progress_list_item) + .hideDivider(true) + .setLayout(R.layout.list_item_progress) .setIcon(R.drawable.ic_action_opacity) .setProgress(mapTransparencyPreference.get()) .setListener(l) @@ -151,6 +154,7 @@ public class RasterMapMenu { && mapLayers.getMapControlsLayer().isTransparencyBarInitialized(); contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(R.string.show_transparency_seekbar, mapActivity) + .hideDivider(true) .setListener(l) .setSelected(transparencySwitchState).createItem()); } From 2bc8ef25a3c7076d1edbecfea3b0d0dfa64c58b5 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Fri, 8 Apr 2016 15:09:18 +0300 Subject: [PATCH 63/67] Fixed Underlay Map layout. --- OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java index 930798b137..58eb4bc02e 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java @@ -147,6 +147,7 @@ public class RasterMapMenu { if (type == OsmandRasterMapsPlugin.RasterMapType.UNDERLAY) { contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder() .setTitleId(R.string.show_polygons, mapActivity) + .hideDivider(true) .setListener(l) .setSelected(hidePolygonsPref.get()).createItem()); } From c4f3a6fbc2ea13e423f5fd67bd814681f19a82ef Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Fri, 8 Apr 2016 17:32:34 +0300 Subject: [PATCH 64/67] Better switch logic for Underlay/Overlay --- .../rastermaps/OsmandRasterMapsPlugin.java | 56 +++++++++++++++++-- 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java index 8e8720c779..3c466b7e95 100644 --- a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java @@ -238,13 +238,10 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { final int defaultColor = IconsCache.getDefaultColorRes(mapActivity); final MapActivityLayers layers = mapActivity.getMapLayers(); - ContextMenuAdapter.ItemClickListener listener = new ItemClickListener() { + ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.OnRowItemClick() { @Override - public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int pos, boolean isChecked) { - OsmandSettings settings = mapActivity.getMyApplication().getSettings(); - if (itemId == R.string.layer_map) { - layers.selectMapLayer(mapView); - } else if (itemId == R.string.layer_overlay) { + public boolean onRowItemClick(ArrayAdapter adapter, View view, int itemId, int position) { + if (itemId == R.string.layer_overlay) { mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.OVERLAY_MAP); return false; } else if (itemId == R.string.layer_underlay) { @@ -253,6 +250,53 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { } return true; } + + @Override + public boolean onContextMenuClick(final ArrayAdapter adapter, int itemId, final int pos, boolean isChecked) { + final OsmandSettings settings = mapActivity.getMyApplication().getSettings(); + switch (itemId) { + case R.string.layer_overlay: + toggleUnderlayState(mapActivity, RasterMapType.OVERLAY, + new OnMapSelectedCallback() { + @Override + public void onMapSelected() { + ContextMenuItem item = adapter.getItem(pos); + + String overlayMapDescr = settings.MAP_OVERLAY.get(); + boolean hasOverlayDescription = overlayMapDescr != null; + overlayMapDescr = hasOverlayDescription ? overlayMapDescr + : mapActivity.getString(R.string.shared_string_none); + + item.setDescription(overlayMapDescr); + item.setSelected(hasOverlayDescription); + item.setColorRes(hasOverlayDescription ? R.color.osmand_orange : defaultColor); + adapter.notifyDataSetChanged(); + } + }); + return false; + case R.string.layer_underlay: + toggleUnderlayState(mapActivity, RasterMapType.UNDERLAY, new + OnMapSelectedCallback() { + @Override + public void onMapSelected() { + ContextMenuItem item = adapter.getItem(pos); + + String underlayMapDescr = settings.MAP_UNDERLAY.get(); + boolean hasUnderlayDescription = underlayMapDescr != null; + underlayMapDescr = hasUnderlayDescription ? underlayMapDescr + : mapActivity.getString(R.string.shared_string_none); + + item.setDescription(underlayMapDescr); + item.setSelected(hasUnderlayDescription); + item.setColorRes(hasUnderlayDescription ? R.color.osmand_orange : defaultColor); + + adapter.notifyDataSetChanged(); + } + }); + return false; + } + return true; + } }; String overlayMapDescr = settings.MAP_OVERLAY.get(); From c749bc145574d4bc9e81e5ebbc673938da2a4bfc Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Fri, 8 Apr 2016 18:48:48 +0300 Subject: [PATCH 65/67] Update to gradle plugin v2.0 --- OsmAnd/build.gradle | 24 ++++++++++++------------ build.gradle | 2 +- gradle.properties | 16 +++++++--------- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 4 files changed, 22 insertions(+), 24 deletions(-) diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index 615f4114b0..d8978c550e 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 23 - buildToolsVersion "23.0.1" + buildToolsVersion "23.0.2" signingConfigs { development { @@ -91,58 +91,58 @@ android { productFlavors { // ABI armv7 { - flavorDimension "abi" + dimension "abi" ndk { abiFilter "armeabi-v7a" } } armv5 { - flavorDimension "abi" + dimension "abi" ndk { abiFilter "armeabi" } } x86 { - flavorDimension "abi" + dimension "abi" ndk { abiFilter "x86" } } mips { - flavorDimension "abi" + dimension "abi" ndk { abiFilter "mips" } } fat { - flavorDimension "abi" + dimension "abi" } // Version freedev { - flavorDimension "version" + dimension "version" applicationId "net.osmand.dev" } free { - flavorDimension "version" + dimension "version" applicationId "net.osmand" } full { - flavorDimension "version" + dimension "version" applicationId "net.osmand.plus" } // CoreVersion legacy { - flavorDimension "coreversion" + dimension "coreversion" } qtcore { - flavorDimension "coreversion" + dimension "coreversion" } qtcoredebug { - flavorDimension "coreversion" + dimension "coreversion" } } diff --git a/build.gradle b/build.gradle index 63e64403d1..f88758a94b 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:1.1.3' + classpath 'com.android.tools.build:gradle:2.0.0' } } diff --git a/gradle.properties b/gradle.properties index 5d08ba75bb..dc093fcfdc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,18 +1,16 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Settings specified in this file will override any Gradle settings -# configured through the IDE. - +## Project-wide Gradle settings. +# # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html - +# # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - +# # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true \ No newline at end of file +# org.gradle.parallel=true +#Fri Apr 08 18:47:31 EEST 2016 +android.useDeprecatedNdk=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a3185c1ef8..b5d3423a5e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Sep 01 10:23:06 EEST 2014 +#Fri Apr 08 17:52:02 EEST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip From 19146b21eb3f11df2b98c8799e65c495b767dbb5 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Fri, 8 Apr 2016 19:07:12 +0300 Subject: [PATCH 66/67] Fix AND-451 3/4 --- .../osmand/plus/views/MapMarkersLayer.java | 49 +++++++++++-------- .../mapwidgets/MapMarkersWidgetsFactory.java | 4 ++ 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java b/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java index f7f7f21194..26b77d835c 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java @@ -21,6 +21,7 @@ import net.osmand.data.RotatedTileBox; import net.osmand.plus.MapMarkersHelper; import net.osmand.plus.MapMarkersHelper.MapMarker; import net.osmand.plus.OsmAndConstants; +import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.TargetPointsHelper.TargetPoint; import net.osmand.plus.activities.MapActivity; @@ -263,26 +264,34 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi } } - boolean show = useFingerLocation && map.getMyApplication().getSettings().SHOW_DESTINATION_ARROW.get(); - if (show && fingerLocation != null) { - List sortedMapMarkers = markersHelper.getSortedMapMarkers(); - int i = 0; - for (MapMarker marker : sortedMapMarkers) { - if (!isLocationVisible(tb, marker)) { - canvas.save(); - net.osmand.Location.distanceBetween(fingerLocation.getLatitude(), fingerLocation.getLongitude(), - marker.getLatitude(), marker.getLongitude(), calculations); - float bearing = calculations[1] - 90; - float radiusBearing = DIST_TO_SHOW * tb.getDensity(); - final QuadPoint cp = tb.getCenterPixelPoint(); - canvas.rotate(bearing, cp.x, cp.y); - canvas.translate(-24 * tb.getDensity() + radiusBearing, -22 * tb.getDensity()); - canvas.drawBitmap(arrowToDestination, cp.x, cp.y, getMarkerDestPaint(marker.colorIndex)); - canvas.restore(); - } - i++; - if (i > 1) { - break; + boolean show = useFingerLocation || + (map.getMyApplication().getSettings().MAP_MARKERS_MODE.get() == OsmandSettings.MapMarkersMode.WIDGETS + && map.getMyApplication().getSettings().SHOW_DESTINATION_ARROW.get()); + if (show) { + LatLon loc = fingerLocation; + if (!useFingerLocation) { + loc = tb.getCenterLatLon(); + } + if (loc != null) { + List sortedMapMarkers = markersHelper.getSortedMapMarkers(); + int i = 0; + for (MapMarker marker : sortedMapMarkers) { + if (!isLocationVisible(tb, marker)) { + canvas.save(); + net.osmand.Location.distanceBetween(loc.getLatitude(), loc.getLongitude(), + marker.getLatitude(), marker.getLongitude(), calculations); + float bearing = calculations[1] - 90; + float radiusBearing = DIST_TO_SHOW * tb.getDensity(); + final QuadPoint cp = tb.getCenterPixelPoint(); + canvas.rotate(bearing, cp.x, cp.y); + canvas.translate(-24 * tb.getDensity() + radiusBearing, -22 * tb.getDensity()); + canvas.drawBitmap(arrowToDestination, cp.x, cp.y, getMarkerDestPaint(marker.colorIndex)); + canvas.restore(); + } + i++; + if (i > 1) { + break; + } } } } diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java index 1e6ffc60a2..5f919cf716 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java @@ -234,6 +234,10 @@ public class MapMarkersWidgetsFactory { Location.distanceBetween(marker.getLatitude(), marker.getLongitude(), loc.getLatitude(), loc.getLongitude(), mes); } + if (customLocation) { + heading = 0f; + } + boolean newImage = false; DirectionDrawable dd; if (!(arrowImg.getDrawable() instanceof DirectionDrawable)) { From 62f546c3f9d5c64334ed18ca192cfd9ddd77fb11 Mon Sep 17 00:00:00 2001 From: Ajeje Brazorf Date: Fri, 8 Apr 2016 19:29:55 +0200 Subject: [PATCH 67/67] Translated using Weblate (Sardinian) Currently translated at 100.0% (1951 of 1951 strings) --- OsmAnd/res/values-sc/strings.xml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index 7083d4ec4a..ba25650573 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -446,14 +446,14 @@ Inghitza sa registratzione GPX Firma sa registratzione GPX Inghitza unu segmentu nou - Cua sos edifìtzios - Cua sas istradas non carrabiles - Cua su testu - Cua padentes e buschedos + Edifìtzios + Istradas non carràbiles + Testu + Padentes e buschedos Edifìtzios dae su zoom 15 Prus minujas (a sa minuda) Minujas de mancu - Cua sas restritziones de atzessu + Restritziones de atzessu Ammustra sas restritziones de atzessu Ammustra sa calidade de sas istradas Ammustra su tipu de superfìtzie de sas istradas @@ -1746,7 +1746,7 @@ Istradas a cuntrastu artu Memòria multi-impreadore Memòria de sas mapas - Cua sos nùmeros de sas domos + Nùmeros de sas domos Lìmite de artària Dislinda s’artària de su veìculu permitida pro sas istradas Non rugrare sas fronteras intre sos istados @@ -1975,7 +1975,7 @@ Agiorna Leghe àteru Ite b\'est de nou in - Cua sos ogetos propostos + Ogetos propostos Bassu-tedescu Matzèdone Frisonu otzidentale @@ -2077,7 +2077,7 @@ Intervallu de registratzione Imprea un’intervallu de registratzione Furria puntos de incumintzu e destinatzione - Cua sas iconas de sos PDI + Iconas de sos PDI Nùmeru de cuntribuidores Nùmeru de modìficas Sinnala pro @@ -2087,7 +2087,7 @@ Annanghe intervallu de tempus Àndala blocada Ischerta - Cua ogetos suta de terra + Ogetos suta de terra Leghe àteru Agata unu parchègiu Istadu @@ -2164,4 +2164,6 @@ Fine Mesanu Grussu + Modalidade mapa + %s documentos GPX ischertados