Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1efead06dc
2 changed files with 29 additions and 5 deletions
|
@ -55,6 +55,7 @@ public class OpeningHoursHoursDialogFragment extends DialogFragment {
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
timePicker.clearFocus();
|
||||||
int minute = timePicker.getCurrentMinute();
|
int minute = timePicker.getCurrentMinute();
|
||||||
int hourOfDay = timePicker.getCurrentHour();
|
int hourOfDay = timePicker.getCurrentHour();
|
||||||
int time = minute + hourOfDay * 60;
|
int time = minute + hourOfDay * 60;
|
||||||
|
@ -112,4 +113,28 @@ public class OpeningHoursHoursDialogFragment extends DialogFragment {
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
return fragment;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.TargetPointsHelper;
|
import net.osmand.plus.TargetPointsHelper;
|
||||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
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.RouteCalculationResult.NextDirectionInfo;
|
||||||
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
|
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
|
||||||
import net.osmand.plus.routing.RouteProvider.RouteService;
|
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);
|
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;
|
private static final float POSITION_TOLERANCE = 60;
|
||||||
|
|
Loading…
Reference in a new issue