Icons for add/remove parking marker added to Context menu
This commit is contained in:
parent
1589819e26
commit
813f264400
4 changed files with 5 additions and 5 deletions
BIN
OsmAnd/res/drawable-hdpi/poi_parking_del_ctx_menu.png
Normal file
BIN
OsmAnd/res/drawable-hdpi/poi_parking_del_ctx_menu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
BIN
OsmAnd/res/drawable-hdpi/poi_parking_pos_ctx_menu.png
Normal file
BIN
OsmAnd/res/drawable-hdpi/poi_parking_pos_ctx_menu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue