From b9bdd3f36f8c8397ea39f136421e915290514593 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Fri, 1 Jan 2016 21:08:16 +0100 Subject: [PATCH 01/91] Translated using Weblate (Danish) Currently translated at 100.0% (1872 of 1872 strings) --- OsmAnd/res/values-da/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 83235841b9..e1e9126192 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -1,4 +1,5 @@ - + + Overvej at købe Højdekurve udvidelsen (\'Contour lines\') på Google Play for at støtte den videre udvikling. Optag video Optag audio @@ -2218,4 +2219,5 @@ Aften Ikke markeret - \ No newline at end of file +Vælg måned og land + From 4ef6fa38bea24040fa461a00daed5f9011f3e3a0 Mon Sep 17 00:00:00 2001 From: Adriano Rosa Date: Mon, 4 Jan 2016 13:09:11 +0100 Subject: [PATCH 02/91] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1872 of 1872 strings) --- OsmAnd/res/values-pt-rBR/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index ff40b5b7fd..e43770afb9 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -1,4 +1,5 @@ -Meus locais + +Meus locais dias atrás Ver Pista de preparação @@ -1984,4 +1985,5 @@ Pela manhã À noite Nada selecionado - \ No newline at end of file + Selecione o mês e o país + From 107bb9fa77a8850f31d782332c5755a659fadd9e Mon Sep 17 00:00:00 2001 From: Kees-Jan Timmer Date: Tue, 5 Jan 2016 23:21:43 +0100 Subject: [PATCH 03/91] Translated using Weblate (Dutch) Currently translated at 100.0% (1872 of 1872 strings) --- OsmAnd/res/values-nl/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml index 05d8ab4bc4..d645bcbb79 100644 --- a/OsmAnd/res/values-nl/strings.xml +++ b/OsmAnd/res/values-nl/strings.xml @@ -1,4 +1,5 @@ - + + Configureer scherm Toon rijstroken @@ -2156,4 +2157,5 @@ \'s avonds Niet geselecteerd - \ No newline at end of file +Kies maand en kaart + From cb5d1f332c7dc22bf5fd6c9fd64d659db5f2dd14 Mon Sep 17 00:00:00 2001 From: Franco Date: Thu, 7 Jan 2016 01:33:19 +0100 Subject: [PATCH 04/91] Translated using Weblate (Argentinean Spanish) Currently translated at 100.0% (1872 of 1872 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index 0854779ad3..58a4073272 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -1,4 +1,5 @@ - + + Ocultar números de casa Falló al copiar archivos @@ -2032,10 +2033,11 @@ Actualizaciones: %s Último cambio de mapa: %s Cada hora - Diariamente - Semanalmente + Diario + Semanal Mañana Noche No seleccionado - \ No newline at end of file +Elige mes y país + From a90e4cd7ab93cbf8760961e684e0a0e20a5ec1f7 Mon Sep 17 00:00:00 2001 From: Roberto GEB Date: Sun, 3 Jan 2016 12:15:10 +0100 Subject: [PATCH 05/91] Translated using Weblate (Spanish) Currently translated at 100.0% (1872 of 1872 strings) --- OsmAnd/res/values-es/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index 74470c2da1..bb5c3ef20c 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -1,4 +1,5 @@ - + + Configurar pantalla Mostrar carriles @@ -2037,4 +2038,5 @@ Por la noche No seleccionado - \ No newline at end of file +Seleccione mes y país + From b516829e271c9454e373bd4da1b7c85f1ffe5bef Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Fri, 1 Jan 2016 15:56:48 +0100 Subject: [PATCH 06/91] Translated using Weblate (Chinese (Taiwan)) Currently translated at 100.0% (1872 of 1872 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index cd7e745968..c32cbe4b63 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -1,4 +1,5 @@ - + + 選擇道路的色彩調配: 道路的色彩調配 顯示目的地方向 @@ -2064,4 +2065,5 @@ 夜間 未選取 - \ No newline at end of file +選擇月份與國家 + From d663893672f3c149e82faf72fd0f68abfcc7643a Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 2 Jan 2016 00:13:32 +0100 Subject: [PATCH 07/91] Translated using Weblate (German) Currently translated at 100.0% (1872 of 1872 strings) --- OsmAnd/res/values-de/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 1ae9e3887e..39243e4942 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -1,4 +1,5 @@ - + + Keine Adresse bekannt Nähe Regionen @@ -1991,4 +1992,5 @@ Nachts Nicht ausgewählt - \ No newline at end of file +Wähle Monat und Land + From eeb523c497e8034523d79793e11f5b548e95061a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nesim=20=C4=B0=C5=9E?= Date: Sat, 2 Jan 2016 09:40:19 +0100 Subject: [PATCH 08/91] Translated using Weblate (Turkish) Currently translated at 100.0% (1872 of 1872 strings) --- OsmAnd/res/values-tr/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index 55b48aae3e..3a0edd8b33 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -1,4 +1,5 @@ -Değişiklik listesini kapat + +Değişiklik listesini kapat ZXing Barcode Scanner uygulaması kurulu değil. Uygulama marketinde aramak ister misiniz? Yol renk şemasını seç: Yol renk şeması @@ -2024,4 +2025,5 @@ Gece Güncelleme boyutu - \ No newline at end of file + Ayı ve ülke seçin + From 2d335030be4368631faf07c08cd3bb825cfc118d Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Fri, 8 Jan 2016 20:55:33 +0300 Subject: [PATCH 09/91] Waypoint UI in progress --- OsmAnd/res/layout-land/dashboard_over_map.xml | 4 +- OsmAnd/res/layout-land/plan_route_info.xml | 93 ++- OsmAnd/res/layout/dashboard_over_map.xml | 4 +- OsmAnd/res/layout/drawer_list_radius.xml | 11 +- OsmAnd/res/layout/drawer_list_radius_ex.xml | 70 ++ OsmAnd/res/layout/plan_route_info.xml | 90 ++- OsmAnd/res/layout/waypoint_header.xml | 12 +- OsmAnd/res/layout/waypoint_reached.xml | 98 ++- .../osmand/plus/CurrentPositionHelper.java | 9 +- .../net/osmand/plus/TargetPointsHelper.java | 17 +- .../plus/dashboard/DashWaypointsFragment.java | 18 +- .../osmand/plus/dashboard/DashboardOnMap.java | 118 ++- .../plus/helpers/AvoidSpecificRoads.java | 2 +- .../plus/helpers/WaypointDialogHelper.java | 287 +++++--- .../osmand/plus/helpers/WaypointHelper.java | 247 ++++--- .../mapcontextmenu/MenuTitleController.java | 2 +- .../other/MapRouteInfoMenu.java | 19 +- .../osmand/plus/routing/RoutingHelper.java | 12 +- .../osmand/plus/views/MapControlsLayer.java | 4 +- .../plus/views/controls/DynamicListView.java | 689 ++++++++++++++++++ .../controls/DynamicListViewCallbacks.java | 9 + .../views/controls/StableArrayAdapter.java | 66 ++ .../mapwidgets/MapInfoWidgetsFactory.java | 2 +- 23 files changed, 1476 insertions(+), 407 deletions(-) create mode 100644 OsmAnd/res/layout/drawer_list_radius_ex.xml create mode 100644 OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java create mode 100644 OsmAnd/src/net/osmand/plus/views/controls/DynamicListViewCallbacks.java create mode 100644 OsmAnd/src/net/osmand/plus/views/controls/StableArrayAdapter.java diff --git a/OsmAnd/res/layout-land/dashboard_over_map.xml b/OsmAnd/res/layout-land/dashboard_over_map.xml index 70210ec79f..e708d73936 100644 --- a/OsmAnd/res/layout-land/dashboard_over_map.xml +++ b/OsmAnd/res/layout-land/dashboard_over_map.xml @@ -52,13 +52,13 @@ android:layout_gravity="start" android:visibility="gone" > - - + diff --git a/OsmAnd/res/layout-land/plan_route_info.xml b/OsmAnd/res/layout-land/plan_route_info.xml index 83c6f731de..7178474631 100644 --- a/OsmAnd/res/layout-land/plan_route_info.xml +++ b/OsmAnd/res/layout-land/plan_route_info.xml @@ -1,10 +1,11 @@ - + - - - + + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:gravity="left" + android:orientation="horizontal"/> - + - - - - + - + + + @@ -309,9 +304,9 @@ android:id="@+id/DurationIcon" android:layout_width="@dimen/standard_icon_size" android:layout_height="match_parent" + android:layout_gravity="center_vertical" android:layout_marginLeft="@dimen/list_content_padding" android:layout_marginRight="@dimen/list_content_padding" - android:layout_gravity="center_vertical" android:contentDescription="@string/info_button" android:scaleType="center" android:src="@drawable/ic_action_time"/> @@ -350,8 +345,8 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_gravity="center_vertical|left" - android:layout_weight="1" android:layout_margin="8dp" + android:layout_weight="1" android:textSize="@dimen/default_desc_text_size"/> - - + diff --git a/OsmAnd/res/layout/drawer_list_radius.xml b/OsmAnd/res/layout/drawer_list_radius.xml index fa6ab1029a..6865055b2a 100644 --- a/OsmAnd/res/layout/drawer_list_radius.xml +++ b/OsmAnd/res/layout/drawer_list_radius.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" - android:minHeight="40dp" + android:minHeight="48dp" android:layout_marginBottom="5dp"> + android:textSize="@dimen/default_desc_text_size" /> + android:layout_marginRight="16dp" /> \ No newline at end of file diff --git a/OsmAnd/res/layout/drawer_list_radius_ex.xml b/OsmAnd/res/layout/drawer_list_radius_ex.xml new file mode 100644 index 0000000000..30c7db3cf4 --- /dev/null +++ b/OsmAnd/res/layout/drawer_list_radius_ex.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/plan_route_info.xml b/OsmAnd/res/layout/plan_route_info.xml index e37ff45705..25cb993d91 100644 --- a/OsmAnd/res/layout/plan_route_info.xml +++ b/OsmAnd/res/layout/plan_route_info.xml @@ -1,10 +1,11 @@ - + - - - + + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:gravity="left" + android:orientation="horizontal"/> - + - - - - + - + + @@ -309,9 +303,9 @@ android:id="@+id/DurationIcon" android:layout_width="@dimen/standard_icon_size" android:layout_height="match_parent" + android:layout_gravity="center_vertical" android:layout_marginLeft="@dimen/list_content_padding" android:layout_marginRight="@dimen/list_content_padding" - android:layout_gravity="center_vertical" android:contentDescription="@string/info_button" android:scaleType="center" android:src="@drawable/ic_action_time"/> diff --git a/OsmAnd/res/layout/waypoint_header.xml b/OsmAnd/res/layout/waypoint_header.xml index e2aba55779..40ff101a1a 100644 --- a/OsmAnd/res/layout/waypoint_header.xml +++ b/OsmAnd/res/layout/waypoint_header.xml @@ -1,13 +1,14 @@ - + style="@style/DashboardSubHeader" + osmand:typeface="@string/font_roboto_medium"/> diff --git a/OsmAnd/res/layout/waypoint_reached.xml b/OsmAnd/res/layout/waypoint_reached.xml index f506deb976..50a4772d9e 100644 --- a/OsmAnd/res/layout/waypoint_reached.xml +++ b/OsmAnd/res/layout/waypoint_reached.xml @@ -3,63 +3,103 @@ - - - + android:gravity="center" + android:layout_gravity="center_vertical" + android:orientation="vertical"> + + + + + + + + + + + + + + android:src="@drawable/map_overflow_menu_white" /> + android:scaleType="center" + android:src="@drawable/ic_action_remove_dark" /> + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java b/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java index 616ad7341d..1da82e05b3 100644 --- a/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java +++ b/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java @@ -83,8 +83,13 @@ public class CurrentPositionHelper { } } }; - if (!app.getRoutingHelper().startTaskInRouteThreadIfPossible(run) && result != null) { - result.publish(null); + if (!app.getRoutingHelper().startTaskInRouteThreadIfPossible(run)) { + if (result != null) { + result.publish(null); + } + if (geoCoding != null) { + geoCoding.publish(null); + } } } } diff --git a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java index 287f72ed32..8934657591 100644 --- a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java +++ b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java @@ -29,7 +29,8 @@ public class TargetPointsHelper { private PointDescription pointDescription; public int index; public boolean intermediate; - + public boolean start; + public TargetPoint(LatLon point, PointDescription name) { this.point = point; this.pointDescription = name; @@ -66,7 +67,15 @@ public class TargetPointsHelper { } return null; } - + + public static TargetPoint createStartPoint(LatLon point, PointDescription name) { + if (point != null) { + TargetPoint target = new TargetPoint(point, name); + target.start = true; + return target; + } + return null; + } public double getLatitude() { return point.getLatitude(); @@ -97,7 +106,7 @@ public class TargetPointsHelper { private void readFromSettings(OsmandSettings settings) { pointToNavigate = TargetPoint.create(settings.getPointToNavigate(), settings.getPointNavigateDescription()); - pointToStart = TargetPoint.create(settings.getPointToStart(), settings.getStartPointDescription()); + pointToStart = TargetPoint.createStartPoint(settings.getPointToStart(), settings.getStartPointDescription()); intermediatePoints.clear(); List ips = settings.getIntermediatePoints(); List desc = settings.getIntermediatePointDescriptions(ips.size()); @@ -285,7 +294,7 @@ public class TargetPointsHelper { } - public void reorderAllTargetPoints(List point, boolean updateRoute){ + public void reorderAllTargetPoints(List point, boolean updateRoute) { settings.clearPointToNavigate(); if (point.size() > 0) { List subList = point.subList(0, point.size() - 1); diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java index 0d9ad80bf0..0d5a723f89 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java @@ -96,7 +96,7 @@ public class DashWaypointsFragment extends DashLocationFragment { View dv = getActivity().getLayoutInflater().inflate(R.layout.divider, null); favorites.addView(dv); View v = WaypointDialogHelper.updateWaypointItemView(false, null, getMyApplication(), - getActivity(), null, ps, null, !getMyApplication().getSettings().isLightContent()); + getActivity(), null, ps, null, !getMyApplication().getSettings().isLightContent(), true); favorites.addView(v); } @@ -142,7 +142,21 @@ public class DashWaypointsFragment extends DashLocationFragment { view.findViewById(R.id.group_image).setVisibility(View.GONE); boolean target = helper.getPointToNavigate() == point; - int id = target ? R.drawable.list_destination : R.drawable.list_intermediate; + int id; + if (!target) { + if (getMyApplication().getSettings().isLightContent()) { + id = R.drawable.widget_intermediate_day; + } else { + id = R.drawable.widget_intermediate_night; + } + } else { + if (getMyApplication().getSettings().isLightContent()) { + id = R.drawable.widget_target_day; + } else { + id = R.drawable.widget_target_night; + } + } + ((ImageView) view.findViewById(R.id.favourite_icon)).setImageDrawable(getMyApplication().getIconsCache() .getIcon(id, 0)); DashLocationView dv = new DashLocationView(direction, label, new LatLon(point.getLatitude(), diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 5275136351..deccbaafbd 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -35,6 +35,7 @@ import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCal import com.github.ksoichiro.android.observablescrollview.ScrollState; import net.osmand.PlatformUtil; +import net.osmand.ValueHolder; import net.osmand.data.LatLon; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick; @@ -44,7 +45,7 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; -import net.osmand.plus.activities.IntermediatePointsDialog; +import net.osmand.plus.TargetPointsHelper.TargetPoint; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.dashboard.tools.DashFragmentData; import net.osmand.plus.dashboard.tools.DashboardSettingsDialogFragment; @@ -57,8 +58,12 @@ import net.osmand.plus.helpers.WaypointHelper.LocationPointWrapper; import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu; import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu.LocalRoutingParameter; import net.osmand.plus.routing.RoutingHelper; +import net.osmand.plus.routing.RoutingHelper.IRouteInformationListener; import net.osmand.plus.views.DownloadedRegionsLayer; import net.osmand.plus.views.OsmandMapTileView; +import net.osmand.plus.views.controls.DynamicListView; +import net.osmand.plus.views.controls.DynamicListViewCallbacks; +import net.osmand.plus.views.controls.StableArrayAdapter; import java.lang.ref.WeakReference; import java.util.ArrayList; @@ -72,7 +77,7 @@ import static android.util.TypedValue.COMPLEX_UNIT_DIP; /** */ -public class DashboardOnMap implements ObservableScrollViewCallbacks { +public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicListViewCallbacks, IRouteInformationListener { private static final org.apache.commons.logging.Log LOG = PlatformUtil.getLog(DashboardOnMap.class); private static final String TAG = "DashboardOnMap"; @@ -182,6 +187,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { toolbar = ((Toolbar) dashboardView.findViewById(R.id.toolbar)); ObservableScrollView scrollView = ((ObservableScrollView) dashboardView.findViewById(R.id.main_scroll)); listView = (ListView) dashboardView.findViewById(R.id.dash_list_view); + listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE); + ((DynamicListView) listView).setDynamicListViewCallbacks(this); gradientToolbar = mapActivity.getResources().getDrawable(R.drawable.gradient_toolbar).mutate(); if (AndroidUiHelper.isOrientationPortrait(mapActivity)) { this.portrait = true; @@ -211,7 +218,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { FrameLayout.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM)); shadow.setScaleType(ScaleType.FIT_XY); shadowContainer.addView(shadow); - ((FrameLayout)paddingView).addView(shadowContainer); + ((FrameLayout) paddingView).addView(shadowContainer); listView.addHeaderView(paddingView); listBackgroundView = mapActivity.findViewById(R.id.dash_list_background); } @@ -248,8 +255,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { TextView tv = (TextView) dashboardView.findViewById(R.id.toolbar_text); tv.setText(""); boolean waypointsVisible = visibleType == DashboardType.WAYPOINTS || visibleType == DashboardType.WAYPOINTS_FLAT; - boolean waypointsEdit = visibleType == DashboardType.WAYPOINTS_EDIT; - if (waypointsVisible || waypointsEdit) { + if (waypointsVisible) { tv.setText(R.string.waypoints); } else if (visibleType == DashboardType.CONFIGURE_MAP) { tv.setText(R.string.configure_map); @@ -283,25 +289,6 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { }); if (waypointsVisible && getMyApplication().getWaypointHelper().getAllPoints().size() > 0) { - if (mapActivity.getMyApplication().getTargetPointsHelper().getIntermediatePoints().size() > 0) { - sort.setVisibility(View.VISIBLE); - sort.setOnClickListener(new View.OnClickListener() { - - @Override - public void onClick(View v) { - hideDashboard(); - IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity, getMyApplication(), true); - } - }); - } - edit.setVisibility(View.VISIBLE); - edit.setOnClickListener(new View.OnClickListener() { - - @Override - public void onClick(View v) { - setDashboardVisibility(true, DashboardType.WAYPOINTS_EDIT); - } - }); if (getMyApplication().getWaypointHelper().isRouteCalculated()) { flat.setVisibility(View.VISIBLE); final boolean flatNow = visibleType == DashboardType.WAYPOINTS_FLAT; @@ -317,17 +304,17 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { }); } } - if (waypointsEdit) { - ok.setVisibility(View.VISIBLE); - ok.setOnClickListener(new View.OnClickListener() { - - @Override - public void onClick(View v) { - mapActivity.getMyApplication().getWaypointHelper().removeVisibleLocationPoint(deletedPoints); - hideDashboard(); - } - }); - } +// if (waypointsEdit) { +// ok.setVisibility(View.VISIBLE); +// ok.setOnClickListener(new View.OnClickListener() { +// +// @Override +// public void onClick(View v) { + mapActivity.getMyApplication().getWaypointHelper().removeVisibleLocationPoint(deletedPoints); +// hideDashboard(); +// } +// }); +// } if (visibleType == DashboardType.DASHBOARD || visibleType == DashboardType.LIST_MENU) { settingsButton.setVisibility(View.VISIBLE); settingsButton.setOnClickListener(new View.OnClickListener() { @@ -552,7 +539,9 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { open(dashboardView.findViewById(R.id.animateContent), animation); updateLocation(true, true, false); // addOrUpdateDashboardFragments(); + mapActivity.getRoutingHelper().addListener(this); } else { + mapActivity.getRoutingHelper().removeListener(this); mapActivity.getMapViewTrackingUtilities().setDashboard(null); hide(dashboardView.findViewById(R.id.animateContent), animation); mapActivity.findViewById(R.id.MapHudButtonsOverlay).setVisibility(View.VISIBLE); @@ -607,10 +596,15 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { private void updateListAdapter() { ContextMenuAdapter cm = null; if (DashboardType.WAYPOINTS == visibleType || DashboardType.WAYPOINTS_FLAT == visibleType) { - ArrayAdapter listAdapter = waypointDialogHelper.getWaypointsDrawerAdapter(false, deletedPoints, mapActivity, running, + StableArrayAdapter listAdapter = waypointDialogHelper.getWaypointsDrawerAdapter(true, deletedPoints, mapActivity, running, DashboardType.WAYPOINTS_FLAT == visibleType, nightMode); OnItemClickListener listener = waypointDialogHelper.getDrawerItemClickListener(mapActivity, running, listAdapter); + + DynamicListView dynamicListView = (DynamicListView) listView; + dynamicListView.setItemsList(listAdapter.getObjects()); + dynamicListView.setActiveItemsList(listAdapter.getActiveObjects()); + updateListAdapter(listAdapter, listener); } else if (DashboardType.WAYPOINTS_EDIT == visibleType) { deletedPoints.clear(); @@ -643,7 +637,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { boolean nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls(); if (this.nightMode != nightMode) { this.nightMode = nightMode; - applyDayNightMode(); + applyDayNightMode(); } final ArrayAdapter listAdapter = cm.createListAdapter(mapActivity, !nightMode); OnItemClickListener listener = getOptionsMenuOnClickListener(cm, listAdapter); @@ -1087,4 +1081,54 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { return settings.registerBooleanPreference(SHOULD_SHOW + tag, true).makeGlobal().get(); } } + + @Override + public void onItemsSwapped(final List items) { + getMyApplication().runInUIThread(new Runnable() { + @Override + public void run() { + if (visibleType == DashboardType.WAYPOINTS) { + List allTargets = new ArrayList<>(); + if (items != null) { + for (Object obj : items) { + if (obj instanceof LocationPointWrapper) { + LocationPointWrapper p = (LocationPointWrapper) obj; + if (p.getPoint() instanceof TargetPoint) { + TargetPoint t = (TargetPoint) p.getPoint(); + if (!t.start) { + t.intermediate = true; + allTargets.add(t); + } + } + } + } + if (allTargets.size() > 0) { + allTargets.get(allTargets.size() - 1).intermediate = false; + } + } + getMyApplication().getTargetPointsHelper().reorderAllTargetPoints(allTargets, false); + newRouteIsCalculated(false, null); + getMyApplication().getTargetPointsHelper().updateRouteAndReferesh(true); + } + } + }, 50); + } + + @Override + public void newRouteIsCalculated(boolean newRoute, ValueHolder showToast) { + if ((DashboardType.WAYPOINTS == visibleType || DashboardType.WAYPOINTS_FLAT == visibleType) + && listAdapter != null && listAdapter instanceof StableArrayAdapter) { + StableArrayAdapter stableAdapter = (StableArrayAdapter) listAdapter; + waypointDialogHelper.reloadListAdapter(stableAdapter); + if (listView instanceof DynamicListView) { + DynamicListView dynamicListView = (DynamicListView) listView; + dynamicListView.setItemsList(stableAdapter.getObjects()); + dynamicListView.setActiveItemsList(stableAdapter.getActiveObjects()); + } + } + } + + @Override + public void routeWasCancelled() { + } } diff --git a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java index 98592988bf..70fb81fa05 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java +++ b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java @@ -74,7 +74,7 @@ public class AvoidSpecificRoads { ImageButton remove = (ImageButton) v.findViewById(R.id.info_close); remove.setVisibility(View.VISIBLE); remove.setImageDrawable(app.getIconsCache().getContentIcon( - R.drawable.ic_action_gremove_dark)); + R.drawable.ic_action_remove_dark)); remove.setOnClickListener(new View.OnClickListener() { @Override diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java index 3d209ecd47..4010171122 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointDialogHelper.java @@ -4,8 +4,6 @@ import android.app.Activity; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.DialogInterface.OnDismissListener; -import android.graphics.drawable.ColorDrawable; -import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.support.v4.app.FragmentActivity; import android.support.v7.app.AlertDialog; @@ -19,18 +17,20 @@ import android.widget.ImageView; import android.widget.TextView; import net.osmand.AndroidUtils; +import net.osmand.Location; +import net.osmand.data.FavouritePoint; import net.osmand.data.LatLon; import net.osmand.data.LocationPoint; import net.osmand.data.PointDescription; -import net.osmand.data.RotatedTileBox; -import net.osmand.plus.IconsCache; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; +import net.osmand.plus.TargetPointsHelper.TargetPoint; +import net.osmand.plus.activities.IntermediatePointsDialog; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.helpers.WaypointHelper.LocationPointWrapper; import net.osmand.plus.poi.PoiUIFilter; -import net.osmand.plus.views.AnimateDraggingMapThread; +import net.osmand.plus.views.controls.StableArrayAdapter; import net.osmand.util.Algorithms; import net.osmand.util.MapUtils; @@ -62,39 +62,74 @@ public class WaypointDialogHelper { public static void updatePointInfoView(final OsmandApplication app, final Activity activity, View localView, final LocationPointWrapper ps, - final boolean mapCenter, final boolean nightMode) { + final boolean mapCenter, final boolean nightMode, + final boolean edit) { WaypointHelper wh = app.getWaypointHelper(); final LocationPoint point = ps.getPoint(); TextView text = (TextView) localView.findViewById(R.id.waypoint_text); AndroidUtils.setTextPrimaryColor(activity, text, nightMode); TextView textShadow = (TextView) localView.findViewById(R.id.waypoint_text_shadow); - localView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - showOnMap(app, activity, point, mapCenter); - } - }); - TextView textDist = (TextView) localView.findViewById(R.id.waypoint_dist); - ((ImageView) localView.findViewById(R.id.waypoint_icon)).setImageDrawable(ps.getDrawable(activity, app)); - int dist = -1; - if (!wh.isRouteCalculated()) { - if (activity instanceof MapActivity) { - dist = (int) MapUtils.getDistance(((MapActivity) activity).getMapView().getLatitude(), ((MapActivity) activity) - .getMapView().getLongitude(), point.getLatitude(), point.getLongitude()); - } - } else { - dist = wh.getRouteDistance(ps); + if (!edit) { + localView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + showOnMap(app, activity, point, mapCenter); + } + }); } + TextView textDist = (TextView) localView.findViewById(R.id.waypoint_dist); + ((ImageView) localView.findViewById(R.id.waypoint_icon)).setImageDrawable(ps.getDrawable(activity, app, nightMode)); + int dist = -1; + boolean startPoint = ps.type == WaypointHelper.TARGETS && ((TargetPoint) ps.point).start; + if (!startPoint) { + if (!wh.isRouteCalculated()) { + if (activity instanceof MapActivity) { + dist = (int) MapUtils.getDistance(((MapActivity) activity).getMapView().getLatitude(), ((MapActivity) activity) + .getMapView().getLongitude(), point.getLatitude(), point.getLongitude()); + } + } else { + dist = wh.getRouteDistance(ps); + } + } + + String pointDescription = ""; + TextView descText = (TextView) localView.findViewById(R.id.waypoint_desc_text); + if (descText != null) { + AndroidUtils.setTextSecondaryColor(activity, descText, nightMode); + switch (ps.type) { + case WaypointHelper.TARGETS: + TargetPoint targetPoint = (TargetPoint) ps.point; + if (targetPoint.start) { + pointDescription = activity.getResources().getString(R.string.starting_point); + } else { + pointDescription = targetPoint.getPointDescription(activity).getTypeName(); + } + break; + + case WaypointHelper.FAVORITES: + FavouritePoint favPoint = (FavouritePoint) ps.point; + pointDescription = favPoint.getCategory(); + break; + } + } + if (dist > 0) { String dd = OsmAndFormatter.getFormattedDistance(dist, app); if (ps.deviationDistance > 0) { - dd += "\n+" + OsmAndFormatter.getFormattedDistance(ps.deviationDistance, app); + dd += " +" + OsmAndFormatter.getFormattedDistance(ps.deviationDistance, app); } textDist.setText(dd); + if (!Algorithms.isEmpty(pointDescription)) { + pointDescription = " • " + pointDescription; + } } else { textDist.setText(""); } + if (descText != null) { + descText.setText(pointDescription); + } + String descr; PointDescription pd = point.getPointDescription(app); if (Algorithms.isEmpty(pd.getName())) { @@ -113,18 +148,33 @@ public class WaypointDialogHelper { // 0); } + private List getActivePoints(List points) { + List activePoints = new ArrayList<>(); + for (Object p : points) { + if (p instanceof LocationPointWrapper) { + LocationPointWrapper w = (LocationPointWrapper) p; + if (w.type == WaypointHelper.TARGETS && !((TargetPoint) w.point).start) { + activePoints.add(p); + } + } + } + return activePoints; + } - public ArrayAdapter getWaypointsDrawerAdapter( + public StableArrayAdapter getWaypointsDrawerAdapter( final boolean edit, final List deletedPoints, final MapActivity ctx, final int[] running, final boolean flat, final boolean nightMode) { + final List points; if (flat) { points = new ArrayList(waypointHelper.getAllPoints()); } else { points = getPoints(); } - return new ArrayAdapter(ctx, - R.layout.waypoint_reached, R.id.title, points) { + List activePoints = getActivePoints(points); + + return new StableArrayAdapter(ctx, + R.layout.waypoint_reached, R.id.title, points, activePoints) { @Override public View getView(final int position, View convertView, ViewGroup parent) { @@ -139,56 +189,76 @@ public class WaypointDialogHelper { final int type = ((RadiusItem) obj).type; v = createItemForRadiusProximity(ctx, type, running, position, thisAdapter, nightMode); //Drawable d = new ColorDrawable(mapActivity.getResources().getColor(R.color.dashboard_divider_light)); - if (nightMode) { - v.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_dark)); - } else { - v.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_light)); - } + AndroidUtils.setListItemBackground(mapActivity, v, nightMode); } else if (labelView) { v = createItemForCategory(ctx, (Integer) obj, running, position, thisAdapter, nightMode); - if (nightMode) { - v.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_dark)); - } else { - v.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_light)); - } + AndroidUtils.setListItemBackground(mapActivity, v, nightMode); } else if (topDividerView) { v = ctx.getLayoutInflater().inflate(R.layout.card_top_divider, null); } else if (bottomDividerView) { v = ctx.getLayoutInflater().inflate(R.layout.card_bottom_divider, null); } else if (obj instanceof LocationPointWrapper) { LocationPointWrapper point = (LocationPointWrapper) obj; - v = updateWaypointItemView(edit, deletedPoints, app, ctx, v, point, this, nightMode); - if (nightMode) { - v.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_dark)); - } else { - v.setBackgroundColor(mapActivity.getResources().getColor(R.color.bg_color_light)); - } + v = updateWaypointItemView(edit, deletedPoints, app, ctx, v, point, this, + nightMode, flat); + AndroidUtils.setListItemBackground(mapActivity, v, nightMode); } return v; } - - }; } public static View updateWaypointItemView(final boolean edit, final List deletedPoints, - final OsmandApplication app, final Activity ctx, View v, final LocationPointWrapper point, - final ArrayAdapter adapter, final boolean nightMode) { + final OsmandApplication app, final Activity ctx, View v, + final LocationPointWrapper point, + final ArrayAdapter adapter, final boolean nightMode, + final boolean flat) { if (v == null || v.findViewById(R.id.info_close) == null) { v = ctx.getLayoutInflater().inflate(R.layout.waypoint_reached, null); } - updatePointInfoView(app, ctx, v, point, true, nightMode); + updatePointInfoView(app, ctx, v, point, true, nightMode, edit); + View more = v.findViewById(R.id.all_points); + View move = v.findViewById(R.id.info_move); View remove = v.findViewById(R.id.info_close); if (!edit) { remove.setVisibility(View.GONE); + move.setVisibility(View.GONE); + more.setVisibility(View.GONE); + } else if (point.type == WaypointHelper.TARGETS && !flat) { + if (((TargetPoint) point.point).start) { + remove.setVisibility(View.GONE); + move.setVisibility(View.GONE); + more.setVisibility(View.VISIBLE); + ((ImageButton) more).setImageDrawable(app.getIconsCache().getContentIcon( + R.drawable.map_overflow_menu_white, !nightMode)); + more.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + //hideDashboard(); + IntermediatePointsDialog.openIntermediatePointsDialog(ctx, app, true); + } + }); + } else { + remove.setVisibility(View.GONE); + move.setVisibility(View.VISIBLE); + more.setVisibility(View.GONE); + ((ImageView) move).setImageDrawable(app.getIconsCache().getContentIcon( + R.drawable.ic_flat_list_dark, !nightMode)); + } } else { remove.setVisibility(View.VISIBLE); + move.setVisibility(View.GONE); + more.setVisibility(View.GONE); ((ImageButton) remove).setImageDrawable(app.getIconsCache().getContentIcon( - R.drawable.ic_action_gremove_dark, !nightMode)); + R.drawable.ic_action_remove_dark, !nightMode)); remove.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { + ArrayList arr = new ArrayList<>(); + arr.add(point); + app.getWaypointHelper().removeVisibleLocationPoint(arr); + deletedPoints.add(point); if (adapter != null) { adapter.remove(point); @@ -204,11 +274,38 @@ public class WaypointDialogHelper { protected View createItemForRadiusProximity(final FragmentActivity ctx, final int type, final int[] running, final int position, final ArrayAdapter thisAdapter, boolean nightMode) { View v; - IconsCache iconsCache = app.getIconsCache(); - v = ctx.getLayoutInflater().inflate(R.layout.drawer_list_radius, null); + if (type == WaypointHelper.POI) { + v = ctx.getLayoutInflater().inflate(R.layout.drawer_list_radius_ex, null); + AndroidUtils.setTextPrimaryColor(mapActivity, (TextView) v.findViewById(R.id.titleEx), nightMode); + String descEx = waypointHelper.getPoiFilter() == null ? ctx.getString(R.string.poi) : waypointHelper + .getPoiFilter().getName(); + ((TextView) v.findViewById(R.id.title)).setText(ctx.getString(R.string.search_radius_proximity) + ":"); + ((TextView) v.findViewById(R.id.titleEx)).setText(ctx.getString(R.string.shared_string_type) + ":"); + final TextView radiusEx = (TextView) v.findViewById(R.id.descriptionEx); + radiusEx.setText(descEx); + radiusEx.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + running[0] = position; + thisAdapter.notifyDataSetInvalidated(); + MapActivity map = (MapActivity) ctx; + final PoiUIFilter[] selected = new PoiUIFilter[1]; + AlertDialog dlg = map.getMapLayers().selectPOIFilterLayer(map.getMapView(), selected); + dlg.setOnDismissListener(new OnDismissListener() { + @Override + public void onDismiss(DialogInterface dialog) { + enableType(running, thisAdapter, type, true); + } + }); + } + + }); + } else { + v = ctx.getLayoutInflater().inflate(R.layout.drawer_list_radius, null); + ((TextView) v.findViewById(R.id.title)).setText(ctx.getString(R.string.search_radius_proximity)); + } AndroidUtils.setTextPrimaryColor(mapActivity, (TextView) v.findViewById(R.id.title), nightMode); final TextView radius = (TextView) v.findViewById(R.id.description); - ((ImageView) v.findViewById(R.id.waypoint_icon)).setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_poi_radius_dark, !nightMode)); radius.setText(OsmAndFormatter.getFormattedDistance(waypointHelper.getSearchDeviationRadius(type), app)); radius.setOnClickListener(new View.OnClickListener() { @Override @@ -249,26 +346,6 @@ public class WaypointDialogHelper { TextView tv = (TextView) v.findViewById(R.id.header_text); AndroidUtils.setTextPrimaryColor(mapActivity, tv, nightMode); tv.setText(getHeader(type, checked, ctx)); - v.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - if (type == WaypointHelper.POI && btn.isChecked()) { - running[0] = position; - thisAdapter.notifyDataSetInvalidated(); - MapActivity map = (MapActivity) ctx; - final PoiUIFilter[] selected = new PoiUIFilter[1]; - AlertDialog dlg = map.getMapLayers().selectPOIFilterLayer(map.getMapView(), selected); - dlg.setOnDismissListener(new OnDismissListener() { - @Override - public void onDismiss(DialogInterface dialog) { - if (selected != null) { - enableType(running, thisAdapter, type, true); - } - } - }); - } - } - }); return v; } @@ -305,11 +382,7 @@ public class WaypointDialogHelper { protected void onPostExecute(Void result) { running[0] = -1; - listAdapter.clear(); - for (Object point : getPoints()) { - listAdapter.add(point); - } - listAdapter.notifyDataSetChanged(); + reloadListAdapter(listAdapter); } }.execute((Void) null); } @@ -372,15 +445,23 @@ public class WaypointDialogHelper { protected void onPostExecute(Void result) { running[0] = -1; - listAdapter.clear(); - for (Object point : getPoints()) { - listAdapter.add(point); - } - listAdapter.notifyDataSetChanged(); + reloadListAdapter(listAdapter); } }.execute((Void) null); } + public void reloadListAdapter(ArrayAdapter listAdapter) { + listAdapter.clear(); + List points = getPoints(); + for (Object point : points) { + listAdapter.add(point); + } + if (listAdapter instanceof StableArrayAdapter) { + ((StableArrayAdapter) listAdapter).updateObjects(points, getActivePoints(points)); + } + listAdapter.notifyDataSetChanged(); + } + protected String getHeader(int type, boolean checked, Activity ctx) { String str = ctx.getString(R.string.waypoints); switch (type) { @@ -397,8 +478,7 @@ public class WaypointDialogHelper { str = ctx.getString(R.string.waypoints); break; case WaypointHelper.POI: - str = waypointHelper.getPoiFilter() == null || !checked ? ctx.getString(R.string.poi) : waypointHelper - .getPoiFilter().getName(); + str = ctx.getString(R.string.poi); break; } return str; @@ -416,7 +496,33 @@ public class WaypointDialogHelper { points.add(true); } points.add(i); - if ((i == WaypointHelper.POI || i == WaypointHelper.FAVORITES || i == WaypointHelper.WAYPOINTS) + if (i == WaypointHelper.TARGETS && rc) { + TargetPoint start = app.getTargetPointsHelper().getPointToStart(); + if (start == null) { + LatLon latLon; + Location loc = app.getLocationProvider().getLastKnownLocation(); + if (loc != null) { + latLon = new LatLon(loc.getLatitude(), loc.getLongitude()); + } else { + latLon = new LatLon(mapActivity.getMapView().getLatitude(), + mapActivity.getMapView().getLongitude()); + } + start = TargetPoint.createStartPoint(latLon, + new PointDescription(PointDescription.POINT_TYPE_MY_LOCATION, + mapActivity.getString(R.string.shared_string_my_location))); + + } else { + String oname = start.getOnlyName().length() > 0 ? start.getOnlyName() + : (mapActivity.getString(R.string.route_descr_map_location) + + " " + mapActivity.getString(R.string.route_descr_lat_lon, start.getLatitude(), start.getLongitude())); + + start = TargetPoint.createStartPoint(new LatLon(start.getLatitude(), start.getLongitude()), + new PointDescription(PointDescription.POINT_TYPE_LOCATION, + oname)); + } + points.add(new LocationPointWrapper(null, WaypointHelper.TARGETS, start, 0f, 0)); + + } else if ((i == WaypointHelper.POI || i == WaypointHelper.FAVORITES || i == WaypointHelper.WAYPOINTS) && rc) { if (waypointHelper.isTypeEnabled(i)) { points.add(new RadiusItem(i)); @@ -435,6 +541,11 @@ public class WaypointDialogHelper { if (!(a instanceof MapActivity)) { return; } + app.getSettings().setMapLocationToShow(locationPoint.getLatitude(), locationPoint.getLongitude(), + 15, locationPoint.getPointDescription(a), false, locationPoint); + MapActivity.launchMapActivityMoveToTop(a); + + /* MapActivity ctx = (MapActivity) a; AnimateDraggingMapThread thread = ctx.getMapView().getAnimatedDraggingThread(); int fZoom = ctx.getMapView().getZoom() < 15 ? 15 : ctx.getMapView().getZoom(); @@ -467,15 +578,9 @@ public class WaypointDialogHelper { new LatLon(locationPoint.getLatitude(), locationPoint.getLongitude()), locationPoint.getPointDescription(ctx), locationPoint); -/* - ctx.getMapLayers().getContextMenuLayer().setSelectedObject(locationPoint); - ctx.getMapLayers() - .getContextMenuLayer() - .setLocation(new LatLon(locationPoint.getLatitude(), locationPoint.getLongitude()), - PointDescription.getSimpleName(locationPoint, ctx)); -*/ } } + */ } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index 9ec641345d..ffe100a99c 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -19,6 +19,8 @@ import net.osmand.data.Amenity.AmenityRoutePoint; import net.osmand.data.LocationPoint; import net.osmand.data.PointDescription; import net.osmand.osm.PoiType; +import net.osmand.plus.ApplicationMode; +import net.osmand.plus.IconsCache; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings.MetricsConstants; @@ -33,6 +35,7 @@ import net.osmand.plus.routing.AlarmInfo.AlarmInfoType; import net.osmand.plus.routing.RouteCalculationResult; import net.osmand.plus.routing.VoiceRouter; import net.osmand.util.MapUtils; + import android.content.Context; import android.graphics.drawable.Drawable; @@ -48,7 +51,7 @@ public class WaypointHelper { private static final int LONG_ANNOUNCE_RADIUS = 700; private static final int SHORT_ANNOUNCE_RADIUS = 150; private static final int ALARMS_ANNOUNCE_RADIUS = 150; - + // don't annoy users by lots of announcements private static final int APPROACH_POI_LIMIT = 3; private static final int ANNOUNCE_POI_LIMIT = 3; @@ -62,26 +65,25 @@ public class WaypointHelper { public static final int ALARMS = 4; public static final int MAX = 5; public static final int[] SEARCH_RADIUS_VALUES = {50, 100, 150, 250, 500, 1000, 1500}; - + private List> locationPoints = new ArrayList>(); private ConcurrentHashMap locationPointsStates = new ConcurrentHashMap(); private TIntArrayList pointsProgress = new TIntArrayList(); private RouteCalculationResult route; - + private long announcedAlarmTime; - - + public WaypointHelper(OsmandApplication application) { app = application; } - + public List getWaypoints(int type) { - if(type == TARGETS) { + if (type == TARGETS) { return getTargets(new ArrayList()); } - if(type >= locationPoints.size()) { + if (type >= locationPoints.size()) { return Collections.emptyList(); } return locationPoints.get(type); @@ -98,21 +100,21 @@ public class WaypointHelper { } public void removeVisibleLocationPoint(LocationPointWrapper lp) { - if(lp.type < locationPoints.size()) { + if (lp.type < locationPoints.size()) { locationPoints.get(lp.type).remove(lp); } } - + public void removeVisibleLocationPoint(List points) { List ps = app.getTargetPointsHelper().getIntermediatePointsWithTarget(); boolean[] checkedIntermediates = null; for (LocationPointWrapper lp : points) { if (lp.type == TARGETS) { - if(checkedIntermediates == null) { + if (checkedIntermediates == null) { checkedIntermediates = new boolean[ps.size()]; Arrays.fill(checkedIntermediates, true); } - if(((TargetPoint) lp.point).intermediate) { + if (((TargetPoint) lp.point).intermediate) { checkedIntermediates[((TargetPoint) lp.point).index] = false; } else { checkedIntermediates[ps.size() - 1] = false; @@ -121,33 +123,33 @@ public class WaypointHelper { locationPoints.get(lp.type).remove(lp); } } - if(checkedIntermediates != null) { + if (checkedIntermediates != null) { IntermediatePointsDialog.commitPointsRemoval(app, checkedIntermediates); } - + } - - public LocationPointWrapper getMostImportantLocationPoint(List list ) { + + public LocationPointWrapper getMostImportantLocationPoint(List list) { //Location lastProjection = app.getRoutingHelper().getLastProjection(); - if(list != null) { + if (list != null) { list.clear(); } LocationPointWrapper found = null; for (int type = 0; type < locationPoints.size(); type++) { - if(type == ALARMS || type == TARGETS) { + if (type == ALARMS || type == TARGETS) { continue; } int kIterator = pointsProgress.get(type); List lp = locationPoints.get(type); - while(kIterator < lp.size()) { + while (kIterator < lp.size()) { LocationPointWrapper lwp = lp.get(kIterator); - if(lp.get(kIterator).routeIndex < route.getCurrentRoute()) { + if (lp.get(kIterator).routeIndex < route.getCurrentRoute()) { // skip } else { - if(route.getDistanceToPoint(lwp.routeIndex) <= LONG_ANNOUNCE_RADIUS ) { - if(found == null || found.routeIndex < lwp.routeIndex) { + if (route.getDistanceToPoint(lwp.routeIndex) <= LONG_ANNOUNCE_RADIUS) { + if (found == null || found.routeIndex < lwp.routeIndex) { found = lwp; - if(list != null) { + if (list != null) { list.add(lwp); } } @@ -159,7 +161,7 @@ public class WaypointHelper { } return found; } - + public AlarmInfo getMostImportantAlarm(MetricsConstants mc, boolean showCameras) { Location lastProjection = app.getRoutingHelper().getLastProjection(); float mxspeed = route.getCurrentMaxSpeed(); @@ -196,30 +198,30 @@ public class WaypointHelper { } return mostImportant; } - + public void enableWaypointType(int type, boolean enable) { //An item will be displayed in the Waypoint list if either "Show..." or "Announce..." is selected for it in the Navigation settings //Keep both "Show..." and "Announce..." Nav settings in sync when user changes what to display in the Waypoint list, as follows: - if(type == ALARMS) { + if (type == ALARMS) { app.getSettings().SHOW_TRAFFIC_WARNINGS.set(enable); app.getSettings().SPEAK_TRAFFIC_WARNINGS.set(enable); app.getSettings().SHOW_PEDESTRIAN.set(enable); app.getSettings().SPEAK_PEDESTRIAN.set(enable); //But do not implicitly change speed_cam settings here because of legal restrictions in some countries, so Nav settings must prevail - } else if(type == POI) { + } else if (type == POI) { app.getSettings().SHOW_NEARBY_POI.set(enable); app.getSettings().ANNOUNCE_NEARBY_POI.set(enable); - } else if(type == FAVORITES) { + } else if (type == FAVORITES) { app.getSettings().SHOW_NEARBY_FAVORITES.set(enable); app.getSettings().ANNOUNCE_NEARBY_FAVORITES.set(enable); - } else if(type == WAYPOINTS) { + } else if (type == WAYPOINTS) { app.getSettings().SHOW_WPT.set(enable); app.getSettings().ANNOUNCE_WPT.set(enable); } recalculatePoints(route, type, locationPoints); } - - public void recalculatePoints(int type){ + + public void recalculatePoints(int type) { recalculatePoints(route, type, locationPoints); } @@ -227,17 +229,17 @@ public class WaypointHelper { public boolean isTypeConfigurable(int waypointType) { return waypointType != TARGETS; } - + public boolean isTypeVisible(int waypointType) { boolean vis = app.getAppCustomization().isWaypointGroupVisible(waypointType, route); - if(!vis) { + if (!vis) { return false; } return vis; } public boolean isTypeEnabled(int type) { - if(type == ALARMS) { + if (type == ALARMS) { return showAlarms() || announceAlarms(); } else if (type == POI) { //no SHOW item in nav settings, hence only query ANNOUNCE here (makes inital Waypoint dialogue consistent with nav settings) @@ -254,12 +256,12 @@ public class WaypointHelper { } return true; } - - public AlarmInfo calculateMostImportantAlarm(RouteDataObject ro, Location loc, - MetricsConstants mc, boolean showCameras) { + + public AlarmInfo calculateMostImportantAlarm(RouteDataObject ro, Location loc, + MetricsConstants mc, boolean showCameras) { boolean direction = true; - if(loc.hasBearing()) { - double diff = MapUtils.alignAngleDifference(ro.directionRoute(0, true) - + if (loc.hasBearing()) { + double diff = MapUtils.alignAngleDifference(ro.directionRoute(0, true) - loc.getBearing() / (2 * Math.PI)); direction = Math.abs(diff) < Math.PI; } @@ -279,8 +281,8 @@ public class WaypointHelper { AlarmInfo info = AlarmInfo.createAlarmInfo(typeRule, 0, loc); if (info != null) { if (info.getType() != AlarmInfoType.SPEED_CAMERA || showCameras) { - long ms = System.currentTimeMillis() ; - if(ms - announcedAlarmTime > 50 * 1000) { + long ms = System.currentTimeMillis(); + if (ms - announcedAlarmTime > 50 * 1000) { announcedAlarmTime = ms; getVoiceRouter().announceAlarm(info.getType()); } @@ -319,15 +321,15 @@ public class WaypointHelper { List approachPoints = new ArrayList(); List announcePoints = new ArrayList(); List lp = locationPoints.get(type); - if(lp != null) { + if (lp != null) { int kIterator = pointsProgress.get(type); - while(kIterator < lp.size() && lp.get(kIterator).routeIndex < currentRoute) { + while (kIterator < lp.size() && lp.get(kIterator).routeIndex < currentRoute) { kIterator++; } pointsProgress.set(type, kIterator); - while(kIterator < lp.size()) { + while (kIterator < lp.size()) { LocationPointWrapper lwp = lp.get(kIterator); - if(route.getDistanceToPoint(lwp.routeIndex) > LONG_ANNOUNCE_RADIUS * 2){ + if (route.getDistanceToPoint(lwp.routeIndex) > LONG_ANNOUNCE_RADIUS * 2) { break; } LocationPoint point = lwp.point; @@ -350,7 +352,7 @@ public class WaypointHelper { kIterator++; } if (!announcePoints.isEmpty()) { - if(announcePoints.size() > ANNOUNCE_POI_LIMIT) { + if (announcePoints.size() > ANNOUNCE_POI_LIMIT) { announcePoints = announcePoints.subList(0, ANNOUNCE_POI_LIMIT); } if (type == WAYPOINTS) { @@ -364,7 +366,7 @@ public class WaypointHelper { } } if (!approachPoints.isEmpty()) { - if(approachPoints.size() > APPROACH_POI_LIMIT) { + if (approachPoints.size() > APPROACH_POI_LIMIT) { approachPoints = approachPoints.subList(0, APPROACH_POI_LIMIT); } if (type == WAYPOINTS) { @@ -373,10 +375,10 @@ public class WaypointHelper { getVoiceRouter().approachPoi(lastKnownLocation, approachPoints); } else if (type == ALARMS) { EnumSet ait = EnumSet.noneOf(AlarmInfoType.class); - for(LocationPointWrapper pw : approachPoints) { + for (LocationPointWrapper pw : approachPoints) { ait.add(((AlarmInfo) pw.point).getType()); } - for(AlarmInfoType t : ait) { + for (AlarmInfoType t : ait) { app.getRoutingHelper().getVoiceRouter().announceAlarm(t); } } else if (type == FAVORITES) { @@ -392,11 +394,11 @@ public class WaypointHelper { protected VoiceRouter getVoiceRouter() { return app.getRoutingHelper().getVoiceRouter(); } - + public boolean isRouteCalculated() { return route != null && !route.isEmpty(); } - + public List getAllPoints() { List points = new ArrayList(); List> local = locationPoints; @@ -418,8 +420,8 @@ public class WaypointHelper { for (int k = 0; k < wts.size(); k++) { final int index = wts.size() - k - 1; TargetPoint tp = wts.get(index); - int routeIndex ; - if(route == null) { + int routeIndex; + if (route == null) { routeIndex = k == 0 ? Integer.MAX_VALUE : index; } else { routeIndex = k == 0 ? route.getImmutableAllLocations().size() - 1 : route.getIndexOfIntermediate(k - 1); @@ -435,7 +437,7 @@ public class WaypointHelper { this.locationPoints = new ArrayList>(); } - + public void setNewRoute(RouteCalculationResult route) { List> locationPoints = new ArrayList>(); recalculatePoints(route, -1, locationPoints); @@ -459,7 +461,7 @@ public class WaypointHelper { sortList(array); } } - if((type == ALARMS || all)) { + if ((type == ALARMS || all)) { final List array = clearAndGetArray(locationPoints, ALARMS); calculateAlarms(route, array); sortList(array); @@ -473,26 +475,26 @@ public class WaypointHelper { sortList(array); } } - if((type == POI || all)) { + if ((type == POI || all)) { final List array = clearAndGetArray(locationPoints, POI); - if(showPOI()) { + if (showPOI()) { calculatePoi(route, array); sortList(array); } } } } - + private float dist(LocationPoint l, List locations, int[] ind) { float dist = Float.POSITIVE_INFINITY; // Special iterations because points stored by pairs! - for (int i = 1; i < locations.size(); i ++) { + for (int i = 1; i < locations.size(); i++) { final double ld = MapUtils.getOrthogonalDistance( - l.getLatitude(), l.getLongitude(), - locations.get(i - 1).getLatitude(), locations.get(i - 1).getLongitude(), + l.getLatitude(), l.getLongitude(), + locations.get(i - 1).getLatitude(), locations.get(i - 1).getLongitude(), locations.get(i).getLatitude(), locations.get(i).getLongitude()); - if(ld < dist){ - if(ind != null) { + if (ld < dist) { + if (ind != null) { ind[0] = i; } dist = (float) ld; @@ -517,7 +519,7 @@ public class WaypointHelper { public int compare(LocationPointWrapper olhs, LocationPointWrapper orhs) { int lhs = olhs.routeIndex; int rhs = orhs.routeIndex; - if(lhs == rhs) { + if (lhs == rhs) { return Float.compare(olhs.deviationDistance, orhs.deviationDistance); } return lhs < rhs ? -1 : 1; @@ -545,31 +547,30 @@ public class WaypointHelper { } - private void calculateAlarms(RouteCalculationResult route, List array) { - for(AlarmInfo i : route.getAlarmInfo()) { - if(i.getType() == AlarmInfoType.SPEED_CAMERA) { - if(app.getSettings().SHOW_CAMERAS.get() || app.getSettings().SPEAK_SPEED_CAMERA.get()){ - LocationPointWrapper lw = new LocationPointWrapper(route, ALARMS, i, 0, i.getLocationIndex()); + for (AlarmInfo i : route.getAlarmInfo()) { + if (i.getType() == AlarmInfoType.SPEED_CAMERA) { + if (app.getSettings().SHOW_CAMERAS.get() || app.getSettings().SPEAK_SPEED_CAMERA.get()) { + LocationPointWrapper lw = new LocationPointWrapper(route, ALARMS, i, 0, i.getLocationIndex()); lw.setAnnounce(app.getSettings().SPEAK_SPEED_CAMERA.get()); array.add(lw); } } else { - if(app.getSettings().SHOW_TRAFFIC_WARNINGS.get() || app.getSettings().SPEAK_TRAFFIC_WARNINGS.get()){ - LocationPointWrapper lw = new LocationPointWrapper(route, ALARMS, i, 0, i.getLocationIndex()); + if (app.getSettings().SHOW_TRAFFIC_WARNINGS.get() || app.getSettings().SPEAK_TRAFFIC_WARNINGS.get()) { + LocationPointWrapper lw = new LocationPointWrapper(route, ALARMS, i, 0, i.getLocationIndex()); lw.setAnnounce(app.getSettings().SPEAK_TRAFFIC_WARNINGS.get()); array.add(lw); } } - + } - + } private List clearAndGetArray(List> array, - int ind) { - while(array.size() <= ind) { + int ind) { + while (array.size() <= ind) { array.add(new ArrayList()); } array.get(ind).clear(); @@ -578,13 +579,13 @@ public class WaypointHelper { private void findLocationPoints(RouteCalculationResult rt, int type, List locationPoints, - List points, boolean announce) { + List points, boolean announce) { List immutableAllLocations = rt.getImmutableAllLocations(); int[] ind = new int[1]; - for(LocationPoint p : points) { + for (LocationPoint p : points) { float dist = dist(p, immutableAllLocations, ind); int rad = getSearchDeviationRadius(type); - if(dist <= rad) { + if (dist <= rad) { LocationPointWrapper lpw = new LocationPointWrapper(rt, type, p, dist, ind[0]); lpw.setAnnounce(announce); locationPoints.add(lpw); @@ -597,10 +598,11 @@ public class WaypointHelper { public PoiUIFilter getPoiFilter() { return app.getPoiFilters().getFilterById(app.getSettings().SELECTED_POI_FILTER_FOR_MAP.get()); } + public boolean showPOI() { return app.getSettings().SHOW_NEARBY_POI.get(); } - + public boolean announcePOI() { return app.getSettings().ANNOUNCE_NEARBY_POI.get(); } @@ -608,15 +610,15 @@ public class WaypointHelper { public boolean showGPXWaypoints() { return app.getSettings().SHOW_WPT.get(); } - + public boolean announceGPXWaypoints() { return app.getSettings().ANNOUNCE_WPT.get(); } - + public boolean showFavorites() { return app.getSettings().SHOW_NEARBY_FAVORITES.get(); } - + public boolean announceFavorites() { return app.getSettings().ANNOUNCE_NEARBY_FAVORITES.get(); } @@ -637,10 +639,10 @@ public class WaypointHelper { boolean announce = true; RouteCalculationResult route; int type; - + public LocationPointWrapper() { } - + public LocationPointWrapper(RouteCalculationResult rt, int type, LocationPoint point, float deviationDistance, int routeIndex) { this.route = rt; this.type = type; @@ -648,11 +650,11 @@ public class WaypointHelper { this.deviationDistance = deviationDistance; this.routeIndex = routeIndex; } - + public void setAnnounce(boolean announce) { this.announce = announce; } - + public float getDeviationDistance() { return deviationDistance; } @@ -662,10 +664,8 @@ public class WaypointHelper { } - - - public Drawable getDrawable(Context uiCtx, OsmandApplication app) { - if(type == POI) { + public Drawable getDrawable(Context uiCtx, OsmandApplication app, boolean nightMode) { + if (type == POI) { Amenity amenity = ((AmenityLocationPoint) point).a; PoiType st = amenity.getType().getPoiTypeByKeyName(amenity.getSubType()); if (st != null) { @@ -678,36 +678,53 @@ public class WaypointHelper { } } return null; - } else if(type == TARGETS) { - int i = !((TargetPoint)point).intermediate? R.drawable.list_destination : - R.drawable.list_intermediate; - return uiCtx.getResources().getDrawable(i); - } else if(type == FAVORITES || type == WAYPOINTS) { + + } else if (type == TARGETS) { + IconsCache iconsCache = app.getIconsCache(); + if (((TargetPoint) point).start) { + ApplicationMode appMode = app.getSettings().getApplicationMode(); + return uiCtx.getResources().getDrawable(appMode.getResourceLocationDay()); + } else if (((TargetPoint) point).intermediate) { + if (!nightMode) { + return iconsCache.getIcon(R.drawable.widget_intermediate_day, 0, 0f); + } else { + return iconsCache.getIcon(R.drawable.widget_intermediate_night, 0, 0f); + } + } else { + if (!nightMode) { + return iconsCache.getIcon(R.drawable.widget_target_day, 0, 0f); + } else { + return iconsCache.getIcon(R.drawable.widget_target_night, 0, 0f); + } + } + + } else if (type == FAVORITES || type == WAYPOINTS) { return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor(), false); - } else if(type == ALARMS) { + + } else if (type == ALARMS) { //assign alarm list icons manually for now - if(((AlarmInfo) point).getType().toString() == "SPEED_CAMERA") { + if (((AlarmInfo) point).getType().toString().equals("SPEED_CAMERA")) { return uiCtx.getResources().getDrawable(R.drawable.mx_highway_speed_camera); - } else if(((AlarmInfo) point).getType().toString() == "BORDER_CONTROL") { + } else if (((AlarmInfo) point).getType().toString().equals("BORDER_CONTROL")) { return uiCtx.getResources().getDrawable(R.drawable.mx_barrier_border_control); - } else if(((AlarmInfo) point).getType().toString() == "RAILWAY") { - if(app.getSettings().DRIVING_REGION.get().americanSigns){ + } else if (((AlarmInfo) point).getType().toString().equals("RAILWAY")) { + if (app.getSettings().DRIVING_REGION.get().americanSigns) { return uiCtx.getResources().getDrawable(R.drawable.list_warnings_railways_us); } else { return uiCtx.getResources().getDrawable(R.drawable.list_warnings_railways); } - } else if(((AlarmInfo) point).getType().toString() == "TRAFFIC_CALMING") { - if(app.getSettings().DRIVING_REGION.get().americanSigns){ + } else if (((AlarmInfo) point).getType().toString().equals("TRAFFIC_CALMING")) { + if (app.getSettings().DRIVING_REGION.get().americanSigns) { return uiCtx.getResources().getDrawable(R.drawable.list_warnings_traffic_calming_us); } else { return uiCtx.getResources().getDrawable(R.drawable.list_warnings_traffic_calming); } - } else if(((AlarmInfo) point).getType().toString() == "TOLL_BOOTH") { + } else if (((AlarmInfo) point).getType().toString().equals("TOLL_BOOTH")) { return uiCtx.getResources().getDrawable(R.drawable.mx_toll_booth); - } else if(((AlarmInfo) point).getType().toString() == "STOP") { + } else if (((AlarmInfo) point).getType().toString().equals("STOP")) { return uiCtx.getResources().getDrawable(R.drawable.list_stop); - } else if(((AlarmInfo) point).getType().toString() == "PEDESTRIAN") { - if(app.getSettings().DRIVING_REGION.get().americanSigns){ + } else if (((AlarmInfo) point).getType().toString().equals("PEDESTRIAN")) { + if (app.getSettings().DRIVING_REGION.get().americanSigns) { return uiCtx.getResources().getDrawable(R.drawable.list_warnings_pedestrian_us); } else { return uiCtx.getResources().getDrawable(R.drawable.list_warnings_pedestrian); @@ -715,15 +732,17 @@ public class WaypointHelper { } else { return null; } + } else { return null; } } - + @Override public int hashCode() { return ((point == null) ? 0 : point.hashCode()); } + @Override public boolean equals(Object obj) { if (this == obj) @@ -740,15 +759,15 @@ public class WaypointHelper { return false; return true; } - + } - public int getSearchDeviationRadius(int type){ + public int getSearchDeviationRadius(int type) { return type == POI ? poiSearchDeviationRadius : searchDeviationRadius; } - public void setSearchDeviationRadius(int type, int radius){ - if(type == POI) { + public void setSearchDeviationRadius(int type, int radius) { + if (type == POI) { this.poiSearchDeviationRadius = radius; } else { this.searchDeviationRadius = radius; @@ -758,7 +777,7 @@ public class WaypointHelper { private class AmenityLocationPoint implements LocationPoint { Amenity a; - + public AmenityLocationPoint(Amenity a) { this.a = a; } @@ -773,10 +792,10 @@ public class WaypointHelper { return a.getLocation().getLongitude(); } - + @Override public PointDescription getPointDescription(Context ctx) { - return new PointDescription(PointDescription.POINT_TYPE_POI, + return new PointDescription(PointDescription.POINT_TYPE_POI, OsmAndFormatter.getPoiStringWithoutType(a, app.getSettings().MAP_PREFERRED_LOCALE.get())); } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java index b6bef830dc..6c9ad91149 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java @@ -144,7 +144,7 @@ public abstract class MenuTitleController { public void run() { acquireStreetName(); } - }, 50); + }, 100); return; } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java index 249104eee4..5f60c3ac6b 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java @@ -65,6 +65,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { private boolean selectFromMapForTarget; private boolean showMenu = false; + private boolean visible; private MapActivity mapActivity; private MapControlsLayer mapControlsLayer; public static final String TARGET_SELECT = "TARGET_SELECT"; @@ -371,7 +372,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener { } public boolean isVisible() { - return findMenuFragment() != null; + return visible; } public WeakReference findMenuFragment() { @@ -598,29 +599,34 @@ public class MapRouteInfoMenu implements IRouteInformationListener { } public void onDismiss() { + visible = false; mapActivity.getMapView().setMapPositionX(0); mapActivity.getMapView().refreshMap(); AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_route_land_left_margin), false); AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_right_widgets_panel), true); - AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_left_widgets_panel), true); if (switched) { mapControlsLayer.switchToRouteFollowingLayout(); } } public void show() { + visible = true; switched = mapControlsLayer.switchToRoutePlanningLayout(); + boolean refreshMap = !switched; boolean portrait = AndroidUiHelper.isOrientationPortrait(mapActivity); if (!portrait) { mapActivity.getMapView().setMapPositionX(1); - mapActivity.getMapView().refreshMap(); + refreshMap = true; + } + + if (refreshMap) { + mapActivity.refreshMap(); } MapRouteInfoMenuFragment.showInstance(mapActivity); if (!AndroidUiHelper.isXLargeDevice(mapActivity)) { AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_right_widgets_panel), false); - AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_left_widgets_panel), false); } if (!portrait) { AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_route_land_left_margin), true); @@ -631,6 +637,8 @@ public class MapRouteInfoMenu implements IRouteInformationListener { WeakReference fragmentRef = findMenuFragment(); if (fragmentRef != null) { fragmentRef.get().dismiss(); + } else { + visible = false; } } @@ -673,7 +681,8 @@ public class MapRouteInfoMenu implements IRouteInformationListener { label.setText(row.text); Drawable icon = mapActivity.getMyApplication().getIconsCache().getContentIcon(row.iconId); label.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null); - label.setCompoundDrawablePadding(dpToPx(12f)); + label.setCompoundDrawablePadding(dpToPx(16f)); + label.setPadding(dpToPx((16f)), 0, 0, 0); return label; } diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 6e3e9d8370..7f79fb4765 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -609,20 +609,21 @@ public class RoutingHelper { voiceRouter.newRouteIsCalculated(newRoute); } } - + app.getWaypointHelper().setNewRoute(res); + app.runInUIThread(new Runnable() { @Override public void run() { ValueHolder showToast = new ValueHolder(); showToast.value = true; Iterator> it = listeners.iterator(); - while(it.hasNext()) { + while (it.hasNext()) { WeakReference ref = it.next(); IRouteInformationListener l = ref.get(); - if(l == null) { + if (l == null) { it.remove(); } else { - l.newRouteIsCalculated(newRoute, showToast); + l.newRouteIsCalculated(newRoute, showToast); } } if (showToast.value) { @@ -635,9 +636,6 @@ public class RoutingHelper { } } }); - - - app.getWaypointHelper().setNewRoute(res); } public int getLeftDistance(){ diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index e57ec18f57..bf81706627 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -492,7 +492,7 @@ public class MapControlsLayer extends OsmandMapLayer { ((System.currentTimeMillis() - touchEvent < TIMEOUT_TO_SHOW_BUTTONS) && routeFollowingMode); updateMyLocation(rh, dialogOpened); boolean showButtons = (showRouteCalculationControls || !routeFollowingMode); - routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_gabout_dark : R.drawable.map_directions); + //routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_gabout_dark : R.drawable.map_directions); if (routePlanningMode || routeFollowingMode) { routePlanningBtn.setIconResId(R.drawable.map_start_navigation); routePlanningBtn.setIconColorId(R.color.color_myloc_distance); @@ -534,7 +534,7 @@ public class MapControlsLayer extends OsmandMapLayer { updateCompass(isNight); for (MapHudButton mc : controls) { - mc.update(mapActivity.getMyApplication(), nightMode != null && nightMode.isNightMode()); + mc.update(mapActivity.getMyApplication(), isNight); } } diff --git a/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java b/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java new file mode 100644 index 0000000000..068beac3e2 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java @@ -0,0 +1,689 @@ +package net.osmand.plus.views.controls; +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import android.animation.Animator; +import android.animation.AnimatorListenerAdapter; +import android.animation.ObjectAnimator; +import android.animation.TypeEvaluator; +import android.animation.ValueAnimator; +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Paint; +import android.graphics.Rect; +import android.graphics.drawable.BitmapDrawable; +import android.support.annotation.NonNull; +import android.util.AttributeSet; +import android.util.DisplayMetrics; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewTreeObserver; +import android.widget.AbsListView; +import android.widget.HeaderViewListAdapter; +import android.widget.ListAdapter; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; + +import java.util.List; + +public class DynamicListView extends ObservableListView { + + public final String TAG_DRAG_ICON = "DragIcon"; + protected final int SMOOTH_SCROLL_AMOUNT_AT_EDGE = 15; + protected final int MOVE_DURATION = 150; + + protected List mItemsList; + protected List mActiveItemsList; + + private DynamicListViewCallbacks dCallbacks; + + private int mLastEventY = -1; + + protected int mDownY = -1; + protected int mDownX = -1; + + private int mTotalOffset = 0; + + private boolean mCellIsMobile = false; + private boolean mIsMobileScrolling = false; + private int mSmoothScrollAmountAtEdge = 0; + private boolean itemsSwapped = false; + + protected final int INVALID_ID = -1; + private long mAboveItemId = INVALID_ID; + private long mMobileItemId = INVALID_ID; + private long mBelowItemId = INVALID_ID; + + private BitmapDrawable mHoverCell; + private Rect mHoverCellCurrentBounds; + private Rect mHoverCellOriginalBounds; + + protected final int INVALID_POINTER_ID = -1; + private int mActivePointerId = INVALID_POINTER_ID; + + private boolean mIsWaitingForScrollFinish = false; + private int mScrollState = OnScrollListener.SCROLL_STATE_IDLE; + + public DynamicListView(Context context) { + super(context); + init(context); + } + + public DynamicListView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + init(context); + } + + public DynamicListView(Context context, AttributeSet attrs) { + super(context, attrs); + init(context); + } + + public void init(Context context) { + setOnScrollListener(mScrollListener); + DisplayMetrics metrics = context.getResources().getDisplayMetrics(); + mSmoothScrollAmountAtEdge = (int) (SMOOTH_SCROLL_AMOUNT_AT_EDGE / metrics.density); + } + + public void setDynamicListViewCallbacks(DynamicListViewCallbacks callbacks) { + dCallbacks = callbacks; + } + + /** + * Creates the hover cell with the appropriate bitmap and of appropriate + * size. The hover cell's BitmapDrawable is drawn on top of the bitmap every + * single time an invalidate call is made. + */ + private BitmapDrawable getAndAddHoverView(View v) { + + int w = v.getWidth(); + int h = v.getHeight(); + int top = v.getTop(); + int left = v.getLeft(); + + Bitmap b = getBitmapFromView(v); + + BitmapDrawable drawable = new BitmapDrawable(getResources(), b); + + mHoverCellOriginalBounds = new Rect(left, top, left + w, top + h); + mHoverCellCurrentBounds = new Rect(mHoverCellOriginalBounds); + + drawable.setBounds(mHoverCellCurrentBounds); + + return drawable; + } + + /** + * Returns a bitmap showing a screenshot of the view passed in. + */ + private Bitmap getBitmapFromView(View v) { + Bitmap bitmap = Bitmap.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.ARGB_8888); + Canvas canvas = new Canvas(bitmap); + v.draw(canvas); + + Bitmap bitmapOut = Bitmap.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.ARGB_8888); + Canvas canvasOut = new Canvas(bitmapOut); + canvasOut.drawColor(Color.TRANSPARENT); + Paint p = new Paint(); + p.setAlpha(200); + canvasOut.drawBitmap(bitmap, 0, 0, p); + + return bitmapOut; + } + + public StableArrayAdapter getStableAdapter() { + ListAdapter listAdapter = getAdapter(); + if (listAdapter instanceof HeaderViewListAdapter) { + listAdapter = ((HeaderViewListAdapter) listAdapter).getWrappedAdapter(); + } + if (listAdapter instanceof StableArrayAdapter) { + return (StableArrayAdapter) listAdapter; + } + return null; + } + + /** + * Stores a reference to the views above and below the item currently + * corresponding to the hover cell. It is important to note that if this + * item is either at the top or bottom of the list, mAboveItemId or mBelowItemId + * may be invalid. + */ + private void updateNeighborViewsForID(long itemID) { + ListAdapter adapter = getAdapter(); + int position = getPositionForID(itemID); + int pos = position; + mAboveItemId = INVALID_ID; + while (mAboveItemId == INVALID_ID && pos > 0) { + pos--; + mAboveItemId = adapter.getItemId(pos); + if (mAboveItemId != INVALID_ID) { + Object obj = adapter.getItem(pos); + if (mActiveItemsList == null || !mActiveItemsList.contains(obj)) { + mAboveItemId = INVALID_ID; + } + } + } + pos = position; + mBelowItemId = INVALID_ID; + while (mBelowItemId == INVALID_ID && pos < mItemsList.size()) { + pos++; + mBelowItemId = adapter.getItemId(pos); + if (mBelowItemId != INVALID_ID) { + Object obj = adapter.getItem(pos); + if (mActiveItemsList == null || !mActiveItemsList.contains(obj)) { + mBelowItemId = INVALID_ID; + } + } + } + } + + /** + * Retrieves the view in the list corresponding to itemID + */ + public View getViewForID(long itemID) { + if (itemID != INVALID_ID) { + int firstVisiblePosition = getFirstVisiblePosition(); + ListAdapter adapter = getAdapter(); + for (int i = 0; i < getChildCount(); i++) { + View v = getChildAt(i); + int position = firstVisiblePosition + i; + long id = adapter.getItemId(position); + if (id == itemID) { + return v; + } + } + } + return null; + } + + public void setAllVisible() { + for (int i = 0; i < getChildCount(); i++) { + View v = getChildAt(i); + if (v != null && v.getVisibility() != VISIBLE) { + v.setVisibility(VISIBLE); + } + } + } + + /** + * Retrieves the position in the list corresponding to itemID + */ + public int getPositionForID(long itemID) { + View v = getViewForID(itemID); + if (v == null) { + return -1; + } else { + return getPositionForView(v); + } + } + + /** + * dispatchDraw gets invoked when all the child views are about to be drawn. + * By overriding this method, the hover cell (BitmapDrawable) can be drawn + * over the listview's items whenever the listview is redrawn. + */ + @Override + protected void dispatchDraw(@NonNull Canvas canvas) { + super.dispatchDraw(canvas); + if (mHoverCell != null) { + mHoverCell.draw(canvas); + } + } + + @Override + public boolean onTouchEvent(@NonNull MotionEvent event) { + + switch (event.getAction() & MotionEvent.ACTION_MASK) { + case MotionEvent.ACTION_DOWN: + if (!mCellIsMobile && mHoverCell == null) { + mDownX = (int) event.getX(); + mDownY = (int) event.getY(); + mActivePointerId = event.getPointerId(0); + + // Find the view that the user pressed their finger down on. + View v = findViewAtPositionWithTag(getRootView(), (int) event.getRawX(), (int) event.getRawY(), TAG_DRAG_ICON); + + // If the view contains a tag set to "DragIcon", it means that the user wants to + // reorder the list item. + if ((v != null) && (v.getTag() != null) && (v.getTag().equals(TAG_DRAG_ICON))) { + mTotalOffset = 0; + + int position = pointToPosition(mDownX, mDownY); + if (position != INVALID_POSITION) { + Object item = getAdapter().getItem(position); + if (mActiveItemsList == null || mActiveItemsList.contains(item)) { + + int itemNum = position - getFirstVisiblePosition(); + itemsSwapped = false; + + View selectedView = getChildAt(itemNum); + mMobileItemId = getAdapter().getItemId(position); + mHoverCell = getAndAddHoverView(selectedView); + selectedView.setVisibility(INVISIBLE); + + mCellIsMobile = true; + + updateNeighborViewsForID(mMobileItemId); + } + } + } + } + break; + + case MotionEvent.ACTION_MOVE: + if (mActivePointerId == INVALID_POINTER_ID) { + break; + } + + int pointerIndex = event.findPointerIndex(mActivePointerId); + + mLastEventY = (int) event.getY(pointerIndex); + int deltaY = mLastEventY - mDownY; + + if (mCellIsMobile && mHoverCell != null) { + mHoverCellCurrentBounds.offsetTo(mHoverCellOriginalBounds.left, + mHoverCellOriginalBounds.top + deltaY + mTotalOffset); + mHoverCell.setBounds(mHoverCellCurrentBounds); + invalidate(); + + handleCellSwitch(); + + mIsMobileScrolling = false; + handleMobileCellScroll(); + + return false; + } + break; + + case MotionEvent.ACTION_UP: + touchEventsEnded(); + break; + + case MotionEvent.ACTION_CANCEL: + touchEventsCancelled(); + break; + + case MotionEvent.ACTION_POINTER_UP: + /* If a multitouch event took place and the original touch dictating + * the movement of the hover cell has ended, then the dragging event + * ends and the hover cell is animated to its corresponding position + * in the listview. */ + pointerIndex = (event.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >> + MotionEvent.ACTION_POINTER_INDEX_SHIFT; + final int pointerId = event.getPointerId(pointerIndex); + if (pointerId == mActivePointerId) { + touchEventsEnded(); + } + break; + + default: + break; + } + + return super.onTouchEvent(event); + } + + /** + * This method determines whether the hover cell has been shifted far enough + * to invoke a cell swap. If so, then the respective cell swap candidate is + * determined and the data set is changed. Upon posting a notification of the + * data set change, a layout is invoked to place the cells in the right place. + * Using a ViewTreeObserver and a corresponding OnPreDrawListener, we can + * offset the cell being swapped to where it previously was and then animate it to + * its new position. + */ + private void handleCellSwitch() { + final int deltaY = mLastEventY - mDownY; + final int deltaYTotal = mHoverCellOriginalBounds.top + mTotalOffset + deltaY; + + View belowView = getViewForID(mBelowItemId); + View mobileView = getViewForID(mMobileItemId); + View aboveView = getViewForID(mAboveItemId); + + boolean isBelow = (belowView != null) && (deltaYTotal > belowView.getTop()); + boolean isAbove = (aboveView != null) && (deltaYTotal < aboveView.getTop()); + + if (isBelow || isAbove) { + + final long switchItemID = isBelow ? mBelowItemId : mAboveItemId; + View switchView = isBelow ? belowView : aboveView; + final int originalItem = getPositionForView(mobileView) - getHeaderViewsCount(); + final int switchItem = getPositionForView(switchView) - getHeaderViewsCount(); + swapElements(originalItem, switchItem); + + getStableAdapter().notifyDataSetChanged(); + + mDownY = mLastEventY; + + final int switchViewStartTop = switchView.getTop(); + + if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.KITKAT) { + mobileView.setVisibility(View.VISIBLE); + switchView.setVisibility(View.INVISIBLE); + } + updateNeighborViewsForID(mMobileItemId); + + final ViewTreeObserver observer = getViewTreeObserver(); + observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { + public boolean onPreDraw() { + observer.removeOnPreDrawListener(this); + + View switchView = getViewForID(switchItemID); + + mTotalOffset += deltaY; + + int switchViewNewTop = switchView.getTop(); + int delta = switchViewStartTop - switchViewNewTop; + + switchView.setTranslationY(delta); + + ObjectAnimator animator = ObjectAnimator.ofFloat(switchView, + View.TRANSLATION_Y, 0); + animator.setDuration(MOVE_DURATION); + animator.start(); + + return true; + } + }); + } + } + + private void swapElements(int indexOne, int indexTwo) { + Object obj1 = mItemsList.get(indexOne); + Object obj2 = mItemsList.get(indexTwo); + mItemsList.set(indexOne, obj2); + mItemsList.set(indexTwo, obj1); + + int index1 = mActiveItemsList.indexOf(obj1); + int index2 = mActiveItemsList.indexOf(obj2); + if (index1 != -1 && index2 != -1) { + mActiveItemsList.set(index1, obj2); + mActiveItemsList.set(index2, obj1); + itemsSwapped = true; + } + } + + + /** + * Resets all the appropriate fields to a default state while also animating + * the hover cell back to its correct location. + */ + private void touchEventsEnded() { + final View mobileView = getViewForID(mMobileItemId); + if (mCellIsMobile || mIsWaitingForScrollFinish) { + mCellIsMobile = false; + mIsWaitingForScrollFinish = false; + mIsMobileScrolling = false; + mActivePointerId = INVALID_POINTER_ID; + + // If the autoscroller has not completed scrolling, we need to wait for it to + // finish in order to determine the final location of where the hover cell + // should be animated to. + if (mScrollState != OnScrollListener.SCROLL_STATE_IDLE) { + mIsWaitingForScrollFinish = true; + return; + } + + mHoverCellCurrentBounds.offsetTo(mHoverCellOriginalBounds.left, mobileView.getTop()); + + ObjectAnimator hoverViewAnimator = ObjectAnimator.ofObject(mHoverCell, "bounds", + sBoundEvaluator, mHoverCellCurrentBounds); + hoverViewAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { + @Override + public void onAnimationUpdate(ValueAnimator valueAnimator) { + invalidate(); + } + }); + hoverViewAnimator.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationStart(Animator animation) { + setEnabled(false); + } + + @Override + public void onAnimationEnd(Animator animation) { + mAboveItemId = INVALID_ID; + mMobileItemId = INVALID_ID; + mBelowItemId = INVALID_ID; + setAllVisible(); + mHoverCell = null; + setEnabled(true); + invalidate(); + processSwapped(); + } + }); + hoverViewAnimator.start(); + } else { + touchEventsCancelled(); + } + } + + /** + * Resets all the appropriate fields to a default state. + */ + private void touchEventsCancelled() { + if (mCellIsMobile) { + mAboveItemId = INVALID_ID; + mMobileItemId = INVALID_ID; + mBelowItemId = INVALID_ID; + setAllVisible(); + mHoverCell = null; + invalidate(); + processSwapped(); + } + + mCellIsMobile = false; + mIsMobileScrolling = false; + mActivePointerId = INVALID_POINTER_ID; + } + + private void processSwapped() { + if (itemsSwapped) { + itemsSwapped = false; + if (dCallbacks != null) { + dCallbacks.onItemsSwapped(mActiveItemsList); + } + } + } + + /** + * This TypeEvaluator is used to animate the BitmapDrawable back to its + * final location when the user lifts his finger by modifying the + * BitmapDrawable's bounds. + */ + private final static TypeEvaluator sBoundEvaluator = new TypeEvaluator() { + public Rect evaluate(float fraction, Rect startValue, Rect endValue) { + return new Rect(interpolate(startValue.left, endValue.left, fraction), + interpolate(startValue.top, endValue.top, fraction), + interpolate(startValue.right, endValue.right, fraction), + interpolate(startValue.bottom, endValue.bottom, fraction)); + } + + public int interpolate(int start, int end, float fraction) { + return (int) (start + fraction * (end - start)); + } + }; + + /** + * Determines whether this listview is in a scrolling state invoked + * by the fact that the hover cell is out of the bounds of the listview; + */ + private void handleMobileCellScroll() { + mIsMobileScrolling = handleMobileCellScroll(mHoverCellCurrentBounds); + } + + /** + * This method is in charge of determining if the hover cell is above + * or below the bounds of the listview. If so, the listview does an appropriate + * upward or downward smooth scroll so as to reveal new items. + */ + public boolean handleMobileCellScroll(Rect r) { + int offset = computeVerticalScrollOffset(); + int height = getHeight(); + int extent = computeVerticalScrollExtent(); + int range = computeVerticalScrollRange(); + int hoverViewTop = r.top; + int hoverHeight = r.height(); + + if (hoverViewTop <= 0 && offset > 0) { + smoothScrollBy(-mSmoothScrollAmountAtEdge, 0); + return true; + } + + if (hoverViewTop + hoverHeight >= height && (offset + extent) < range) { + smoothScrollBy(mSmoothScrollAmountAtEdge, 0); + return true; + } + + return false; + } + + public void setItemsList(List itemsList) { + mItemsList = itemsList; + } + + /* + * Define items which can be moved + * mActiveItemsList == null means all items are movable + */ + public void setActiveItemsList(List mActiveItemsList) { + this.mActiveItemsList = mActiveItemsList; + } + + /** + * This scroll listener is added to the listview in order to handle cell swapping + * when the cell is either at the top or bottom edge of the listview. If the hover + * cell is at either edge of the listview, the listview will begin scrolling. As + * scrolling takes place, the listview continuously checks if new cells became visible + * and determines whether they are potential candidates for a cell swap. + */ + private AbsListView.OnScrollListener mScrollListener = new AbsListView.OnScrollListener() { + + private int mPreviousFirstVisibleItem = -1; + private int mPreviousVisibleItemCount = -1; + private int mCurrentFirstVisibleItem; + private int mCurrentVisibleItemCount; + private int mCurrentScrollState; + + public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, + int totalItemCount) { + mCurrentFirstVisibleItem = firstVisibleItem; + mCurrentVisibleItemCount = visibleItemCount; + + mPreviousFirstVisibleItem = (mPreviousFirstVisibleItem == -1) ? mCurrentFirstVisibleItem + : mPreviousFirstVisibleItem; + mPreviousVisibleItemCount = (mPreviousVisibleItemCount == -1) ? mCurrentVisibleItemCount + : mPreviousVisibleItemCount; + + checkAndHandleFirstVisibleCellChange(); + checkAndHandleLastVisibleCellChange(); + + mPreviousFirstVisibleItem = mCurrentFirstVisibleItem; + mPreviousVisibleItemCount = mCurrentVisibleItemCount; + } + + @Override + public void onScrollStateChanged(AbsListView view, int scrollState) { + mCurrentScrollState = scrollState; + mScrollState = scrollState; + isScrollCompleted(); + } + + /** + * This method is in charge of invoking 1 of 2 actions. Firstly, if the listview + * is in a state of scrolling invoked by the hover cell being outside the bounds + * of the listview, then this scrolling event is continued. Secondly, if the hover + * cell has already been released, this invokes the animation for the hover cell + * to return to its correct position after the listview has entered an idle scroll + * state. + */ + private void isScrollCompleted() { + if (mCurrentVisibleItemCount > 0 && mCurrentScrollState == SCROLL_STATE_IDLE) { + if (mCellIsMobile && mIsMobileScrolling) { + handleMobileCellScroll(); + } else if (mIsWaitingForScrollFinish) { + touchEventsEnded(); + } + } + } + + /** + * Determines if the listview scrolled up enough to reveal a new cell at the + * top of the list. If so, then the appropriate parameters are updated. + */ + public void checkAndHandleFirstVisibleCellChange() { + if (mCurrentFirstVisibleItem != mPreviousFirstVisibleItem) { + if (mCellIsMobile && mMobileItemId != INVALID_ID) { + updateNeighborViewsForID(mMobileItemId); + handleCellSwitch(); + } + } + } + + /** + * Determines if the listview scrolled down enough to reveal a new cell at the + * bottom of the list. If so, then the appropriate parameters are updated. + */ + public void checkAndHandleLastVisibleCellChange() { + int currentLastVisibleItem = mCurrentFirstVisibleItem + mCurrentVisibleItemCount; + int previousLastVisibleItem = mPreviousFirstVisibleItem + mPreviousVisibleItemCount; + if (currentLastVisibleItem != previousLastVisibleItem) { + if (mCellIsMobile && mMobileItemId != INVALID_ID) { + updateNeighborViewsForID(mMobileItemId); + handleCellSwitch(); + } + } + } + }; + + /** + * Returns the most inner view that contains the xy coordinate. + * + * @param v This method gets called recursively. The initial call should be the root view. + * @param x The X location to be tested. + * @param y The Y location to be tested. + * @return Returns the most inner view that contains the XY coordinate or null if no view could be found. + */ + private View findViewAtPositionWithTag(View v, int x, int y, String tag) { + View vXY = null; + + if (v instanceof ViewGroup) { + ViewGroup viewGroup = (ViewGroup) v; + + for (int i = 0; i < viewGroup.getChildCount(); i++) { + View c = viewGroup.getChildAt(i); + + int loc[] = new int[2]; + c.getLocationOnScreen(loc); + + if ((x >= loc[0] && (x <= (loc[0] + c.getWidth()))) && (y >= loc[1] && (y <= (loc[1] + c.getHeight())))) { + vXY = c; + View viewAtPosition = findViewAtPositionWithTag(c, x, y, tag); + + if ((viewAtPosition != null) && (viewAtPosition.getTag() != null) && viewAtPosition.getTag().equals(tag)) { + vXY = viewAtPosition; + break; + } + } + } + } + + return vXY; + } +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/views/controls/DynamicListViewCallbacks.java b/OsmAnd/src/net/osmand/plus/views/controls/DynamicListViewCallbacks.java new file mode 100644 index 0000000000..982d0d447f --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/views/controls/DynamicListViewCallbacks.java @@ -0,0 +1,9 @@ +package net.osmand.plus.views.controls; + +import java.util.List; + +public interface DynamicListViewCallbacks { + + void onItemsSwapped(final List items); + +} diff --git a/OsmAnd/src/net/osmand/plus/views/controls/StableArrayAdapter.java b/OsmAnd/src/net/osmand/plus/views/controls/StableArrayAdapter.java new file mode 100644 index 0000000000..dc62e52567 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/views/controls/StableArrayAdapter.java @@ -0,0 +1,66 @@ +package net.osmand.plus.views.controls; + +import android.content.Context; +import android.support.annotation.NonNull; +import android.widget.ArrayAdapter; + +import java.util.Collection; +import java.util.HashMap; +import java.util.List; + +public class StableArrayAdapter extends ArrayAdapter { + + final int INVALID_ID = -1; + + List objects; + List activeObjects; + HashMap mIdMap = new HashMap<>(); + + public StableArrayAdapter(Context context, int textViewResourceId, int titleId, + List objects, List activeObjects) { + super(context, textViewResourceId, titleId, objects); + updateObjects(objects, activeObjects); + } + + public List getObjects() { + return objects; + } + + public List getActiveObjects() { + return activeObjects; + } + + public void updateObjects(List objects, List activeObjects) { + this.objects = objects; + this.activeObjects = activeObjects; + + HashMap idMap = new HashMap<>(); + for (int i = 0; i < objects.size(); ++i) { + idMap.put(objects.get(i), i); + } + mIdMap = idMap; + } + + @Override + public Object getItem(int position) { + return objects.get(position); + } + + @Override + public long getItemId(int position) { + if (position < 0 || position >= mIdMap.size()) { + return INVALID_ID; + } + Object item = getItem(position); + if (mIdMap.containsKey(item)) { + return mIdMap.get(item); + } else { + return INVALID_ID; + } + } + + @Override + public boolean hasStableIds() { + return true; + } +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java index 4683e6ae65..7cc18692d4 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java @@ -321,7 +321,7 @@ public class MapInfoWidgetsFactory { boolean updated = updateVisibility(waypointInfoBar, true); // pass top bar to make it clickable WaypointDialogHelper.updatePointInfoView(map.getMyApplication(), map, topBar, - pnt, true, !map.getMyApplication().getSettings().isLightContent()); + pnt, true, !map.getMyApplication().getSettings().isLightContent(), false); if (updated || changed) { ImageView all = (ImageView) waypointInfoBar.findViewById(R.id.waypoint_more); ImageView remove = (ImageView) waypointInfoBar.findViewById(R.id.waypoint_close); From 4494edf79b5c65d585bf5267b480601a29bb88a1 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Fri, 8 Jan 2016 21:07:07 +0300 Subject: [PATCH 10/91] Fixes --- OsmAnd/res/values/strings.xml | 2 ++ OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java | 4 ++-- .../net/osmand/plus/mapcontextmenu/MenuTitleController.java | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index fb2d75e498..d34b9ae2be 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,8 @@ 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 --> + Type + Starting point Not selected Recorder Split Use Recorder Split diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 8ed0da912a..fb7dd9f67f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -102,11 +102,11 @@ public class MapActivityActions implements DialogProvider { TargetPointsHelper targets = getMyApplication().getTargetPointsHelper(); targets.navigateToPoint(new LatLon(latitude, longitude), true, targets.getIntermediatePoints().size() + 1, pd); - openIntermediateEditPointsDialog(); + openIntermediatePointsDialog(); } public void editWaypoints() { - openIntermediateEditPointsDialog(); + openIntermediatePointsDialog(); } private Bundle enhance(Bundle aBundle, double latitude, double longitude, String name) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java index e75aac0bcf..e2179bae7c 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuTitleController.java @@ -143,7 +143,6 @@ public abstract class MenuTitleController { protected void acquireStreetName() { if (searchingAddress) { cancelSearch = true; - searchingAddress = false; getMapActivity().getMyApplication().runInUIThread(new Runnable() { @Override public void run() { From c9fbf9a5cb03538e956b4860a57ce3bd50a97dd9 Mon Sep 17 00:00:00 2001 From: Franco Date: Thu, 7 Jan 2016 02:27:48 +0100 Subject: [PATCH 11/91] Translated using Weblate (Argentinean Spanish) Currently translated at 100.0% (1872 of 1872 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 58a4073272..d383b370b1 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -1828,7 +1828,7 @@ Mapas y navegación \nsin conexión Enviar PDI - Evitar tren de enlace + Evitar trenes de enlace Evite tomar trenes de enlace Complementos Básico From c720496585c3430604543ba8482eec8cfa3c7176 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Wed, 6 Jan 2016 22:41:23 +0100 Subject: [PATCH 12/91] Translated using Weblate (Danish) Currently translated at 100.0% (1872 of 1872 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 e1e9126192..900577daf4 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -2210,8 +2210,8 @@ Omskriv klip når den brugte plads overstiger opbevaring størrelse Kliplængde Længden af hver optaget klip bliver ikke længere end det angivne tidsinterval - Opbevaring størrelse - Mængden af plads, der kan være besat af alle optagede klip + Lagerplads + Mængden af lagerplads, der kan være optaget af alle optagne klip Time Daglig Ugentlig From 34449e4a2429e97e2728c08e398c82a878d0e2bc Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Wed, 6 Jan 2016 21:34:28 +0100 Subject: [PATCH 13/91] Translated using Weblate (French) Currently translated at 99.6% (1865 of 1872 strings) --- OsmAnd/res/values-fr/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 64a361a099..4d63002ccd 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -1,4 +1,5 @@ - + + Modifications hors-ligne Toujours utiliser l\'édition hors-ligne @@ -2097,4 +2098,5 @@ Matin Nuit - \ No newline at end of file +Choisissez un mois et un pays + From 96107701ec2a1cf8cd5700a8669ce24a286c99dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xos=C3=A9=20Calvo?= Date: Fri, 8 Jan 2016 19:07:35 +0100 Subject: [PATCH 14/91] Translated using Weblate (Galician) Currently translated at 94.7% (1774 of 1872 strings) --- OsmAnd/res/values-gl/strings.xml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml index 00500f714f..54ee3a5e8d 100644 --- a/OsmAnd/res/values-gl/strings.xml +++ b/OsmAnd/res/values-gl/strings.xml @@ -1,4 +1,5 @@ -O nome do punto favorito xa está usado; foi cambiado a %1$s para evitar os duplicados. + +O nome do punto favorito xa está usado; foi cambiado a %1$s para evitar os duplicados. Configurar o tamaño da letra no mapa. Tamaño da letra Límite de velocidade @@ -119,7 +120,7 @@ Mostrar os botósn de ampliación durante a navegación Mostrar os botóns de ampliación Gardar como grupo de favoritos - Seleccionar puntos de pasaxe + Seleccionar destinos Nomes dos puntos A cargar %1$s… Hora actual @@ -358,7 +359,7 @@ e ou - O cálculo de rutas sen conexión de OsmAnd pode levar moito tempo (e ás veces non funcionar) para puntos que fiquen a máis de 200 km entre si. Habitualmente axuda engadir puntos de pasaxe intermedios. + O cálculo de rutas sen conexión de OsmAnd pode levar moito tempo (e ás veces non funcionar) para puntos que fiquen a máis de 200 km entre si. Habitualmente axuda engadir destinos intermedios. Sen ampliación automática A primeiro plano A media distancia @@ -408,9 +409,9 @@ Avisos de tráfico Indique o usuario e contrasinal en OSM en Configuración - Limpar os puntos intermedios - Manter os puntos intermedios - Xa hai puntos intermedios. + Limpar os destinos intermedios + Manter os destinos intermedios + Xa hai destinos intermedios. Indicacións para Indicacións desde "Mapa: " @@ -428,7 +429,7 @@ Seleccione primeiro a cidade ou rúa Buscar a rúa nas poboacións viciñas - Os puntos de pasaxe intermedios foron reordenados para optimizar a ordenación de camiño ao destino. + Os destinos intermedios foron reordenados para optimizar a ordenación de camiño ao destino. Ordenar porta a porta O ficheiro de cambios de OSM foi xerado correctamente %1$s Fallou a creación da copia de seguranza dos cambios de OSM @@ -500,7 +501,7 @@ Curvas de nivel Datos de son/vídeo Confirma que desexa parar a navegación? - Confirma que desexa limpar o punto de destino (e os puntos de pasaxe)? + Confirma que desexa limpar o punto de destino (e os destinos intermedios)? Permitir calcular rutas precisas sen fallo. Aínda se ve limitado polas distancias e é lento. Cálculo de rutas preciso (alfa) Mostrar @@ -596,8 +597,8 @@ Servizos de rexistro Sen itinerario - Retirar o punto de pasaxe - Punto de pasaxe %1$s + Retirar o destino + Destino %1$s Punto de pasaxe %1$s Engadir como punto de pasaxe final Engadir como primeiro punto de pasaxe @@ -1966,4 +1967,4 @@ Engadir un comentario Reabrir nota Pechar a nota - \ No newline at end of file + From 1e88eae66aac5286ebf23f3b0cc9ee1df7f49f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20B=C3=A1thory?= Date: Fri, 8 Jan 2016 15:56:08 +0100 Subject: [PATCH 15/91] Translated using Weblate (Hungarian) Currently translated at 99.6% (1865 of 1872 strings) --- OsmAnd/res/values-hu/strings.xml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml index 297002275e..4db3060958 100644 --- a/OsmAnd/res/values-hu/strings.xml +++ b/OsmAnd/res/values-hu/strings.xml @@ -1,4 +1,5 @@ - + + GPX fájl küldése OSM-re? Láthatóság Címkék @@ -179,7 +180,7 @@ Online Nominatim Pozíció keresése… - Pozíció [Megtalálva] + Pozícióm (megtalálva) Cím… Kedvencek… Meghatározatlan @@ -878,7 +879,7 @@ Lépték Látómező - Átlátszó téma + Átlátszó gombok GPS helymeghatározási időköz: %s @@ -2067,4 +2068,14 @@ Frissítési gyakoriság Az alkalmazásnak nincs jogosultsága elérni az SD kártyát. Utolsó frissítés: %s - \ No newline at end of file +Nincs kiválasztva + Frissítés ideje + Frissítés mérete + Utolsó térképmódosítás: %s + Óránként + Naponta + Hetente + Reggel + Este + Hónap és ország kiválasztása + From 578472b211af8bb6cf1c75e0414de4245aab6fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nesim=20=C4=B0=C5=9E?= Date: Fri, 8 Jan 2016 08:09:57 +0100 Subject: [PATCH 16/91] Translated using Weblate (Kurdish) Currently translated at 3.5% (66 of 1872 strings) --- OsmAnd/res/values-ku/strings.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-ku/strings.xml b/OsmAnd/res/values-ku/strings.xml index 89f4b5e61e..9e737c36ba 100644 --- a/OsmAnd/res/values-ku/strings.xml +++ b/OsmAnd/res/values-ku/strings.xml @@ -1,4 +1,5 @@ - + + زانیاری دەنگ/ڤیدیۆ دڵنیای له وەی که ئه ته وێت ناڤیگێشن راگریت @@ -64,4 +65,6 @@ û Sazkirin Nexeyen kû hane - \ No newline at end of file + Berfireh + Veşera + From b11dfdc99ddce2823c556e62433b35bb5c1a5d40 Mon Sep 17 00:00:00 2001 From: Onkar Shinde Date: Thu, 7 Jan 2016 21:19:34 +0100 Subject: [PATCH 17/91] Translated using Weblate (Marathi) Currently translated at 24.1% (452 of 1872 strings) --- OsmAnd/res/values-mr/strings.xml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/OsmAnd/res/values-mr/strings.xml b/OsmAnd/res/values-mr/strings.xml index eb6c02e849..aa38d1b318 100644 --- a/OsmAnd/res/values-mr/strings.xml +++ b/OsmAnd/res/values-mr/strings.xml @@ -1,9 +1,10 @@ -डाव्या बाजूने ड्रायव्हिंग + +डाव्या बाजूने ड्रायव्हिंग अजून स्थान माहित नाही पारदर्शकता बदला (० - पारदर्शक, २५५ - अपारदर्शक) फाइल डाउनलोड थांबवायचे का? ऑनलाइन नकाशे (टाइल्स) - ऑफलाइन नकाशे (वेक्टर) + साधारण नकाशे (वेक्टर) ऑनलाइन नकाशे (टाइल्स) ऑनलाइन नकाशे वापरा (डाउनलोड करून एसडी कार्ड वार साठवा) ऑनलाइन नकाशे @@ -78,10 +79,10 @@ युरोप युरोप - फ्रान्स युरोप - जर्मनी - युरोप/आशिया - रशिया + रशिया अफ्रिका आशिया - ओशेनिया + ऑस्ट्रेलिया आणि ओशेनिया विकिपेडिया (ऑफलाइन) दिशादर्शन @@ -109,7 +110,7 @@ नाव बदला स्थान शोधत आहे … - स्थान (सापडले) + माझे स्थान (सापडले) पत्ता … आवडती ठिकाणे… @@ -353,7 +354,7 @@ प्रथम शहर किंवा रस्ता निवडा वेळ अचूकपणा - रस्ता + रस्त्याचे नाव घर क्रमांक पत्ता निवडा जिपिएस माहिती @@ -384,8 +385,8 @@ इतर नकाशे फक्त रस्ते - साधारण नकाशे - फक्त रस्त्याचे नकाशे + साधारण नकाशा + फक्त रस्त्याचा नकाशा सीमा लपवा वेग मर्यादा @@ -508,4 +509,4 @@ नकाशे डाउनलोड करा सद्ध्याचा मार्ग वापरू नका - \ No newline at end of file + From bde5de86b36ac8485b3be0bd043fb907b71092a8 Mon Sep 17 00:00:00 2001 From: Hugo Barrocas Date: Thu, 7 Jan 2016 21:28:39 +0100 Subject: [PATCH 18/91] Translated using Weblate (Portuguese) Currently translated at 80.0% (1498 of 1872 strings) --- OsmAnd/res/values-pt/strings.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-pt/strings.xml b/OsmAnd/res/values-pt/strings.xml index 0fe39b0a24..9172fe96ab 100644 --- a/OsmAnd/res/values-pt/strings.xml +++ b/OsmAnd/res/values-pt/strings.xml @@ -1,4 +1,5 @@ -Administrativo + +Administrativo Barreira Educação Emergência @@ -1967,4 +1968,10 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A Um utilizador anónimo não pode:\n- Criar grupos;\n- Sincronizar grupos e dispositivos com o servidor;\n- Gerir grupos e dispositivos num escritório privado. Utilizador anónimo Ligado como %1$s - \ No newline at end of file + Não seleccionado + Escolha Mês e País +Tamanho das actualizações + Modificar edição OSM + Usar Painel + Usar Menú + From b6031629b17d33dbc56f6dc84c81584f2ee83508 Mon Sep 17 00:00:00 2001 From: Ajeje Brazorf Date: Thu, 7 Jan 2016 03:07:17 +0100 Subject: [PATCH 19/91] Translated using Weblate (Sardinian) Currently translated at 99.8% (1870 of 1872 strings) --- OsmAnd/res/values-sc/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index c3dd9ff9af..1f40d7782f 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -1,4 +1,5 @@ - + + Ammustra sa positzione semper a su tzentru Boghe Mistura @@ -2073,4 +2074,5 @@ Note Mannària agiornamentos - \ No newline at end of file + Ischerta mese e istadu + From 28bd11f795fc36e20032a3720fe43965d95729c5 Mon Sep 17 00:00:00 2001 From: Leif Larsson Date: Wed, 6 Jan 2016 23:21:34 +0100 Subject: [PATCH 20/91] Translated using Weblate (Swedish) Currently translated at 99.1% (1857 of 1872 strings) --- OsmAnd/res/values-sv/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index 375d8f040b..6a86a4dcf3 100644 --- a/OsmAnd/res/values-sv/strings.xml +++ b/OsmAnd/res/values-sv/strings.xml @@ -1,4 +1,5 @@ - + + För att låsa upp skärmen tryck på låsikonen Välj land Välj stad @@ -2057,4 +2058,5 @@ Varje vecka Morgon Inte markerad - \ No newline at end of file + Välj månad och land + From 361dbbc69f31e95909e00a67fc296f1ca5b8d1cd Mon Sep 17 00:00:00 2001 From: Olexandr Nesterenko Date: Thu, 7 Jan 2016 17:16:06 +0100 Subject: [PATCH 21/91] Translated using Weblate (Ukrainian) Currently translated at 98.8% (1850 of 1872 strings) --- OsmAnd/res/values-uk/strings.xml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index 283791942d..bbc1ab0d80 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -1,4 +1,5 @@ - + + Швидко Круговий рух : %1$d з’їзд @@ -243,7 +244,7 @@ Nominatim (Інтернет) Пошук позиції… - Точка (знайдена) + Моя позиція (знайдена) Адреса… Закладки… Невизначено @@ -1054,7 +1055,7 @@ Флуоресцентні маршрути Лінійка - Прозорість + Прозорість віджетів Інтервал пробудження GPS: %s @@ -2222,5 +2223,19 @@ OsmAnd має відкриті сирці і активно розвиваєть Додаток не має дозволу на використання камери. Додаток не має дозволу на використання мікрофону. Відстань: - Час в дорозі: - \ No newline at end of file + Час: + Розмір сховища + Автоматичні оновлення + Доступні мапи + Виберіть голосові вказівки + Виберіть або завантажте голосові вказівки для вашої мови + Виберіть дороги, яких ви бажаєте уникати під час навігації + Звук + POI буде видалено після того, як ви завантажите ваші зміни + Ви впевнені, що бажаєте завантажити карти доріг при наяаності стандартної (повної) мапи? + Додаток не має дозволу для запису на SD-карту + Останнє оновлення: %s + Остання зміна мапи: %s + Щогодинно + Щоденно + From 7dcc562863fd1f85953ff7c567372b09a4c083a6 Mon Sep 17 00:00:00 2001 From: Franco Date: Thu, 7 Jan 2016 02:15:54 +0100 Subject: [PATCH 22/91] Translated using Weblate (Argentinean Spanish) Currently translated at 100.0% (2363 of 2363 strings) --- OsmAnd/res/values-es-rAR/phrases.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/OsmAnd/res/values-es-rAR/phrases.xml b/OsmAnd/res/values-es-rAR/phrases.xml index 117cfaefae..6642f9a26e 100644 --- a/OsmAnd/res/values-es-rAR/phrases.xml +++ b/OsmAnd/res/values-es-rAR/phrases.xml @@ -202,17 +202,17 @@ Entrada del estacionamiento Garajes - Andén de transporte público - Andén de colectivo - Andén de trolebús + Parada de transporte público + Parada de colectivo + Parada de trolebús Parada de colectivo Punto de detención de transporte público - Andén de tranvía + Parada de tranvía Parada de tranvía Estación de transporte público Estación de colectivo Estación de tren - Andén de tren + Parada de tren Parada de tren Entrada de subte Estación de subte @@ -1017,8 +1017,8 @@ Heladeras y congeladores Muebles Pañales - Baterías de autos - Autos + Baterías de automóviles + Automóviles Bicicletas Duchas @@ -1659,7 +1659,7 @@ Sin cambiador de pañales Habitación para cambio de pañales -Lavado de autos: No +Sin lavadero de automóviles Estadía máxima @@ -1944,8 +1944,8 @@ No alquila bicicletas Infla de bicicletas No infla bicicletas - Autoservicio para bicicletas - Sin autoservicio de herramientas para bicicletas + Con autoservicio para bicicletas + Sin autoservicio para bicicletas Limpia bicicletas No limpia bicicletas Con herramientas para cadenas de bicicletas From 2dbee2c2160e6776af98745a0d70aad9f64bf104 Mon Sep 17 00:00:00 2001 From: Onkar Shinde Date: Thu, 7 Jan 2016 21:00:43 +0100 Subject: [PATCH 23/91] Translated using Weblate (Marathi) Currently translated at 2.6% (63 of 2363 strings) --- OsmAnd/res/values-mr/phrases.xml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/OsmAnd/res/values-mr/phrases.xml b/OsmAnd/res/values-mr/phrases.xml index 43fff4934a..39e5969312 100644 --- a/OsmAnd/res/values-mr/phrases.xml +++ b/OsmAnd/res/values-mr/phrases.xml @@ -36,4 +36,32 @@ पडद्याचे दुकान फुलांचे दुकान फर्निचर + ज्युदो + बॅडमिंटन + मायक्रोव्हेव ओवन: हो + मायक्रोव्हेव ओवन: नाही + बिलियर्डस + + खाद्य + आर्थिक + सैन्य + मिठाई + आइसक्रीम पार्लर + चपलांचे दुकान + मेणबत्त्यांचे दुकान + दरवाजे + भेटवस्तूंचे दुकान + वनौषधी दुकान + शिकारीचे साहित्य + दागिन्याचे दुकान + वैद्यकीय पुरवठा + वाद्ये + संगीत दुकान + रंगाचे दुकान + पाळीव प्राण्यांचे दुकान + खेळण्यांचे दुकान + सौंदर्य प्रसाधने + घड्याळांचे दुकान + शस्त्रांचे दुकान + पोलिस From 7ae75fc2603e2f8b1262f1b50691c6c6cb47c91a Mon Sep 17 00:00:00 2001 From: Ajeje Brazorf Date: Fri, 8 Jan 2016 05:56:26 +0100 Subject: [PATCH 24/91] Translated using Weblate (Sardinian) Currently translated at 73.3% (1733 of 2363 strings) --- OsmAnd/res/values-sc/phrases.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-sc/phrases.xml b/OsmAnd/res/values-sc/phrases.xml index eb0043eea0..a03e5b3e06 100644 --- a/OsmAnd/res/values-sc/phrases.xml +++ b/OsmAnd/res/values-sc/phrases.xml @@ -269,7 +269,7 @@ Rugby a 13 Patinàgiu Skateboard - Fubalu + Fùbalu Piscina Tennis Toboga @@ -1888,4 +1888,14 @@ Ispetzializatzione mèiga: biochìmica clìnica Nùmene ufitziale - +Giogos gaèlicos + Cursa + Netball + Karting + Bàdminton + Judo + Disc golf + Fùbalu a 5 + Pugiladu (boxe) + + From af9cd54669ea952654a352ed23a1edbd7c3a1e61 Mon Sep 17 00:00:00 2001 From: Roberto GEB Date: Fri, 8 Jan 2016 17:41:18 +0100 Subject: [PATCH 25/91] Translated using Weblate (Spanish) Currently translated at 100.0% (2363 of 2363 strings) --- OsmAnd/res/values-es/phrases.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/values-es/phrases.xml b/OsmAnd/res/values-es/phrases.xml index a329773c3b..5e904a43b5 100644 --- a/OsmAnd/res/values-es/phrases.xml +++ b/OsmAnd/res/values-es/phrases.xml @@ -75,7 +75,7 @@ Muebles de cocina Artículos médicos Tienda de telefonía móvil - Motocicletas + Tienda de motocicletas Instrumentos musicales Agencia de noticias Óptica @@ -378,7 +378,7 @@ Verdulería Alimentos frescos Máquina expendedora - Bicicletería + Tienda de bicicletas Higiene personal y del hogar Tienda de anime Boutique de moda @@ -392,7 +392,7 @@ Ropa infantil Zapatería Tienda de fotocopiado - Cortinas + Tienda de cortinas Mejoras para el hogar Equipos de pesca Tienda de marcos @@ -403,7 +403,7 @@ Tienda de radiotecnia Tabaquería Aspiradoras - Costuras + Tienda de telas Contenedor de arena Cojín From 9f7a592a93fe2b3ad053061cdebc347d9f43dbe6 Mon Sep 17 00:00:00 2001 From: Olexandr Nesterenko Date: Thu, 7 Jan 2016 19:14:49 +0100 Subject: [PATCH 26/91] Translated using Weblate (Ukrainian) Currently translated at 13.7% (324 of 2363 strings) --- OsmAnd/res/values-uk/phrases.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-uk/phrases.xml b/OsmAnd/res/values-uk/phrases.xml index 01ca4aa725..e97f9abce1 100644 --- a/OsmAnd/res/values-uk/phrases.xml +++ b/OsmAnd/res/values-uk/phrases.xml @@ -343,4 +343,5 @@ Комп\'ютери Покришки Телевізори, монітори - + Пішохідні/велосипедні вузли маршрутів + From 945b08a5535a8e8d48be26773ba0cfeda6ab642f Mon Sep 17 00:00:00 2001 From: Franco Date: Fri, 8 Jan 2016 19:19:22 +0100 Subject: [PATCH 27/91] Translated using Weblate (Argentinean Spanish) Currently translated at 100.0% (1874 of 1874 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index d383b370b1..e259f4abbb 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -2040,4 +2040,6 @@ No seleccionado Elige mes y país - +Tipo + Punto de partida + From bc28d59b683c2418bb471b97a285fc48422806d3 Mon Sep 17 00:00:00 2001 From: Adriano Rosa Date: Fri, 8 Jan 2016 19:26:20 +0100 Subject: [PATCH 28/91] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1874 of 1874 strings) --- OsmAnd/res/values-pt-rBR/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index e43770afb9..3b9dadf5da 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -1986,4 +1986,6 @@ À noite Nada selecionado Selecione o mês e o país - +Tipo + Ponto de partida + From a1e88cf17ad3e832f13ece51d467214c44a90c01 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Fri, 8 Jan 2016 21:35:16 +0300 Subject: [PATCH 29/91] Fix --- OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java | 1 - 1 file changed, 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java index 33804049cc..8bed18cb2e 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java @@ -474,7 +474,6 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL addAsTargetAction.dlg.setButton(Dialog.BUTTON_NEGATIVE, mapActivity.getResources().getString(R.string.shared_string_skip), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { cancelSearch = true; - searchingAddress = false; } }); addAsTargetAction.dlg.show(); From 4017d11feea572228ca1b4436409ce9e69079ea7 Mon Sep 17 00:00:00 2001 From: Franco Date: Fri, 8 Jan 2016 19:20:11 +0100 Subject: [PATCH 30/91] Translated using Weblate (Argentinean Spanish) Currently translated at 100.0% (1874 of 1874 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 e259f4abbb..583846db08 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -2023,7 +2023,7 @@ Tiempo de actualización -Dividir grabación +División de grabación Usar la división de grabación Reescribir clips al exceder el espacio de almacenamiento utilizado Duración del clip From e36d0797c212263952793ccab81f6aab039f3ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xos=C3=A9=20Calvo?= Date: Fri, 8 Jan 2016 19:34:28 +0100 Subject: [PATCH 31/91] Translated using Weblate (Galician) Currently translated at 96.5% (1810 of 1874 strings) --- OsmAnd/res/values-gl/strings.xml | 64 +++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml index 54ee3a5e8d..49341a7c54 100644 --- a/OsmAnd/res/values-gl/strings.xml +++ b/OsmAnd/res/values-gl/strings.xml @@ -599,19 +599,19 @@ Sen itinerario Retirar o destino Destino %1$s - Punto de pasaxe %1$s - Engadir como punto de pasaxe final - Engadir como primeiro punto de pasaxe - Engadir como punto de pasaxe final - Engadir como primeiro punto de pasaxe + Destino %1$s + Engadir como último destino intermedio + Engadir como primeiro destino intermedio + Engadir como último destino intermedio + Engadir como primeiro destino intermedio Substituír o punto de destino O punto de destino xa existe. - Puntos de pasaxe - O punto de pasaxe %1$s está demasiado lonxe da estrada máis próxima. - Chegou ao punto de pasaxe - Engadir un punto de pasaxe - Punto de pasaxe + Destinos + O destino intermedio %1$s está demasiado lonxe da estrada máis próxima. + Chegou ao destino intermedio + Engadir un destino intermedio + Destino intermedio O punto final está demasiado lonxe da estrada máis próxima. Engadir unha etiqueta Modo avanzado… @@ -641,11 +641,11 @@ Mapas e navegación OsmAnd Visualización e navegación móbil de mapas globais para mapas de OSM con e sen conexión " OsmAnd (Indicacións de navegación automatizadas de OSM) OsmAnd é un aplicativo de navegación de código aberto con acceso a unha ampla variedade de datos globais de OpenStreetMap (OSM). Todos os mapas dos datos (mapas vectoriais ou teselas) poden ser almacenados no cartón de memoria do teléfono para empregalos sen conexión. OsmAnd tamen ofrece funcionalidade de cálculo de rutas sen conexión, incluíndo a guía por voz paso a paso. Algunhas das funcionalidade principais: - Funcionalidade completa sen conexión (os mapas vectoriais ou de teselas descargados almacénanse no cartafol que se seleccione) - Mapas vectoriais compactos sen conexión para todo o mundo - Pódense descargar mapas de países ou rexións directamente desde o aplicativo - É posíbel sobrepor varias capas de mapas, como pistas de GPX ou de navegación, puntos de interese, favoritos, curvas de nivel, paradas de transporte público ou mapas adicionais con transparencia regulábel. - Busca sen conexión de enderezos e lugares (PDI) - Cálculo de rutas sen conexión para distancias curtas (experimental) - Modos para coche, bicicleta e péons, con: - Vistas diúrna e nocturna automatizadas opcionais - Ampliación opcional do mapa dependendo da velocidade - Aliñamento opcional do mapa dependendo do compás ou da dirección do movemento - Guía opcional de faixas da estrada, límites de velocidade e voces gravadas e TTS Limitacións desta versión gratuíta de OsmAnd: - O número de mapas descargados está limitado - Non hai acceso aos puntos de interese (PDI) da Wikipedia sen conexión OsmAnd está a ser desenvolvido activamente e o noso proxecto e o seu progreso futuro depende da contribución financeira para financiar o desenvolvemento e as probas das funcionalidades novas. Considere a posibilidade de comprar OsmAnd+ ou de financiar funcionalidades novas específicas ou de realizar unha doazón xeral en osmand.net. " - " OsmAnd (OSM Automated Navigation Directions, «Indicacións de navegación automatizadas de OSM») é un aplicativo de mapas e de navegación con acceso aos datos libres, mundiais e de alta calidade de OpenStreetMap (OSM). Todos os datos dos mapas poden ser almacenados no cartón de memoria dos dispositivos para empregalos sen conexión. Mediante o GPS do dispositivo, OsmAnd ofrece cálculo de rutas con guía visual e de voz para coches, bicicletas e peóns. Todas as funcionalidades funcionan tanto con conexión como sen conexión (non se precisa da Internet). Algunhas das funcionalidades principais: Navegación - Funciona con conexión (rápido) ou sen conexión (sen cobros telefónicos no estranxeiro) - Guía por voz paso a paso (voces gravadas e sintetizadas) - Guía opcional nas faixas das estradas, nomes das rúas e hora estimada de chegada - Admite puntos intermedios no itinerario - Recalcula as rutas automaticamente cando se producen desvíos da ruta - Busca de lugares por enderezo, por tipo (p.ex. restaurante, hotel, gasolineira, museo) ou por coordenadas xeográficas Vista de mapa - Mostra a posición e orientación no mapa - Aliña opcionalmente o mapa co compás ou coa dirección do movemento - Garda os lugares máis importantes como «favoritos» - Mostra os puntos de interese (PDI) que haxa preto - Pode mostrar mapas de teselas especializados con conexión - Pode mostrar a vista de satélite (de Bing) - Pode mostrar diferentes sobreposición, como pistas de GPX de visitas ou navegación e mapas adicionais con transparencia regulábel - Pode mostrar os mapas opcionalmente en inglés, na lingua local ou escritas de maneira fonética Uso dos datos de OpenStreetMap e da Wikipedia - Información de boa calidade procedente dos mellores proxectos colaborativos do mundo - Mapas globais procedentes de OpenStreetMap, dispoñíbeis por país ou rexión - Puntos de interese da Wikipedia, óptimos para facer visitas (non dispoñíbeis na versión gratuíta) - Descarga gratuíta ilimitada directamente desde o aplicativo (o límite de descargas é de dezaseis na versión gratuíta) - Mapas sempre actualizados (actualizados cando menos unha vez ao mes) - Mapas vectoriais sen conexións compactos - Selección entre os datos completos dos mapas ou só a rede viaria (Exemplo: Xapón completo son 700 MB mais a rede viaria ocupa só 200 MB) - Tamén admite mapas de teselas con conexión ou na caché Funcionalidades de seguranza - Vistas diúrna e nocturna automatizadas opcionais - Límites de velocidade opcionais, con recordatorio se se exceden - Ampliación opcional do mapa dependente da velocidade - Pódese compartir a situación para que as amizades podan localizalo Funcionalidades para bicicletas e peóns - Os mapas inclúen pistas para peóns, sendeirismo, óptimos para actividades ao ar libre - Modos especiais de cálculo de rutas e pantalla para bicicletas e peóns - Paradas de transporte público opcionais (bus, tranvía, tren), incluídos os nomes das liñas - Gravación opcional das viaxes nun ficheiro GPX local ou nun servizo con conexión - Visualización opcional da velocidade e a altitude - Visualización das curvas de nivel e o sombreado (cun engadido adicional) Achegas directas a OpenStreetMap - Informes de fallos nos mapas - Envío de pistas GPX a OSM directamente desde o aplicativo - Adición de puntos de interese e envío automático a OSM (ou posteriormente, se non houber conexión) - Gravación opcional das viaxes tamén no modo de fondo (mentres o dispositivo está en modo de durmir) OsmAnd é código aberto e está a ser desenvolvido activamente. Calquera pode contribuír co aplicativo informando de fallos, mellorando as traducións ou escribindo código para funcionalidades novas. O proxecto está nun estado vivo de mellora continua mediante todo esas formas de interacción entre desenvolvedores e usuarios. O progreso tamén depende da contribución financeira para financiar o desenvolvemento, o código e as probas das funcionalidades novas. Ao comprar OmsAnd+ axúdase a que o aplicativo sexa aínda mellor. Tamén é posíbel financiar funcionalidades novas específicas ou de realizar unha doazón xeral en osmand.net. Cobertura e calidade aproximada dos mapas: - Europa Occidental: **** - Europa Oriental: *** - Rusia: *** - Norteamérica: *** - Sudamérica: ** - Asia: ** - Xapón e Corea: *** - Oriente Medio: ** - África: ** - Antártida: * Lista de países (basicamente todo o mundo!): Afganistán, Albania, Algeria, Andorra, Angola, Anguilla, Antigua e Barbuda, Arxentina, Armenia, Aruba, Australia, Austria, Azerbaixán, Bahamas, Bahrain, Bangladesh, Barbados, Bielorrusia, Bélxica, Belize, Benin, Bermuda, Bhutan, Bolivia, Bonaire, Bosnia e Herzegovina, Botswana, Brasil, Illas Virxes Británicas, Brunei, Bulgaria, Burkina Faso, Burundi, Camboxa, Camerún, Canadá, Cabo Verde, República Centroafricana, Chad, Chile, China, Colombia, Comoros, Congo, Costa Rica, Costa de Marfín, Croacia, Cuba, Curaçao, Cyprus, República Checa, Dinamarca, Xibuti, Dominica, República Dominicana, Ecuador, Exipto, El Salvador, Guiné Ecuatorial, Eritrea, Estonia, Etiopía, Fixi, Finlandia, Francia, Guiana Francesa, Polinesia Francesa, Gabón, Gambia, Xeorgia, Alemaña , Ghana, Xibraltar, Grecia, Groenland, Granada, Guadalupe, Guam, Guatemala, Guernsey, Guiné, Guiné-Bissau, Guyana, Haití, Vaticano, Honduras, Hong Kong, Hungría, Islandia, India, Indonesia, Iran, Iraq, Irlanda, Illa de Man, Israel, Italia, Xamaica, Xapón, Jersey, Xordania, Kazakhstan, Kenia, Kiribati, Corea do Norte e Corea do Sur, Kuwait, Quirgizstan, Laos, Letonia, Líbano, Lesotho, Liberia, Libia, Liechtenstein, Lituania, Luxemburgo, Macao, Macedonia, Madagascar, Malawi, Malasia, Maldivas, Mali, Malta, Martinica, Mauritania, Mauricio, Mayotte, México, Micronesia, Moldavia, Mónaco, Mongolia, Montenegro, Montserrat, Marrocos, Mozambique, Myanmar, Namibia, Nauru, Nepal, Países Baixos, Antillas Holandesas, Nova Caledonia, Nova Celandia, Nicaragua, Níxer, Nixeria, Noruega, Oman, Paquistán, Palau, Territorio Palestino, Panamá, Papua New Guinea, Paraguai, Perú, Filipinas, Polonia, Portugal, Puerto Rico, Qatar, Rumanía, Rusia, Ruanda, San Bartolomeu, Santa Helena, Saint Kitts e Nevis, Santa Lucía, San Martin, Saint Pierre e Miquelon, Saint Vincent e as Granadinas, Samoa, San Marino, Arabia Saudi, Senegal, Serbia, Seychelles, Serra Leoa, Singapur, Eslovaquia, Eslovenia, Somalia, Sudáfrica, Xeorxia do Sul, Sudán do Sul, España, Sri Lanka, Sudán, Surinam, Swazilandia, Suecia, Suíza, Siria, Taiwan, Taxikistan, Tanzania, Tailandia, Timor-Leste, Togo, Tokelau, Tonga, Trindade e Tobago, Tunicia, Turquía, Turcomenistan, Tuvalu, Uganda, Ucraína, Emiratos Árabes Unidos, Reino Unido (UK), Estados Unidos de América (USA), Uruguai, Uzbekistan, Vanuatu, Venezuela, Vietnam, Wallis e Futuna, Sáhara Occidental, Iemen, Zambia, Zimbabwe. " + " OsmAnd (OSM Automated Navigation Directions, «Indicacións de navegación automatizadas de OSM») é un aplicativo de mapas e de navegación con acceso aos datos libres, mundiais e de alta calidade de OpenStreetMap (OSM). Todos os datos dos mapas poden ser almacenados no cartón de memoria dos dispositivos para empregalos sen conexión. Mediante o GPS do dispositivo, OsmAnd ofrece cálculo de rutas con guía visual e de voz para coches, bicicletas e peóns. Todas as funcionalidades funcionan tanto con conexión como sen conexión (non se precisa da Internet). Algunhas das funcionalidades principais: Navegación - Funciona con conexión (rápido) ou sen conexión (sen cobros telefónicos no estranxeiro) - Guía por voz paso a paso (voces gravadas e sintetizadas) - Guía opcional nas faixas das estradas, nomes das rúas e hora estimada de chegada - Admite destinos intermedios no itinerario - Recalcula as rutas automaticamente cando se producen desvíos da ruta - Busca de lugares por enderezo, por tipo (p.ex. restaurante, hotel, gasolineira, museo) ou por coordenadas xeográficas Vista de mapa - Mostra a posición e orientación no mapa - Aliña opcionalmente o mapa co compás ou coa dirección do movemento - Garda os lugares máis importantes como «favoritos» - Mostra os puntos de interese (PDI) que haxa preto - Pode mostrar mapas de teselas especializados con conexión - Pode mostrar a vista de satélite (de Bing) - Pode mostrar diferentes sobreposición, como pistas de GPX de visitas ou navegación e mapas adicionais con transparencia regulábel - Pode mostrar os mapas opcionalmente en inglés, na lingua local ou escritas de maneira fonética Uso dos datos de OpenStreetMap e da Wikipedia - Información de boa calidade procedente dos mellores proxectos colaborativos do mundo - Mapas globais procedentes de OpenStreetMap, dispoñíbeis por país ou rexión - Puntos de interese da Wikipedia, óptimos para facer visitas (non dispoñíbeis na versión gratuíta) - Descarga gratuíta ilimitada directamente desde o aplicativo (o límite de descargas é de dezaseis na versión gratuíta) - Mapas sempre actualizados (actualizados cando menos unha vez ao mes) - Mapas vectoriais sen conexións compactos - Selección entre os datos completos dos mapas ou só a rede viaria (Exemplo: Xapón completo son 700 MB mais a rede viaria ocupa só 200 MB) - Tamén admite mapas de teselas con conexión ou na caché Funcionalidades de seguranza - Vistas diúrna e nocturna automatizadas opcionais - Límites de velocidade opcionais, con recordatorio se se exceden - Ampliación opcional do mapa dependente da velocidade - Pódese compartir a situación para que as amizades podan localizalo Funcionalidades para bicicletas e peóns - Os mapas inclúen pistas para peóns, sendeirismo, óptimos para actividades ao ar libre - Modos especiais de cálculo de rutas e pantalla para bicicletas e peóns - Paradas de transporte público opcionais (bus, tranvía, tren), incluídos os nomes das liñas - Gravación opcional das viaxes nun ficheiro GPX local ou nun servizo con conexión - Visualización opcional da velocidade e a altitude - Visualización das curvas de nivel e o sombreado (cun engadido adicional) Achegas directas a OpenStreetMap - Informes de fallos nos mapas - Envío de pistas GPX a OSM directamente desde o aplicativo - Adición de puntos de interese e envío automático a OSM (ou posteriormente, se non houber conexión) - Gravación opcional das viaxes tamén no modo de fondo (mentres o dispositivo está en modo de durmir) OsmAnd é código aberto e está a ser desenvolvido activamente. Calquera pode contribuír co aplicativo informando de fallos, mellorando as traducións ou escribindo código para funcionalidades novas. O proxecto está nun estado vivo de mellora continua mediante todo esas formas de interacción entre desenvolvedores e usuarios. O progreso tamén depende da contribución financeira para financiar o desenvolvemento, o código e as probas das funcionalidades novas. Ao comprar OmsAnd+ axúdase a que o aplicativo sexa aínda mellor. Tamén é posíbel financiar funcionalidades novas específicas ou de realizar unha doazón xeral en osmand.net. Cobertura e calidade aproximada dos mapas: - Europa Occidental: **** - Europa Oriental: *** - Rusia: *** - Norteamérica: *** - Sudamérica: ** - Asia: ** - Xapón e Corea: *** - Oriente Medio: ** - África: ** - Antártida: * Lista de países (basicamente todo o mundo!): Afganistán, Albania, Algeria, Andorra, Angola, Anguilla, Antigua e Barbuda, Arxentina, Armenia, Aruba, Australia, Austria, Azerbaixán, Bahamas, Bahrain, Bangladesh, Barbados, Bielorrusia, Bélxica, Belize, Benin, Bermuda, Bhutan, Bolivia, Bonaire, Bosnia e Herzegovina, Botswana, Brasil, Illas Virxes Británicas, Brunei, Bulgaria, Burkina Faso, Burundi, Camboxa, Camerún, Canadá, Cabo Verde, República Centroafricana, Chad, Chile, China, Colombia, Comoros, Congo, Costa Rica, Costa de Marfín, Croacia, Cuba, Curaçao, Cyprus, República Checa, Dinamarca, Xibuti, Dominica, República Dominicana, Ecuador, Exipto, El Salvador, Guiné Ecuatorial, Eritrea, Estonia, Etiopía, Fixi, Finlandia, Francia, Guiana Francesa, Polinesia Francesa, Gabón, Gambia, Xeorgia, Alemaña , Ghana, Xibraltar, Grecia, Groenland, Granada, Guadalupe, Guam, Guatemala, Guernsey, Guiné, Guiné-Bissau, Guyana, Haití, Vaticano, Honduras, Hong Kong, Hungría, Islandia, India, Indonesia, Iran, Iraq, Irlanda, Illa de Man, Israel, Italia, Xamaica, Xapón, Jersey, Xordania, Kazakhstan, Kenia, Kiribati, Corea do Norte e Corea do Sur, Kuwait, Quirgizstan, Laos, Letonia, Líbano, Lesotho, Liberia, Libia, Liechtenstein, Lituania, Luxemburgo, Macao, Macedonia, Madagascar, Malawi, Malasia, Maldivas, Mali, Malta, Martinica, Mauritania, Mauricio, Mayotte, México, Micronesia, Moldavia, Mónaco, Mongolia, Montenegro, Montserrat, Marrocos, Mozambique, Myanmar, Namibia, Nauru, Nepal, Países Baixos, Antillas Holandesas, Nova Caledonia, Nova Celandia, Nicaragua, Níxer, Nixeria, Noruega, Oman, Paquistán, Palau, Territorio Palestino, Panamá, Papua New Guinea, Paraguai, Perú, Filipinas, Polonia, Portugal, Puerto Rico, Qatar, Rumanía, Rusia, Ruanda, San Bartolomeu, Santa Helena, Saint Kitts e Nevis, Santa Lucía, San Martin, Saint Pierre e Miquelon, Saint Vincent e as Granadinas, Samoa, San Marino, Arabia Saudi, Senegal, Serbia, Seychelles, Serra Leoa, Singapur, Eslovaquia, Eslovenia, Somalia, Sudáfrica, Xeorxia do Sul, Sudán do Sul, España, Sri Lanka, Sudán, Surinam, Swazilandia, Suecia, Suíza, Siria, Taiwan, Taxikistan, Tanzania, Tailandia, Timor-Leste, Togo, Tokelau, Tonga, Trindade e Tobago, Tunicia, Turquía, Turcomenistan, Tuvalu, Uganda, Ucraína, Emiratos Árabes Unidos, Reino Unido (UK), Estados Unidos de América (USA), Uruguai, Uzbekistan, Vanuatu, Venezuela, Vietnam, Wallis e Futuna, Sáhara Occidental, Iemen, Zambia, Zimbabwe. " Mapas e navegación de OsmAnd+ Visualización e navegación móbil de mapas globais para mapas de OSM con e sen conexión " OsmAnd+ (Indicacións de navegación automatizadas de OSM) é un aplicativo de navegación de código aberto con acceso a unha ampla variedade de datos globais de OpenStreetMap (OSM). Todos os mapas dos datos (mapas vectoriais ou teselas) poden ser almacenados no cartón de memoria do teléfono para empregalos sen conexión. OsmAnd tamen ofrece funcionalidade de cálculo de rutas sen conexión, incluíndo a guía por voz paso a paso. OsmAnd+ é a versión de pago, mais ao comprala vostede apoia o proxecto, financia o desenvolvemento de funcionalidades novas e recibe as últimas actualizacións.\n\t\t\n\t\tAlgunhas das funcionalidade principais:\n\t\t - Funcionalidade completa sen conexión (os mapas vectoriais ou de teselas descargados almacénanse no cartafol que se seleccione)\n\t\t - Mapas vectoriais compactos sen conexión para todo o mundo\n\t\t - Pódense descargar mapas de países ou rexións directamente desde o aplicativo\n\t\t - É posíbel sobrepor varias capas de mapas, como pistas de GPX ou de navegación, puntos de interese, favoritos, curvas de nivel, paradas de transporte público ou mapas adicionais con transparencia regulábel.\n\t\t - Busca sen conexión de enderezos e lugares (PDI)\n\t\t - Cálculo de rutas sen conexión para distancias curtas (experimental)\n\t\t - Modos para coche, bicicleta e péons, con:\n\t\t - Vistas diúrna e nocturna automatizadas opcionais\n\t\t - Ampliación opcional do mapa dependendo da velocidade\n\t\t - Aliñamento opcional do mapa dependendo do compás ou da dirección do movemento\n\t\t - Guía opcional de faixas da estrada, límites de velocidade e voces gravadas e TTS " - " OsmAnd (OSM Automated Navigation Directions, «Indicacións de navegación automatizadas de OSM») é un aplicativo de mapas e de navegación con acceso aos datos libres, mundiais e de alta calidade de OpenStreetMap (OSM). Todos os datos dos mapas poden ser almacenados no cartón de memoria dos dispositivos para empregalos sen conexión. Mediante o GPS do dispositivo, OsmAnd ofrece cálculo de rutas con guía visual e de voz para coches, bicicletas e peóns. Todas as funcionalidades funcionan tanto con conexión como sen conexión (non se precisa da Internet). OsmAnd+ é a versión paga do aplicativo. Ao comprala apóiase o proxecto, finánciase o desenvolvemento de funcionalidades novas e recíbense as actualizacións máis recentes. Pódese probar o aplicativo antes de compralo instalando a versión gratuíta chamada OsmAnd. Algunhas das funcionalidades principais: Navegación - Funciona con conexión (rápido) ou sen conexión (sen cobros telefónicos no estranxeiro) - Guía por voz paso a paso (voces gravadas e sintetizadas) - Guía opcional nas faixas das estradas, nomes das rúas e hora estimada de chegada - Admite puntos intermedios no itinerario - Recalcula as rutas automaticamente cando se producen desvíos da ruta - Busca de lugares por enderezo, por tipo (p.ex. restaurante, hotel, gasolineira, museo) ou por coordenadas xeográficas Vista de mapa - Mostra a posición e orientación no mapa - Aliña opcionalmente o mapa co compás ou coa dirección do movemento - Garda os lugares máis importantes como «favoritos» - Mostra os puntos de interese (PDI) que haxa preto - Pode mostrar mapas de teselas especializados con conexión - Pode mostrar a vista de satélite (de Bing) - Pode mostrar diferentes sobreposición, como pistas de GPX de visitas ou navegación e mapas adicionais con transparencia regulábel - Pode mostrar os mapas opcionalmente en inglés, na lingua local ou escritas de maneira fonética Uso dos datos de OpenStreetMap e da Wikipedia - Información de boa calidade procedente dos mellores proxectos colaborativos do mundo - Mapas globais procedentes de OpenStreetMap, dispoñíbeis por país ou rexión - Puntos de interese da Wikipedia, óptimos para facer visitas - Descarga gratuíta ilimitada directamente desde o aplicativo - Mapas sempre actualizados (actualizados cando menos unha vez ao mes) - Mapas vectoriais sen conexións compactos - Selección entre os datos completos dos mapas ou só a rede viaria (Exemplo: Xapón completo son 700 MB mais a rede viaria ocupa só 200 MB) - Tamén admite mapas de teselas con conexión ou na caché Funcionalidades de seguranza - Vistas diúrna e nocturna automatizadas opcionais - Límites de velocidade opcionais, con recordatorio se se exceden - Ampliación opcional do mapa dependente da velocidade - Pódese compartir a situación para que as amizades podan localizalo Funcionalidades para bicicletas e peóns - Os mapas inclúen pistas para peóns, sendeirismo, óptimos para actividades ao ar libre - Modos especiais de cálculo de rutas e pantalla para bicicletas e peóns - Paradas de transporte público opcionais (bus, tranvía, tren), incluídos os nomes das liñas - Gravación opcional das viaxes nun ficheiro GPX local ou nun servizo con conexión - Visualización opcional da velocidade e a altitude - Visualización das curvas de nivel e o sombreado (cun engadido adicional) Achegas directas a OpenStreetMap - Informes de fallos nos mapas - Envío de pistas GPX a OSM directamente desde o aplicativo - Adición de puntos de interese e envío automático a OSM (ou posteriormente, se non houber conexión) - Gravación opcional das viaxes tamén no modo de fondo (mentres o dispositivo está en modo de durmir) OsmAnd é código aberto e está a ser desenvolvido activamente. Calquera pode contribuír co aplicativo informando de fallos, mellorando as traducións ou escribindo código para funcionalidades novas. O proxecto está nun estado vivo de mellora continua mediante todo esas formas de interacción entre desenvolvedores e usuarios. O progreso tamén depende da contribución financeira para financiar o desenvolvemento, o código e as probas das funcionalidades novas. Ao comprar OmsAnd+ axúdase a que o aplicativo sexa aínda mellor. Tamén é posíbel financiar funcionalidades novas específicas ou de realizar unha doazón xeral en osmand.net. Cobertura e calidade aproximada dos mapas: - Europa Occidental: **** - Europa Oriental: *** - Rusia: *** - Norteamérica: *** - Sudamérica: ** - Asia: ** - Xapón e Corea: *** - Oriente Medio: ** - África: ** - Antártida: * Lista de países (basicamente todo o mundo!): Afganistán, Albania, Algeria, Andorra, Angola, Anguilla, Antigua e Barbuda, Arxentina, Armenia, Aruba, Australia, Austria, Azerbaixán, Bahamas, Bahrain, Bangladesh, Barbados, Bielorrusia, Bélxica, Belize, Benin, Bermuda, Bhutan, Bolivia, Bonaire, Bosnia e Herzegovina, Botswana, Brasil, Illas Virxes Británicas, Brunei, Bulgaria, Burkina Faso, Burundi, Camboxa, Camerún, Canadá, Cabo Verde, República Centroafricana, Chad, Chile, China, Colombia, Comoros, Congo, Costa Rica, Costa de Marfín, Croacia, Cuba, Curaçao, Cyprus, República Checa, Dinamarca, Xibuti, Dominica, República Dominicana, Ecuador, Exipto, El Salvador, Guiné Ecuatorial, Eritrea, Estonia, Etiopía, Fixi, Finlandia, Francia, Guiana Francesa, Polinesia Francesa, Gabón, Gambia, Xeorgia, Alemaña , Ghana, Xibraltar, Grecia, Groenland, Granada, Guadalupe, Guam, Guatemala, Guernsey, Guiné, Guiné-Bissau, Guyana, Haití, Vaticano, Honduras, Hong Kong, Hungría, Islandia, India, Indonesia, Iran, Iraq, Irlanda, Illa de Man, Israel, Italia, Xamaica, Xapón, Jersey, Xordania, Kazakhstan, Kenia, Kiribati, Corea do Norte e Corea do Sur, Kuwait, Quirgizstan, Laos, Letonia, Líbano, Lesotho, Liberia, Libia, Liechtenstein, Lituania, Luxemburgo, Macao, Macedonia, Madagascar, Malawi, Malasia, Maldivas, Mali, Malta, Martinica, Mauritania, Mauricio, Mayotte, México, Micronesia, Moldavia, Mónaco, Mongolia, Montenegro, Montserrat, Marrocos, Mozambique, Myanmar, Namibia, Nauru, Nepal, Países Baixos, Antillas Holandesas, Nova Caledonia, Nova Celandia, Nicaragua, Níxer, Nixeria, Noruega, Oman, Paquistán, Palau, Territorio Palestino, Panamá, Papua New Guinea, Paraguai, Perú, Filipinas, Polonia, Portugal, Puerto Rico, Qatar, Rumanía, Rusia, Ruanda, San Bartolomeu, Santa Helena, Saint Kitts e Nevis, Santa Lucía, San Martin, Saint Pierre e Miquelon, Saint Vincent e as Granadinas, Samoa, San Marino, Arabia Saudi, Senegal, Serbia, Seychelles, Serra Leoa, Singapur, Eslovaquia, Eslovenia, Somalia, Sudáfrica, Xeorxia do Sul, Sudán do Sul, España, Sri Lanka, Sudán, Surinam, Swazilandia, Suecia, Suíza, Siria, Taiwan, Taxikistan, Tanzania, Tailandia, Timor-Leste, Togo, Tokelau, Tonga, Trindade e Tobago, Tunicia, Turquía, Turcomenistan, Tuvalu, Uganda, Ucraína, Emiratos Árabes Unidos, Reino Unido (UK), Estados Unidos de América (USA), Uruguai, Uzbekistan, Vanuatu, Venezuela, Vietnam, Wallis e Futuna, Sáhara Occidental, Iemen, Zambia, Zimbabwe. " + " OsmAnd (OSM Automated Navigation Directions, «Indicacións de navegación automatizadas de OSM») é un aplicativo de mapas e de navegación con acceso aos datos libres, mundiais e de alta calidade de OpenStreetMap (OSM). Todos os datos dos mapas poden ser almacenados no cartón de memoria dos dispositivos para empregalos sen conexión. Mediante o GPS do dispositivo, OsmAnd ofrece cálculo de rutas con guía visual e de voz para coches, bicicletas e peóns. Todas as funcionalidades funcionan tanto con conexión como sen conexión (non se precisa da Internet). OsmAnd+ é a versión paga do aplicativo. Ao comprala apóiase o proxecto, finánciase o desenvolvemento de funcionalidades novas e recíbense as actualizacións máis recentes. Pódese probar o aplicativo antes de compralo instalando a versión gratuíta chamada OsmAnd. Algunhas das funcionalidades principais: Navegación - Funciona con conexión (rápido) ou sen conexión (sen cobros telefónicos no estranxeiro) - Guía por voz paso a paso (voces gravadas e sintetizadas) - Guía opcional nas faixas das estradas, nomes das rúas e hora estimada de chegada - Admite destinos intermedios no itinerario - Recalcula as rutas automaticamente cando se producen desvíos da ruta - Busca de lugares por enderezo, por tipo (p.ex. restaurante, hotel, gasolineira, museo) ou por coordenadas xeográficas Vista de mapa - Mostra a posición e orientación no mapa - Aliña opcionalmente o mapa co compás ou coa dirección do movemento - Garda os lugares máis importantes como «favoritos» - Mostra os puntos de interese (PDI) que haxa preto - Pode mostrar mapas de teselas especializados con conexión - Pode mostrar a vista de satélite (de Bing) - Pode mostrar diferentes sobreposición, como pistas de GPX de visitas ou navegación e mapas adicionais con transparencia regulábel - Pode mostrar os mapas opcionalmente en inglés, na lingua local ou escritas de maneira fonética Uso dos datos de OpenStreetMap e da Wikipedia - Información de boa calidade procedente dos mellores proxectos colaborativos do mundo - Mapas globais procedentes de OpenStreetMap, dispoñíbeis por país ou rexión - Puntos de interese da Wikipedia, óptimos para facer visitas - Descarga gratuíta ilimitada directamente desde o aplicativo - Mapas sempre actualizados (actualizados cando menos unha vez ao mes) - Mapas vectoriais sen conexións compactos - Selección entre os datos completos dos mapas ou só a rede viaria (Exemplo: Xapón completo son 700 MB mais a rede viaria ocupa só 200 MB) - Tamén admite mapas de teselas con conexión ou na caché Funcionalidades de seguranza - Vistas diúrna e nocturna automatizadas opcionais - Límites de velocidade opcionais, con recordatorio se se exceden - Ampliación opcional do mapa dependente da velocidade - Pódese compartir a situación para que as amizades podan localizalo Funcionalidades para bicicletas e peóns - Os mapas inclúen pistas para peóns, sendeirismo, óptimos para actividades ao ar libre - Modos especiais de cálculo de rutas e pantalla para bicicletas e peóns - Paradas de transporte público opcionais (bus, tranvía, tren), incluídos os nomes das liñas - Gravación opcional das viaxes nun ficheiro GPX local ou nun servizo con conexión - Visualización opcional da velocidade e a altitude - Visualización das curvas de nivel e o sombreado (cun engadido adicional) Achegas directas a OpenStreetMap - Informes de fallos nos mapas - Envío de pistas GPX a OSM directamente desde o aplicativo - Adición de puntos de interese e envío automático a OSM (ou posteriormente, se non houber conexión) - Gravación opcional das viaxes tamén no modo de fondo (mentres o dispositivo está en modo de durmir) OsmAnd é código aberto e está a ser desenvolvido activamente. Calquera pode contribuír co aplicativo informando de fallos, mellorando as traducións ou escribindo código para funcionalidades novas. O proxecto está nun estado vivo de mellora continua mediante todo esas formas de interacción entre desenvolvedores e usuarios. O progreso tamén depende da contribución financeira para financiar o desenvolvemento, o código e as probas das funcionalidades novas. Ao comprar OmsAnd+ axúdase a que o aplicativo sexa aínda mellor. Tamén é posíbel financiar funcionalidades novas específicas ou de realizar unha doazón xeral en osmand.net. Cobertura e calidade aproximada dos mapas: - Europa Occidental: **** - Europa Oriental: *** - Rusia: *** - Norteamérica: *** - Sudamérica: ** - Asia: ** - Xapón e Corea: *** - Oriente Medio: ** - África: ** - Antártida: * Lista de países (basicamente todo o mundo!): Afganistán, Albania, Algeria, Andorra, Angola, Anguilla, Antigua e Barbuda, Arxentina, Armenia, Aruba, Australia, Austria, Azerbaixán, Bahamas, Bahrain, Bangladesh, Barbados, Bielorrusia, Bélxica, Belize, Benin, Bermuda, Bhutan, Bolivia, Bonaire, Bosnia e Herzegovina, Botswana, Brasil, Illas Virxes Británicas, Brunei, Bulgaria, Burkina Faso, Burundi, Camboxa, Camerún, Canadá, Cabo Verde, República Centroafricana, Chad, Chile, China, Colombia, Comoros, Congo, Costa Rica, Costa de Marfín, Croacia, Cuba, Curaçao, Cyprus, República Checa, Dinamarca, Xibuti, Dominica, República Dominicana, Ecuador, Exipto, El Salvador, Guiné Ecuatorial, Eritrea, Estonia, Etiopía, Fixi, Finlandia, Francia, Guiana Francesa, Polinesia Francesa, Gabón, Gambia, Xeorgia, Alemaña , Ghana, Xibraltar, Grecia, Groenland, Granada, Guadalupe, Guam, Guatemala, Guernsey, Guiné, Guiné-Bissau, Guyana, Haití, Vaticano, Honduras, Hong Kong, Hungría, Islandia, India, Indonesia, Iran, Iraq, Irlanda, Illa de Man, Israel, Italia, Xamaica, Xapón, Jersey, Xordania, Kazakhstan, Kenia, Kiribati, Corea do Norte e Corea do Sur, Kuwait, Quirgizstan, Laos, Letonia, Líbano, Lesotho, Liberia, Libia, Liechtenstein, Lituania, Luxemburgo, Macao, Macedonia, Madagascar, Malawi, Malasia, Maldivas, Mali, Malta, Martinica, Mauritania, Mauricio, Mayotte, México, Micronesia, Moldavia, Mónaco, Mongolia, Montenegro, Montserrat, Marrocos, Mozambique, Myanmar, Namibia, Nauru, Nepal, Países Baixos, Antillas Holandesas, Nova Caledonia, Nova Celandia, Nicaragua, Níxer, Nixeria, Noruega, Oman, Paquistán, Palau, Territorio Palestino, Panamá, Papua New Guinea, Paraguai, Perú, Filipinas, Polonia, Portugal, Puerto Rico, Qatar, Rumanía, Rusia, Ruanda, San Bartolomeu, Santa Helena, Saint Kitts e Nevis, Santa Lucía, San Martin, Saint Pierre e Miquelon, Saint Vincent e as Granadinas, Samoa, San Marino, Arabia Saudi, Senegal, Serbia, Seychelles, Serra Leoa, Singapur, Eslovaquia, Eslovenia, Somalia, Sudáfrica, Xeorxia do Sul, Sudán do Sul, España, Sri Lanka, Sudán, Surinam, Swazilandia, Suecia, Suíza, Siria, Taiwan, Taxikistan, Tanzania, Tailandia, Timor-Leste, Togo, Tokelau, Tonga, Trindade e Tobago, Tunicia, Turquía, Turcomenistan, Tuvalu, Uganda, Ucraína, Emiratos Árabes Unidos, Reino Unido (UK), Estados Unidos de América (USA), Uruguai, Uzbekistan, Vanuatu, Venezuela, Vietnam, Wallis e Futuna, Sáhara Occidental, Iemen, Zambia, Zimbabwe. " Crear un filtro de PDI @@ -666,7 +666,7 @@ Rutas fluorescentes Regra Dirección da vista - Tema transparente + Trebellos transparentes Executar\n o aplicativo en segundo plano Deter\n a execución en segundo plano Intervalo para espertar o GPS: %s @@ -974,7 +974,7 @@ Hai varias categorías de PDE que responden á consulta: Non hai datos locais presentes para buscar puntos de interese. Buscar polo nome - O ficheiro de datos de POI «%1$s» é redundante e pode ser eliminado. + O ficheiro de datos de PdI «%1$s» é redundante e pode ser eliminado. Non foi posíbel atopar un ficheiro local para manter os cambios nos PDI e tampouco foi posíbel crealo. Actualizar OsmAnd+ O servidor contén ficheiros de mapas que non son compatíbeis coa versión actual do aplicativo. Para descargalos e empregalos actualice o aplicativo a unha versión máis recente. @@ -982,7 +982,7 @@ Nominatim con conexión A buscar a posición… - Posición (atopada) + A miña posición (atopada) Enderezo… Favoritos… Sen definir @@ -1161,7 +1161,7 @@ Xa hai unha versión anterior de OsmAnd instalada. Todos os datos sen conexión son utilizábeis polo novo aplicativo. Porén, os puntos favoritos hainos que exportar co aplicativo antigo e despois importalos co novo. A compilación {0} foi instalada correctamente ({1}). A descargar a compilación… - Desexa instalar OsmAnd - {0} desde {1} {2} MB ? + Desexa instalar OsmAnd - {0} de {1} {2} MB ? Fallou a obtención da lista de compilacións de OsmAnd A cargar as compilacións de OsmAnd… Seleccione a compilación de OsmAnd que desexe instalar @@ -1217,7 +1217,7 @@ Modificar o PDI - Eliminar o POI + Eliminar o PdI Co compás Coa dirección do movemento Non xirar (o norte está arriba) @@ -1246,7 +1246,7 @@ Favoritos Notas de OSM (con conexión) Paraxes de transporte - POI… + PdI… Fonte de mapas… Capas do mapa Buscar PDI @@ -1374,7 +1374,7 @@ A cargar os códigos postais… A cargar as rúas… a cargar as cidades… - POI + PdI Produciuse un erro ao gravar o GPX Produciuse un erro ao calcular a ruta Produciuse un erro ao calcular a ruta @@ -1502,7 +1502,7 @@ Crear un PDI Non é posíbel atopar o nodo ou esta instalación non é un nodo único Eliminar {0} (introducir un comentario)? - Eliminar este POI + Eliminar este PdI Eliminar O PDI foi eliminado correctamente engadir @@ -1735,7 +1735,7 @@ Vista de mapas de esquí Volver ao mapa Compartir nota - Location:\n Lat %1$s\n Lon %2$s + Situación:\n Lat %1$s\n Lon %2$s Vixiar Notas Mapa na rede @@ -1904,7 +1904,7 @@ Noutro momento Versión completa Descargas - Confirma que desexa descargar un mapa de estradas, aínda que ten o mapa completo? + Confirma que desexa descargar un mapa só de estradas, aínda que xa que ten o mapa estándar (completo)? %1$.1f de %2$.1f MB %.1f MB Actualizar todo (%1$s MB) @@ -1967,4 +1967,24 @@ Engadir un comentario Reabrir nota Pechar a nota + Eliminouse o PDI de OSM + Tipo + Punto de partida + Non seleccionada + Tamaño do almacenamento + Cantidade de espazo que poden ocupar todos os vídeos gravados + Actualizacións ao vivo + Mapas dispoñíbeis + Rutas ecuestres + Modificouse un PdI de OSM + Creouse unha nota correctamente + Produciuse unha excepción: a nota non foi creada + A nota foi pechada correctamente + Produciuse unha excepción: a nota non foi pechada + Remitir + + Situación + Edicións de OSM compartidas a través de OsmAnd + Baixo alemán + Macedonio From 19dc4f84e3dedcabf2380c87385554b21da611b0 Mon Sep 17 00:00:00 2001 From: Massimiliano Caniparoli Date: Fri, 8 Jan 2016 19:21:23 +0100 Subject: [PATCH 32/91] Translated using Weblate (Italian) Currently translated at 99.8% (1872 of 1874 strings) --- OsmAnd/res/values-it/strings.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index 2763cacfe1..9e9c135083 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -1,4 +1,5 @@ - + + Sovrapposizioni fluorescenti Usa colori fluorescenti per visualizzare tracce e percorsi Modifiche offline @@ -2131,4 +2132,7 @@ Notte Non selezionato - \ No newline at end of file +Tipo + Punto di partenza + Scegli il mese e lo stato + From e3ec5d32c70c332f6afdff97baacc30ee2ea6720 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Fri, 8 Jan 2016 19:39:05 +0100 Subject: [PATCH 33/91] Translated using Weblate (Danish) Currently translated at 100.0% (1874 of 1874 strings) --- OsmAnd/res/values-da/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 900577daf4..a5ca00fa5a 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -2220,4 +2220,6 @@ Ikke markeret Vælg måned og land - +Type + Udgangspunkt + From 0c643aa5511292a69f2f3e94e59e09a74ae8b9d5 Mon Sep 17 00:00:00 2001 From: Kees-Jan Timmer Date: Fri, 8 Jan 2016 21:28:22 +0100 Subject: [PATCH 34/91] Translated using Weblate (Dutch) Currently translated at 100.0% (1874 of 1874 strings) --- OsmAnd/res/values-nl/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml index d645bcbb79..5294c5c49c 100644 --- a/OsmAnd/res/values-nl/strings.xml +++ b/OsmAnd/res/values-nl/strings.xml @@ -2158,4 +2158,6 @@ Niet geselecteerd Kies maand en kaart - +Startpunt + Type + From bf2c5d557be7d8acffd6f7db378c158c59836a6c Mon Sep 17 00:00:00 2001 From: Roberto GEB Date: Fri, 8 Jan 2016 21:36:48 +0100 Subject: [PATCH 35/91] Translated using Weblate (Spanish) Currently translated at 100.0% (1874 of 1874 strings) --- OsmAnd/res/values-es/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index bb5c3ef20c..6032ab4f27 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -2039,4 +2039,6 @@ No seleccionado Seleccione mes y país - +Tipo + Punto de partida + From bc1f6cf861dcc790532af7d13b7ce45437bb84c0 Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Sat, 9 Jan 2016 02:51:37 +0100 Subject: [PATCH 36/91] Translated using Weblate (Chinese (Taiwan)) Currently translated at 100.0% (1874 of 1874 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index c32cbe4b63..7653e7227f 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -2066,4 +2066,6 @@ 未選取 選擇月份與國家 - +類型 + 起始標點 + From 2f6bc9332e77dd03f970f4ccc844e5fca8061028 Mon Sep 17 00:00:00 2001 From: jf-simon Date: Sat, 9 Jan 2016 07:44:31 +0100 Subject: [PATCH 37/91] Translated using Weblate (German) Currently translated at 100.0% (1874 of 1874 strings) --- OsmAnd/res/values-de/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 39243e4942..f81d08c3cb 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -1993,4 +1993,6 @@ Nicht ausgewählt Wähle Monat und Land - +Typ + Startpunkt + From 09c4c4690498e9db91bfe2307d7eba5d9bef5adc Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 10 Jan 2016 12:13:04 +0100 Subject: [PATCH 38/91] Change url for other markets --- OsmAnd/src/net/osmand/plus/Version.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/Version.java b/OsmAnd/src/net/osmand/plus/Version.java index 77e17b4aaf..56032d7922 100644 --- a/OsmAnd/src/net/osmand/plus/Version.java +++ b/OsmAnd/src/net/osmand/plus/Version.java @@ -30,7 +30,7 @@ public class Version { } else if (isGooglePlayEnabled(ctx)) { return "market://search?q=pname:"; } - return "http://osmand.net/apps?"; + return "http://osmand.net/apps?id="; } private static boolean isAmazonEnabled(OsmandApplication ctx) { From 08030042e839f9e47cde4d4f9c134b01283b266a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xos=C3=A9=20Calvo?= Date: Fri, 8 Jan 2016 21:39:15 +0100 Subject: [PATCH 39/91] Translated using Weblate (Galician) Currently translated at 98.3% (1844 of 1874 strings) --- OsmAnd/res/values-gl/strings.xml | 47 ++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml index 49341a7c54..bbc5d9e54f 100644 --- a/OsmAnd/res/values-gl/strings.xml +++ b/OsmAnd/res/values-gl/strings.xml @@ -77,7 +77,7 @@ Swahili Hebreo Adiante - Inicio + Pantalla principal Enviar o seguimento a un servizo web indicado se a gravación de GPX estiver activada. Seguimento con conexión (requírese GPX) Iniciar o seguimento con conexión @@ -1166,7 +1166,7 @@ A cargar as compilacións de OsmAnd… Seleccione a compilación de OsmAnd que desexe instalar O aplicativo de estado do GPS non está instalado. Desexa buscalo no Market? - A orientación por voz non está dispoñíbel. Vaia á «Configuración» → «Xeral» →«Indicacións con voz» e seleccione ou descargue un paquete de datos de voz. + A orientación por voz non está dispoñíbel. Vaia a «Configuración» → «Xeral» →«Indicacións con voz» e seleccione ou descargue un paquete de datos de voz. A orientación por voz non está seleccionada Diúrno Nocturno @@ -1346,7 +1346,7 @@ O cartafol de almacenamento de datos do cartón SD non é accesíbel! Download {0} - {1} ? Xa existen datos sen conexión para {0} ({1}). Desexa actualizalos ({2}) ? - Address + Enderezo A descarga foi correcta A descargar @@ -1452,14 +1452,14 @@ Abaixo Introduza a latitude e a lonxitude no formato seleccionado (D - graos, M - minutos, S - segundos) Latitude - Longitude + Lonxitude DDD.DD DDD MM.MM DDD MM SS.SS Mostrar no mapa Seleccionar o enderezo - Region + Rexión Cidade Rúa Edificio @@ -1987,4 +1987,39 @@ Edicións de OSM compartidas a través de OsmAnd Baixo alemán Macedonio - + Falta o mapa base mundial (que cubre o mundo enteiro en ampliacións pequenas) ou está anticuado. Debería descargar o mapa base mundial para ter un ambiente completo. + Simular o primeiro inicio do aplicativo + A consultar o enderezo + Cor de GPX + Largo do GPX + "Libre %s1$s " + Estilo de estrada + Evitar escaleiras + Evitar escaleiras + Evitar cruzar fronteiras + Outros + Reabrir + A tarxeta estaba oculta + Mostra as descargas libres empregadas + + Confirma que desexa gardar o PdI sen un tipo de PdI? + Empregar a pantalla principal + Empregar o menú + Control coa pantalla principal ou co menú + Hai unha escolla nova para controlar o aplicativo principalmente mediante a flexíbel pantalla principal ou mediante un menú estático. O que escolla pode ser cambiado en calquera momento na configuración da pantalla principal. + Actualizar + Descargar só se hai rede sen fíos + Actualización ao vivo + Actualizar agora + O aplicativo carece de permiso para empregar a tarxeta SD + Última actualización: %s + Hora da actualización + Tamaño da actualización + Último cambio do mapa: %s + Cada hora + Cada día + Cada semana + Mañá + Noite + Seleccione o mes e o país + From 47e48c4524fa0f879699c9765d5943913314e5ef Mon Sep 17 00:00:00 2001 From: Ajeje Brazorf Date: Sat, 9 Jan 2016 14:08:01 +0100 Subject: [PATCH 40/91] Translated using Weblate (Sardinian) Currently translated at 99.8% (1872 of 1874 strings) --- OsmAnd/res/values-sc/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index 1f40d7782f..58a0a6e1f8 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -2075,4 +2075,6 @@ Mannària agiornamentos Ischerta mese e istadu - +Casta + Puntu de incumintzu + From aff87467c74ed667373e1cf306b659e68cd45fe5 Mon Sep 17 00:00:00 2001 From: ace shadow Date: Fri, 8 Jan 2016 21:50:54 +0100 Subject: [PATCH 41/91] Translated using Weblate (Slovak) Currently translated at 99.1% (1859 of 1874 strings) --- OsmAnd/res/values-sk/strings.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index 77b25e9085..e1efc64be2 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -1,4 +1,5 @@ - + + Zobraziť Fotografia %1$s %2$s @@ -1914,4 +1915,7 @@ Ráno V noci - \ No newline at end of file +Typ + Východzí bod + Zvoľte mesiac a krajinu + From d505e01819c5173377b0b74cd2ead5d05e20f65a Mon Sep 17 00:00:00 2001 From: Leif Larsson Date: Fri, 8 Jan 2016 21:03:57 +0100 Subject: [PATCH 42/91] Translated using Weblate (Swedish) Currently translated at 99.1% (1859 of 1874 strings) --- OsmAnd/res/values-sv/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index 6a86a4dcf3..5f6c18add9 100644 --- a/OsmAnd/res/values-sv/strings.xml +++ b/OsmAnd/res/values-sv/strings.xml @@ -2059,4 +2059,6 @@ Morgon Inte markerad Välj månad och land - +Typ + Startpunkt + From 1acc8811d372049729462da9818fc5f15e80fc91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xos=C3=A9=20Calvo?= Date: Sun, 10 Jan 2016 12:13:11 +0100 Subject: [PATCH 43/91] Translated using Weblate (Galician) Currently translated at 31.6% (748 of 2363 strings) --- OsmAnd/res/values-gl/phrases.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/OsmAnd/res/values-gl/phrases.xml b/OsmAnd/res/values-gl/phrases.xml index bc69376ca3..e365e1d0fd 100644 --- a/OsmAnd/res/values-gl/phrases.xml +++ b/OsmAnd/res/values-gl/phrases.xml @@ -802,4 +802,14 @@ Terminal aeroportuaria Obras hidráulicas Torre de refrixeración + Eliminación de lixo + Uso do solo + Aloxamento + Produtos agrícolas polos labregos + Tenda de verduras + Pastelaría + Confeitaría + Máquina vendedora + Produtos de bebés + Tenda de calefacción From b3fd0bd4cfddec1b1e8310c66324b4fc500f58d4 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Sun, 10 Jan 2016 14:50:55 +0300 Subject: [PATCH 44/91] Added swipe feature to Waypoints list. Few fixes. --- OsmAnd/res/anim/popup_hide.xml | 7 + OsmAnd/res/anim/popup_show.xml | 7 + OsmAnd/res/drawable/popup_bg.xml | 5 + OsmAnd/res/layout/undo_popup.xml | 40 + OsmAnd/res/values/colors.xml | 4 + OsmAnd/res/values/sizes.xml | 3 + OsmAnd/res/values/strings.xml | 3 + OsmAnd/res/values/styles.xml | 5 + .../osmand/plus/dashboard/DashboardOnMap.java | 93 +- .../plus/helpers/WaypointDialogHelper.java | 2 + .../plus/views/controls/DynamicListView.java | 96 +- .../controls/DynamicListViewCallbacks.java | 3 + .../views/controls/StableArrayAdapter.java | 5 + .../SwipeDismissListViewTouchListener.java | 885 ++++++++++++++++++ 14 files changed, 1118 insertions(+), 40 deletions(-) create mode 100644 OsmAnd/res/anim/popup_hide.xml create mode 100644 OsmAnd/res/anim/popup_show.xml create mode 100644 OsmAnd/res/drawable/popup_bg.xml create mode 100644 OsmAnd/res/layout/undo_popup.xml create mode 100644 OsmAnd/src/net/osmand/plus/views/controls/SwipeDismissListViewTouchListener.java diff --git a/OsmAnd/res/anim/popup_hide.xml b/OsmAnd/res/anim/popup_hide.xml new file mode 100644 index 0000000000..4a9eafdb88 --- /dev/null +++ b/OsmAnd/res/anim/popup_hide.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/OsmAnd/res/anim/popup_show.xml b/OsmAnd/res/anim/popup_show.xml new file mode 100644 index 0000000000..ddca59f8b3 --- /dev/null +++ b/OsmAnd/res/anim/popup_show.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/popup_bg.xml b/OsmAnd/res/drawable/popup_bg.xml new file mode 100644 index 0000000000..40dc344b9f --- /dev/null +++ b/OsmAnd/res/drawable/popup_bg.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/undo_popup.xml b/OsmAnd/res/layout/undo_popup.xml new file mode 100644 index 0000000000..6596c22d9f --- /dev/null +++ b/OsmAnd/res/layout/undo_popup.xml @@ -0,0 +1,40 @@ + + + + + + + +