Parking, favs, target context menu fixes
This commit is contained in:
parent
123f285458
commit
5b031c603d
4 changed files with 22 additions and 8 deletions
|
@ -29,6 +29,9 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right"
|
||||
android:drawableLeft="@drawable/ic_action_done"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="@string/shared_string_save"/>
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ public class ParkingPositionMenuController extends MenuController {
|
|||
}
|
||||
}
|
||||
};
|
||||
leftTitleButtonController.caption = getMapActivity().getString(R.string.osmand_parking_delete);
|
||||
leftTitleButtonController.caption = getMapActivity().getString(R.string.shared_string_delete);
|
||||
leftTitleButtonController.leftIconId = R.drawable.ic_action_delete_dark;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,7 +30,8 @@ public class TargetPointMenuController extends MenuController {
|
|||
getMapActivity().getContextMenu().close();
|
||||
}
|
||||
};
|
||||
leftTitleButtonController.caption = getMapActivity().getString(R.string.delete_target_point);
|
||||
leftTitleButtonController.caption = getMapActivity().getString(R.string.shared_string_delete);
|
||||
leftTitleButtonController.leftIconId = R.drawable.ic_action_delete_dark;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -298,10 +298,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
showDeleteEventWarning(activity);
|
||||
if (parkingLayer != null) {
|
||||
parkingLayer.refresh();
|
||||
}
|
||||
clearParkingPosition();
|
||||
cancelParking();
|
||||
if (activity instanceof MapActivity) {
|
||||
((MapActivity) activity).getContextMenu().close();
|
||||
}
|
||||
|
@ -323,7 +320,12 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
Builder setTime = new AlertDialog.Builder(mapActivity);
|
||||
setTime.setView(setTimeParking);
|
||||
setTime.setTitle(mapActivity.getString(R.string.osmand_parking_time_limit_title));
|
||||
setTime.setNegativeButton(R.string.shared_string_cancel, null);
|
||||
setTime.setNegativeButton(R.string.shared_string_cancel, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
cancelParking();
|
||||
}
|
||||
});
|
||||
final TextView textView = (TextView) setTimeParking.findViewById(R.id.parkTime);
|
||||
final TimePicker timePicker = (TimePicker) setTimeParking.findViewById(R.id.parking_time_picker);
|
||||
|
||||
|
@ -433,7 +435,14 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
parkingLayer.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void cancelParking() {
|
||||
if (parkingLayer != null) {
|
||||
parkingLayer.refresh();
|
||||
}
|
||||
clearParkingPosition();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerOptionsMenuItems(final MapActivity mapActivity, ContextMenuAdapter helper) {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue