Icons for add/remove parking marker added to Context menu

This commit is contained in:
aFedasenka 2012-07-01 00:02:03 +02:00
parent 1589819e26
commit 813f264400
4 changed files with 5 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -120,7 +120,6 @@ public class ParkingPositionLayer extends OsmandMapLayer implements ContextMenuL
double longitude = parkingPoint.getLongitude();
if (isLocationVisible(latitude, longitude)) {
int marginX = parkingNoLimitIcon.getWidth() / 2;
// TODO tune y
int marginY = 72;//magic number!
int locationX = view.getMapXForPoint(longitude);
int locationY = view.getMapYForPoint(latitude);
@ -168,10 +167,11 @@ public class ParkingPositionLayer extends OsmandMapLayer implements ContextMenuL
long parkingTime = settings.getParkingTime();
Time time = new Time();
time.set(parkingTime);
timeLimitDesc.append(map.getString(R.string.osmand_parking_position_description_add));
timeLimitDesc.append(map.getString(R.string.osmand_parking_position_description_add) + " ");
timeLimitDesc.append(time.hour);
timeLimitDesc.append(":");
timeLimitDesc.append(time.minute);
int minute = time.minute;
timeLimitDesc.append(minute<10 ? "0" + minute : minute);
if (!DateFormat.is24HourFormat(map.getApplicationContext())) {
timeLimitDesc.append(time.hour >= 12 ? map.getString(R.string.osmand_parking_pm) : map.getString(R.string.osmand_parking_am));
}

View file

@ -103,7 +103,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
}
};
if (parkingPosition != null)
adapter.registerItem(R.string.context_menu_item_delete_parking_point, 0, removeListener, 0);
adapter.registerItem(R.string.context_menu_item_delete_parking_point, R.drawable.poi_parking_del_ctx_menu, removeListener, 0);
}
OnContextMenuClick addListener = new OnContextMenuClick() {
@ -115,7 +115,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
}
}
};
adapter.registerItem(R.string.context_menu_item_add_parking_point, 0, addListener, -1);
adapter.registerItem(R.string.context_menu_item_add_parking_point, R.drawable.poi_parking_pos_ctx_menu, addListener, -1);
}