From d346281ce7e9f6d9b48394b7e490fa540407c18b Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Wed, 8 Jun 2016 16:19:58 +0300 Subject: [PATCH 1/2] Formatting. --- OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 8d5e1eb599..973593b280 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -15,7 +15,6 @@ import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.TargetPointsHelper.TargetPoint; -import net.osmand.plus.mapcontextmenu.other.DestinationReachedMenu; import net.osmand.plus.routing.RouteCalculationResult.NextDirectionInfo; import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder; import net.osmand.plus.routing.RouteProvider.RouteService; @@ -34,13 +33,13 @@ public class RoutingHelper { private static final org.apache.commons.logging.Log log = PlatformUtil.getLog(RoutingHelper.class); - public static interface IRouteInformationListener { + public interface IRouteInformationListener { - public void newRouteIsCalculated(boolean newRoute, ValueHolder showToast); + void newRouteIsCalculated(boolean newRoute, ValueHolder showToast); - public void routeWasCancelled(); + void routeWasCancelled(); - public void routeWasFinished(); + void routeWasFinished(); } private static final float POSITION_TOLERANCE = 60; From e67d2ec88c1f847698550cbec3d9bd597dfa51b1 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Wed, 8 Jun 2016 16:52:56 +0300 Subject: [PATCH 2/2] Fixed --- .../OpeningHoursHoursDialogFragment.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java index 1f1934a6ec..989ddb68e4 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java @@ -55,6 +55,7 @@ public class OpeningHoursHoursDialogFragment extends DialogFragment { new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { + timePicker.clearFocus(); int minute = timePicker.getCurrentMinute(); int hourOfDay = timePicker.getCurrentHour(); int time = minute + hourOfDay * 60; @@ -112,4 +113,28 @@ public class OpeningHoursHoursDialogFragment extends DialogFragment { fragment.setArguments(bundle); return fragment; } + + private static class TimePreservingOnTimeChangedListener implements TimePicker.OnTimeChangedListener { + private int mHourOfDay; + private int mMinute; + + public TimePreservingOnTimeChangedListener(int hourOfDay, int minute) { + this.mHourOfDay = hourOfDay; + this.mMinute = minute; + } + + @Override + public void onTimeChanged(TimePicker view, int hourOfDay, int minute) { + this.mHourOfDay = hourOfDay; + this.mMinute = minute; + } + + public int getHourOfDay() { + return mHourOfDay; + } + + public int getMinute() { + return mMinute; + } + } }