Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-06-08 15:53:32 +02:00
commit 1efead06dc
2 changed files with 29 additions and 5 deletions

View file

@ -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;
}
}
}

View file

@ -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<Boolean> showToast);
void newRouteIsCalculated(boolean newRoute, ValueHolder<Boolean> showToast);
public void routeWasCancelled();
void routeWasCancelled();
public void routeWasFinished();
void routeWasFinished();
}
private static final float POSITION_TOLERANCE = 60;