From 39bae9a46630e8a9454f12657f0c81471a15582c Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Thu, 2 Apr 2015 01:51:05 +0200 Subject: [PATCH] Fix issue --- OsmAnd/res/layout/divider.xml | 9 +++++++++ .../net/osmand/plus/dashboard/DashWaypointsFragment.java | 3 +++ .../plus/views/controls/MapRoutePreferencesControl.java | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 OsmAnd/res/layout/divider.xml diff --git a/OsmAnd/res/layout/divider.xml b/OsmAnd/res/layout/divider.xml new file mode 100644 index 0000000000..a4a8c9992e --- /dev/null +++ b/OsmAnd/res/layout/divider.xml @@ -0,0 +1,9 @@ + + diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java index 27c085dcb3..79c8b00279 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java @@ -71,6 +71,7 @@ public class DashWaypointsFragment extends DashLocationFragment { } ((TextView) mainView.findViewById(R.id.fav_text)).setText(getString(R.string.waypoints)); ((Button) mainView.findViewById(R.id.show_all)).setText(getString(R.string.shared_string_show_all)); + ((Button) mainView.findViewById(R.id.show_all)).setVisibility(View.VISIBLE); ((Button) mainView.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() { @Override @@ -83,6 +84,8 @@ public class DashWaypointsFragment extends DashLocationFragment { List distances = new ArrayList(); for(int i = 0; i < 3 && i < allPoints.size(); i++) { LocationPointWrapper ps = allPoints.get(i); + View dv = getActivity().getLayoutInflater().inflate(R.layout.divider, null); + favorites.addView(dv); View v = WaypointDialogHelper.updateWaypointItemView(false, null, getMyApplication(), getActivity(), null, ps, null); favorites.addView(v); diff --git a/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java b/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java index 242a26aea6..382b54f8e0 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java @@ -235,7 +235,7 @@ public class MapRoutePreferencesControl { } GeneralRouter rm = SettingsNavigationActivity.getRouter(mapActivity.getMyApplication() .getDefaultRoutingConfig(), am); - if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute())) { + if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute()) && !rparams.getFile().hasRtePt()) { return list; } for (RoutingParameter r : rm.getParameters().values()) {