diff --git a/OsmAnd/res/drawable-hdpi/map_marker_point_14dp.png b/OsmAnd/res/drawable-hdpi/ic_marker_point_14dp.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_marker_point_14dp.png
rename to OsmAnd/res/drawable-hdpi/ic_marker_point_14dp.png
diff --git a/OsmAnd/res/drawable-hdpi/ic_note_audio.png b/OsmAnd/res/drawable-hdpi/ic_note_audio.png
deleted file mode 100644
index ec824f1f5a..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/ic_note_audio.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_note_photo.png b/OsmAnd/res/drawable-hdpi/ic_note_photo.png
deleted file mode 100644
index a586bcdd95..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/ic_note_photo.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_note_small.png b/OsmAnd/res/drawable-hdpi/ic_note_small.png
deleted file mode 100644
index d6ef5c7895..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/ic_note_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_note_video.png b/OsmAnd/res/drawable-hdpi/ic_note_video.png
deleted file mode 100644
index 48066ca5c1..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/ic_note_video.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_pin_avoid_road.png b/OsmAnd/res/drawable-hdpi/ic_pin_avoid_road.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_pin_avoid_road.png
rename to OsmAnd/res/drawable-hdpi/ic_pin_avoid_road.png
diff --git a/OsmAnd/res/drawable-hdpi/map_shield_marker_point_color.png b/OsmAnd/res/drawable-hdpi/ic_shield_marker_point_color.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_shield_marker_point_color.png
rename to OsmAnd/res/drawable-hdpi/ic_shield_marker_point_color.png
diff --git a/OsmAnd/res/drawable-hdpi/map_shield_marker_point_shadow.png b/OsmAnd/res/drawable-hdpi/ic_shield_marker_point_shadow.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_shield_marker_point_shadow.png
rename to OsmAnd/res/drawable-hdpi/ic_shield_marker_point_shadow.png
diff --git a/OsmAnd/res/drawable-hdpi/map_shield_marker_point_stroke.png b/OsmAnd/res/drawable-hdpi/ic_shield_marker_point_stroke.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_shield_marker_point_stroke.png
rename to OsmAnd/res/drawable-hdpi/ic_shield_marker_point_stroke.png
diff --git a/OsmAnd/res/drawable-hdpi/ic_white_orange_poi_shield.png b/OsmAnd/res/drawable-hdpi/ic_white_orange_poi_shield.png
deleted file mode 100644
index 2f80b35243..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/ic_white_orange_poi_shield.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_white_orange_poi_shield_small.png b/OsmAnd/res/drawable-hdpi/ic_white_orange_poi_shield_small.png
deleted file mode 100644
index 65558478b7..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/ic_white_orange_poi_shield_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_white_shield_small.png b/OsmAnd/res/drawable-hdpi/ic_white_shield_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_white_shield_small.png
rename to OsmAnd/res/drawable-hdpi/ic_white_shield_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_osm_resolved.png b/OsmAnd/res/drawable-hdpi/map_osm_resolved.png
deleted file mode 100644
index a2fd06e3f5..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_osm_resolved.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_osm_resolved_small.png b/OsmAnd/res/drawable-hdpi/map_osm_resolved_small.png
deleted file mode 100644
index b34a4af881..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_osm_resolved_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_osm_unresolved.png b/OsmAnd/res/drawable-hdpi/map_osm_unresolved.png
deleted file mode 100644
index d590a5283a..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_osm_unresolved.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_osm_unresolved_small.png b/OsmAnd/res/drawable-hdpi/map_osm_unresolved_small.png
deleted file mode 100644
index 92dc738c0a..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_osm_unresolved_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_pin_destination.png b/OsmAnd/res/drawable-hdpi/map_pin_destination.png
deleted file mode 100644
index 56ef29b090..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_pin_destination.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_pin_origin.png b/OsmAnd/res/drawable-hdpi/map_pin_origin.png
deleted file mode 100644
index fe5a345d51..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_pin_origin.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_pin_poi.png b/OsmAnd/res/drawable-hdpi/map_pin_poi.png
deleted file mode 100644
index 1d6a8d412b..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_pin_poi.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_pin_poi_small.png b/OsmAnd/res/drawable-hdpi/map_pin_poi_small.png
deleted file mode 100644
index 65242db619..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_pin_poi_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_poi_parking_pos_limit.png b/OsmAnd/res/drawable-hdpi/map_poi_parking_pos_limit.png
deleted file mode 100644
index c70b63da12..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_poi_parking_pos_limit.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_poi_parking_pos_no_limit.png b/OsmAnd/res/drawable-hdpi/map_poi_parking_pos_no_limit.png
deleted file mode 100644
index cb01e5bc3e..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_poi_parking_pos_no_limit.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_transport_stop_bg.png b/OsmAnd/res/drawable-hdpi/map_transport_stop_bg.png
deleted file mode 100644
index 18fda5981f..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_transport_stop_bg.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_transport_stop_bus.png b/OsmAnd/res/drawable-hdpi/map_transport_stop_bus.png
deleted file mode 100644
index 8692bac467..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_transport_stop_bus.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_transport_stop_small.png b/OsmAnd/res/drawable-hdpi/map_transport_stop_small.png
deleted file mode 100644
index b7988c4652..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_transport_stop_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_transport_stop_tram.png b/OsmAnd/res/drawable-hdpi/map_transport_stop_tram.png
deleted file mode 100644
index 9eeb78c258..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_transport_stop_tram.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward.png b/OsmAnd/res/drawable-hdpi/map_turn_forward.png
deleted file mode 100644
index 39eff5a3ff..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_keep_right.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_keep_right.png
deleted file mode 100644
index 930a6ed29a..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_keep_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_keep_right_small.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_keep_right_small.png
deleted file mode 100644
index 4f061a8f65..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_keep_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_right_turn.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_right_turn.png
deleted file mode 100644
index 132513feb9..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_right_turn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_right_turn_small.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_right_turn_small.png
deleted file mode 100644
index a8c31c4d63..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_right_turn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_slight_right_turn.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_slight_right_turn.png
deleted file mode 100644
index 61e2369dd5..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_slight_right_turn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_slight_right_turn_small.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_slight_right_turn_small.png
deleted file mode 100644
index 0423af6252..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_slight_right_turn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_small.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_small.png
deleted file mode 100644
index 4d8d5d6220..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_turn_sharp.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_turn_sharp.png
deleted file mode 100644
index 08cc5042a7..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_turn_sharp.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_turn_sharp_small.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_turn_sharp_small.png
deleted file mode 100644
index 4d2072a5dd..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_turn_sharp_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_uturn_right.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_uturn_right.png
deleted file mode 100644
index bdb4615100..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_uturn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_forward_uturn_right_small.png b/OsmAnd/res/drawable-hdpi/map_turn_forward_uturn_right_small.png
deleted file mode 100644
index 371d917de1..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_forward_uturn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_keep_right.png b/OsmAnd/res/drawable-hdpi/map_turn_keep_right.png
deleted file mode 100644
index 53bf1bbd5a..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_keep_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_keep_right_small.png b/OsmAnd/res/drawable-hdpi/map_turn_keep_right_small.png
deleted file mode 100644
index f99dc29a3a..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_keep_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_right.png b/OsmAnd/res/drawable-hdpi/map_turn_right.png
deleted file mode 100644
index ebec78a249..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_right2.png b/OsmAnd/res/drawable-hdpi/map_turn_right2.png
deleted file mode 100644
index d6430b5a27..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_right2.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_right2_small.png b/OsmAnd/res/drawable-hdpi/map_turn_right2_small.png
deleted file mode 100644
index 03f80cd255..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_right2_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_right_small.png b/OsmAnd/res/drawable-hdpi/map_turn_right_small.png
deleted file mode 100644
index 53e123a4b0..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_sharp_right.png b/OsmAnd/res/drawable-hdpi/map_turn_sharp_right.png
deleted file mode 100644
index c2bb82a6cf..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_sharp_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_sharp_right_small.png b/OsmAnd/res/drawable-hdpi/map_turn_sharp_right_small.png
deleted file mode 100644
index 4cb21fabd2..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_sharp_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_slight_right.png b/OsmAnd/res/drawable-hdpi/map_turn_slight_right.png
deleted file mode 100644
index 9e1697651e..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_slight_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_slight_right_small.png b/OsmAnd/res/drawable-hdpi/map_turn_slight_right_small.png
deleted file mode 100644
index c560ff67d6..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_slight_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_uturn.png b/OsmAnd/res/drawable-hdpi/map_turn_uturn.png
deleted file mode 100644
index 7731d4de0f..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_uturn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_uturn_right.png b/OsmAnd/res/drawable-hdpi/map_turn_uturn_right.png
deleted file mode 100644
index e592adb980..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_uturn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_uturn_right_small.png b/OsmAnd/res/drawable-hdpi/map_turn_uturn_right_small.png
deleted file mode 100644
index c83264f13c..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_uturn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_turn_uturn_small.png b/OsmAnd/res/drawable-hdpi/map_turn_uturn_small.png
deleted file mode 100644
index bb3725e373..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_turn_uturn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_white_shield.png b/OsmAnd/res/drawable-hdpi/map_white_shield.png
deleted file mode 100644
index 382d257cbc..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_white_shield.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_widget_compass_ruller_day.png b/OsmAnd/res/drawable-hdpi/map_widget_compass_ruller_day.png
deleted file mode 100644
index e2b29ec083..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_widget_compass_ruller_day.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_widget_compass_ruller_location_day.png b/OsmAnd/res/drawable-hdpi/map_widget_compass_ruller_location_day.png
deleted file mode 100644
index ac2ecee872..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_widget_compass_ruller_location_day.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/map_world_globe_dark.png b/OsmAnd/res/drawable-hdpi/map_world_globe_dark.png
deleted file mode 100644
index 0acdc07e7a..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/map_world_globe_dark.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_marker_point_14dp.png b/OsmAnd/res/drawable-mdpi/ic_marker_point_14dp.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_marker_point_14dp.png
rename to OsmAnd/res/drawable-mdpi/ic_marker_point_14dp.png
diff --git a/OsmAnd/res/drawable-mdpi/ic_note_audio.png b/OsmAnd/res/drawable-mdpi/ic_note_audio.png
deleted file mode 100644
index c74bbab0e1..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/ic_note_audio.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_note_photo.png b/OsmAnd/res/drawable-mdpi/ic_note_photo.png
deleted file mode 100644
index a6f06ef560..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/ic_note_photo.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_note_small.png b/OsmAnd/res/drawable-mdpi/ic_note_small.png
deleted file mode 100644
index 48e778db2d..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/ic_note_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_note_video.png b/OsmAnd/res/drawable-mdpi/ic_note_video.png
deleted file mode 100644
index f0429b740c..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/ic_note_video.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_pin_avoid_road.png b/OsmAnd/res/drawable-mdpi/ic_pin_avoid_road.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_pin_avoid_road.png
rename to OsmAnd/res/drawable-mdpi/ic_pin_avoid_road.png
diff --git a/OsmAnd/res/drawable-mdpi/map_shield_marker_point_color.png b/OsmAnd/res/drawable-mdpi/ic_shield_marker_point_color.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_shield_marker_point_color.png
rename to OsmAnd/res/drawable-mdpi/ic_shield_marker_point_color.png
diff --git a/OsmAnd/res/drawable-mdpi/map_shield_marker_point_shadow.png b/OsmAnd/res/drawable-mdpi/ic_shield_marker_point_shadow.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_shield_marker_point_shadow.png
rename to OsmAnd/res/drawable-mdpi/ic_shield_marker_point_shadow.png
diff --git a/OsmAnd/res/drawable-mdpi/map_shield_marker_point_stroke.png b/OsmAnd/res/drawable-mdpi/ic_shield_marker_point_stroke.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_shield_marker_point_stroke.png
rename to OsmAnd/res/drawable-mdpi/ic_shield_marker_point_stroke.png
diff --git a/OsmAnd/res/drawable-mdpi/ic_white_orange_poi_shield.png b/OsmAnd/res/drawable-mdpi/ic_white_orange_poi_shield.png
deleted file mode 100644
index b953bd5a38..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/ic_white_orange_poi_shield.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_white_orange_poi_shield_small.png b/OsmAnd/res/drawable-mdpi/ic_white_orange_poi_shield_small.png
deleted file mode 100644
index c832fda288..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/ic_white_orange_poi_shield_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_white_shield_small.png b/OsmAnd/res/drawable-mdpi/ic_white_shield_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_white_shield_small.png
rename to OsmAnd/res/drawable-mdpi/ic_white_shield_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_osm_resolved.png b/OsmAnd/res/drawable-mdpi/map_osm_resolved.png
deleted file mode 100644
index 5d3e53b875..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_osm_resolved.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_osm_resolved_small.png b/OsmAnd/res/drawable-mdpi/map_osm_resolved_small.png
deleted file mode 100644
index 0ba3a764e0..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_osm_resolved_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_osm_unresolved.png b/OsmAnd/res/drawable-mdpi/map_osm_unresolved.png
deleted file mode 100644
index 02c0dbb338..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_osm_unresolved.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_osm_unresolved_small.png b/OsmAnd/res/drawable-mdpi/map_osm_unresolved_small.png
deleted file mode 100644
index 865d16ee14..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_osm_unresolved_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_pin_destination.png b/OsmAnd/res/drawable-mdpi/map_pin_destination.png
deleted file mode 100644
index bf1c5801e4..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_pin_destination.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_pin_origin.png b/OsmAnd/res/drawable-mdpi/map_pin_origin.png
deleted file mode 100644
index 2b63c5e272..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_pin_origin.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_pin_poi.png b/OsmAnd/res/drawable-mdpi/map_pin_poi.png
deleted file mode 100644
index eae4ed951a..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_pin_poi.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_pin_poi_small.png b/OsmAnd/res/drawable-mdpi/map_pin_poi_small.png
deleted file mode 100644
index b9ee787477..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_pin_poi_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_poi_parking_pos_limit.png b/OsmAnd/res/drawable-mdpi/map_poi_parking_pos_limit.png
deleted file mode 100644
index 46013b1025..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_poi_parking_pos_limit.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_poi_parking_pos_no_limit.png b/OsmAnd/res/drawable-mdpi/map_poi_parking_pos_no_limit.png
deleted file mode 100644
index 1563bbeb47..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_poi_parking_pos_no_limit.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_transport_stop_bg.png b/OsmAnd/res/drawable-mdpi/map_transport_stop_bg.png
deleted file mode 100644
index 95b0e8bf47..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_transport_stop_bg.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_transport_stop_bus.png b/OsmAnd/res/drawable-mdpi/map_transport_stop_bus.png
deleted file mode 100644
index 3968b969fb..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_transport_stop_bus.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_transport_stop_small.png b/OsmAnd/res/drawable-mdpi/map_transport_stop_small.png
deleted file mode 100644
index c98e19bb2d..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_transport_stop_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_transport_stop_tram.png b/OsmAnd/res/drawable-mdpi/map_transport_stop_tram.png
deleted file mode 100644
index 2baf5ff167..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_transport_stop_tram.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward.png b/OsmAnd/res/drawable-mdpi/map_turn_forward.png
deleted file mode 100644
index bdf4c96ff4..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_keep_right.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_keep_right.png
deleted file mode 100644
index a2a0f3d7b8..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_keep_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_keep_right_small.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_keep_right_small.png
deleted file mode 100644
index 8a339f920c..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_keep_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_right_turn.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_right_turn.png
deleted file mode 100644
index baeeca9271..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_right_turn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_right_turn_small.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_right_turn_small.png
deleted file mode 100644
index fb3fdbefa4..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_right_turn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_slight_right_turn.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_slight_right_turn.png
deleted file mode 100644
index 452ecefdec..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_slight_right_turn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_slight_right_turn_small.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_slight_right_turn_small.png
deleted file mode 100644
index dfc000e52d..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_slight_right_turn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_small.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_small.png
deleted file mode 100644
index d70eace6b7..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_turn_sharp.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_turn_sharp.png
deleted file mode 100644
index 1f11c2004f..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_turn_sharp.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_turn_sharp_small.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_turn_sharp_small.png
deleted file mode 100644
index ed6c1c4cbb..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_turn_sharp_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_uturn_right.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_uturn_right.png
deleted file mode 100644
index c5d5f24f36..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_uturn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_forward_uturn_right_small.png b/OsmAnd/res/drawable-mdpi/map_turn_forward_uturn_right_small.png
deleted file mode 100644
index a2a5cfff46..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_forward_uturn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_keep_right.png b/OsmAnd/res/drawable-mdpi/map_turn_keep_right.png
deleted file mode 100644
index 6775427dd6..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_keep_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_keep_right_small.png b/OsmAnd/res/drawable-mdpi/map_turn_keep_right_small.png
deleted file mode 100644
index 57a11ac3be..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_keep_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_right.png b/OsmAnd/res/drawable-mdpi/map_turn_right.png
deleted file mode 100644
index cf5e5f0243..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_right2.png b/OsmAnd/res/drawable-mdpi/map_turn_right2.png
deleted file mode 100644
index 594b8c6b8b..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_right2.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_right2_small.png b/OsmAnd/res/drawable-mdpi/map_turn_right2_small.png
deleted file mode 100644
index 61f149e592..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_right2_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_right_small.png b/OsmAnd/res/drawable-mdpi/map_turn_right_small.png
deleted file mode 100644
index 095a3362be..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_sharp_right.png b/OsmAnd/res/drawable-mdpi/map_turn_sharp_right.png
deleted file mode 100644
index 26a5fdeda2..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_sharp_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_sharp_right_small.png b/OsmAnd/res/drawable-mdpi/map_turn_sharp_right_small.png
deleted file mode 100644
index 36ac46e5e9..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_sharp_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_slight_right.png b/OsmAnd/res/drawable-mdpi/map_turn_slight_right.png
deleted file mode 100644
index 45db48c507..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_slight_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_slight_right_small.png b/OsmAnd/res/drawable-mdpi/map_turn_slight_right_small.png
deleted file mode 100644
index d738f28bc3..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_slight_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_uturn.png b/OsmAnd/res/drawable-mdpi/map_turn_uturn.png
deleted file mode 100644
index e8f4a529e2..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_uturn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_uturn_right.png b/OsmAnd/res/drawable-mdpi/map_turn_uturn_right.png
deleted file mode 100644
index c1e4ddc1d4..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_uturn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_uturn_right_small.png b/OsmAnd/res/drawable-mdpi/map_turn_uturn_right_small.png
deleted file mode 100644
index d09f550e37..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_uturn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_turn_uturn_small.png b/OsmAnd/res/drawable-mdpi/map_turn_uturn_small.png
deleted file mode 100644
index badcad0df2..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_turn_uturn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_white_shield.png b/OsmAnd/res/drawable-mdpi/map_white_shield.png
deleted file mode 100644
index 82150d4f93..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_white_shield.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_widget_compass_ruller_day.png b/OsmAnd/res/drawable-mdpi/map_widget_compass_ruller_day.png
deleted file mode 100644
index 986f3c1582..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_widget_compass_ruller_day.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/map_widget_compass_ruller_location_day.png b/OsmAnd/res/drawable-mdpi/map_widget_compass_ruller_location_day.png
deleted file mode 100644
index 411e1078b5..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/map_widget_compass_ruller_location_day.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_marker_point_14dp.png b/OsmAnd/res/drawable-xhdpi/ic_marker_point_14dp.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_marker_point_14dp.png
rename to OsmAnd/res/drawable-xhdpi/ic_marker_point_14dp.png
diff --git a/OsmAnd/res/drawable-xhdpi/ic_note_audio.png b/OsmAnd/res/drawable-xhdpi/ic_note_audio.png
deleted file mode 100644
index 237069e0da..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/ic_note_audio.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_note_photo.png b/OsmAnd/res/drawable-xhdpi/ic_note_photo.png
deleted file mode 100644
index 365a9a5b60..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/ic_note_photo.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_note_small.png b/OsmAnd/res/drawable-xhdpi/ic_note_small.png
deleted file mode 100644
index 5d1d0b5347..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/ic_note_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_note_video.png b/OsmAnd/res/drawable-xhdpi/ic_note_video.png
deleted file mode 100644
index a5f9dba5d9..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/ic_note_video.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_pin_avoid_road.png b/OsmAnd/res/drawable-xhdpi/ic_pin_avoid_road.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_pin_avoid_road.png
rename to OsmAnd/res/drawable-xhdpi/ic_pin_avoid_road.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_shield_marker_point_color.png b/OsmAnd/res/drawable-xhdpi/ic_shield_marker_point_color.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_shield_marker_point_color.png
rename to OsmAnd/res/drawable-xhdpi/ic_shield_marker_point_color.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_shield_marker_point_shadow.png b/OsmAnd/res/drawable-xhdpi/ic_shield_marker_point_shadow.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_shield_marker_point_shadow.png
rename to OsmAnd/res/drawable-xhdpi/ic_shield_marker_point_shadow.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_shield_marker_point_stroke.png b/OsmAnd/res/drawable-xhdpi/ic_shield_marker_point_stroke.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_shield_marker_point_stroke.png
rename to OsmAnd/res/drawable-xhdpi/ic_shield_marker_point_stroke.png
diff --git a/OsmAnd/res/drawable-xhdpi/ic_white_orange_poi_shield.png b/OsmAnd/res/drawable-xhdpi/ic_white_orange_poi_shield.png
deleted file mode 100644
index 606b1af8a6..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/ic_white_orange_poi_shield.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_white_orange_poi_shield_small.png b/OsmAnd/res/drawable-xhdpi/ic_white_orange_poi_shield_small.png
deleted file mode 100644
index 59a9d8360a..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/ic_white_orange_poi_shield_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_white_shield_small.png b/OsmAnd/res/drawable-xhdpi/ic_white_shield_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_white_shield_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_white_shield_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_osm_resolved.png b/OsmAnd/res/drawable-xhdpi/map_osm_resolved.png
deleted file mode 100644
index 5850ea0466..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_osm_resolved.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_osm_resolved_small.png b/OsmAnd/res/drawable-xhdpi/map_osm_resolved_small.png
deleted file mode 100644
index cabf5388ea..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_osm_resolved_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_osm_unresolved.png b/OsmAnd/res/drawable-xhdpi/map_osm_unresolved.png
deleted file mode 100644
index 4475cda0ab..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_osm_unresolved.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_osm_unresolved_small.png b/OsmAnd/res/drawable-xhdpi/map_osm_unresolved_small.png
deleted file mode 100644
index 4038709e71..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_osm_unresolved_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_pin_destination.png b/OsmAnd/res/drawable-xhdpi/map_pin_destination.png
deleted file mode 100644
index abb6ac89f8..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_pin_destination.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_pin_origin.png b/OsmAnd/res/drawable-xhdpi/map_pin_origin.png
deleted file mode 100644
index d3e53732ff..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_pin_origin.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_pin_poi.png b/OsmAnd/res/drawable-xhdpi/map_pin_poi.png
deleted file mode 100644
index 1f218bdca1..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_pin_poi.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_pin_poi_small.png b/OsmAnd/res/drawable-xhdpi/map_pin_poi_small.png
deleted file mode 100644
index 287964f5d6..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_pin_poi_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_poi_parking_pos_limit.png b/OsmAnd/res/drawable-xhdpi/map_poi_parking_pos_limit.png
deleted file mode 100644
index d99ba8bf57..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_poi_parking_pos_limit.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_poi_parking_pos_no_limit.png b/OsmAnd/res/drawable-xhdpi/map_poi_parking_pos_no_limit.png
deleted file mode 100644
index b98f1f18fa..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_poi_parking_pos_no_limit.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_transport_stop_bg.png b/OsmAnd/res/drawable-xhdpi/map_transport_stop_bg.png
deleted file mode 100644
index a7a0333ef9..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_transport_stop_bg.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_transport_stop_bus.png b/OsmAnd/res/drawable-xhdpi/map_transport_stop_bus.png
deleted file mode 100644
index e2dd0ea9c9..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_transport_stop_bus.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_transport_stop_small.png b/OsmAnd/res/drawable-xhdpi/map_transport_stop_small.png
deleted file mode 100644
index 493d859b3b..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_transport_stop_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_transport_stop_tram.png b/OsmAnd/res/drawable-xhdpi/map_transport_stop_tram.png
deleted file mode 100644
index 5bc8cb3c81..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_transport_stop_tram.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward.png
deleted file mode 100644
index 0a222d0a11..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_keep_right.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_keep_right.png
deleted file mode 100644
index 5c290d7707..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_keep_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_keep_right_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_keep_right_small.png
deleted file mode 100644
index 38ad7adaf4..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_keep_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_right_turn.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_right_turn.png
deleted file mode 100644
index 7756a121f4..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_right_turn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_right_turn_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_right_turn_small.png
deleted file mode 100644
index 1b90789e77..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_right_turn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_slight_right_turn.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_slight_right_turn.png
deleted file mode 100644
index 97de9a60fe..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_slight_right_turn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_slight_right_turn_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_slight_right_turn_small.png
deleted file mode 100644
index 81a4cbfa68..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_slight_right_turn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_small.png
deleted file mode 100644
index b014067f03..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_turn_sharp.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_turn_sharp.png
deleted file mode 100644
index f3482f0c23..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_turn_sharp.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_turn_sharp_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_turn_sharp_small.png
deleted file mode 100644
index 27bfb349b9..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_turn_sharp_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_uturn_right.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_uturn_right.png
deleted file mode 100644
index d259fdbe3d..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_uturn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_forward_uturn_right_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_forward_uturn_right_small.png
deleted file mode 100644
index a65c919bd2..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_forward_uturn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_keep_right.png b/OsmAnd/res/drawable-xhdpi/map_turn_keep_right.png
deleted file mode 100644
index 7277425cc1..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_keep_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_keep_right_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_keep_right_small.png
deleted file mode 100644
index 54247bcc25..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_keep_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_right.png b/OsmAnd/res/drawable-xhdpi/map_turn_right.png
deleted file mode 100644
index 84b2fe9948..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_right2.png b/OsmAnd/res/drawable-xhdpi/map_turn_right2.png
deleted file mode 100644
index 28faea75f1..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_right2.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_right2_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_right2_small.png
deleted file mode 100644
index 873a8779f8..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_right2_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_right_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_right_small.png
deleted file mode 100644
index 8d344bcfc3..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_sharp_right.png b/OsmAnd/res/drawable-xhdpi/map_turn_sharp_right.png
deleted file mode 100644
index 8c8876b63f..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_sharp_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_sharp_right_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_sharp_right_small.png
deleted file mode 100644
index cd0b8f8439..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_sharp_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_slight_right.png b/OsmAnd/res/drawable-xhdpi/map_turn_slight_right.png
deleted file mode 100644
index ca38c26726..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_slight_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_slight_right_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_slight_right_small.png
deleted file mode 100644
index e130b53d6f..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_slight_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_uturn.png b/OsmAnd/res/drawable-xhdpi/map_turn_uturn.png
deleted file mode 100644
index 0f758155e0..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_uturn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_uturn_right.png b/OsmAnd/res/drawable-xhdpi/map_turn_uturn_right.png
deleted file mode 100644
index 0870146a93..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_uturn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_uturn_right_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_uturn_right_small.png
deleted file mode 100644
index 957fec2df7..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_uturn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_turn_uturn_small.png b/OsmAnd/res/drawable-xhdpi/map_turn_uturn_small.png
deleted file mode 100644
index c3e50eca92..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_turn_uturn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_white_shield.png b/OsmAnd/res/drawable-xhdpi/map_white_shield.png
deleted file mode 100644
index 48878cc1e6..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_white_shield.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_widget_compass_ruller_day.png b/OsmAnd/res/drawable-xhdpi/map_widget_compass_ruller_day.png
deleted file mode 100644
index 3581492366..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_widget_compass_ruller_day.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_widget_compass_ruller_location_day.png b/OsmAnd/res/drawable-xhdpi/map_widget_compass_ruller_location_day.png
deleted file mode 100644
index e7258a79ef..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_widget_compass_ruller_location_day.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_world_globe_dark.png b/OsmAnd/res/drawable-xhdpi/map_world_globe_dark.png
deleted file mode 100644
index 0255f1b883..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/map_world_globe_dark.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_marker_point_14dp.png b/OsmAnd/res/drawable-xxhdpi/ic_marker_point_14dp.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_marker_point_14dp.png
rename to OsmAnd/res/drawable-xxhdpi/ic_marker_point_14dp.png
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_note_audio.png b/OsmAnd/res/drawable-xxhdpi/ic_note_audio.png
deleted file mode 100644
index f00aa9a3b4..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/ic_note_audio.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_note_photo.png b/OsmAnd/res/drawable-xxhdpi/ic_note_photo.png
deleted file mode 100644
index 8a2a815188..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/ic_note_photo.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_note_small.png b/OsmAnd/res/drawable-xxhdpi/ic_note_small.png
deleted file mode 100644
index 36f1170503..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/ic_note_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_note_video.png b/OsmAnd/res/drawable-xxhdpi/ic_note_video.png
deleted file mode 100644
index 8f09403f52..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/ic_note_video.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_pin_avoid_road.png b/OsmAnd/res/drawable-xxhdpi/ic_pin_avoid_road.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_pin_avoid_road.png
rename to OsmAnd/res/drawable-xxhdpi/ic_pin_avoid_road.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_shield_marker_point_color.png b/OsmAnd/res/drawable-xxhdpi/ic_shield_marker_point_color.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_shield_marker_point_color.png
rename to OsmAnd/res/drawable-xxhdpi/ic_shield_marker_point_color.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_shield_marker_point_shadow.png b/OsmAnd/res/drawable-xxhdpi/ic_shield_marker_point_shadow.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_shield_marker_point_shadow.png
rename to OsmAnd/res/drawable-xxhdpi/ic_shield_marker_point_shadow.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_shield_marker_point_stroke.png b/OsmAnd/res/drawable-xxhdpi/ic_shield_marker_point_stroke.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_shield_marker_point_stroke.png
rename to OsmAnd/res/drawable-xxhdpi/ic_shield_marker_point_stroke.png
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_white_orange_poi_shield.png b/OsmAnd/res/drawable-xxhdpi/ic_white_orange_poi_shield.png
deleted file mode 100644
index fd74fb4a1d..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/ic_white_orange_poi_shield.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_white_orange_poi_shield_small.png b/OsmAnd/res/drawable-xxhdpi/ic_white_orange_poi_shield_small.png
deleted file mode 100644
index de66729794..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/ic_white_orange_poi_shield_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_white_shield_small.png b/OsmAnd/res/drawable-xxhdpi/ic_white_shield_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_white_shield_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_white_shield_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_osm_resolved.png b/OsmAnd/res/drawable-xxhdpi/map_osm_resolved.png
deleted file mode 100644
index 3f016cf216..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_osm_resolved.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_osm_resolved_small.png b/OsmAnd/res/drawable-xxhdpi/map_osm_resolved_small.png
deleted file mode 100644
index 15a0b462e2..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_osm_resolved_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_osm_unresolved.png b/OsmAnd/res/drawable-xxhdpi/map_osm_unresolved.png
deleted file mode 100644
index dd70e4bfbb..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_osm_unresolved.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_osm_unresolved_small.png b/OsmAnd/res/drawable-xxhdpi/map_osm_unresolved_small.png
deleted file mode 100644
index d9afeef173..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_osm_unresolved_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_pin_destination.png b/OsmAnd/res/drawable-xxhdpi/map_pin_destination.png
deleted file mode 100644
index 10adc01c2f..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_pin_destination.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_pin_origin.png b/OsmAnd/res/drawable-xxhdpi/map_pin_origin.png
deleted file mode 100644
index a234377be6..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_pin_origin.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_pin_poi.png b/OsmAnd/res/drawable-xxhdpi/map_pin_poi.png
deleted file mode 100644
index cd2a444309..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_pin_poi.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_pin_poi_small.png b/OsmAnd/res/drawable-xxhdpi/map_pin_poi_small.png
deleted file mode 100644
index 9a335a91c6..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_pin_poi_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_poi_parking_pos_limit.png b/OsmAnd/res/drawable-xxhdpi/map_poi_parking_pos_limit.png
deleted file mode 100644
index 894d41feb6..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_poi_parking_pos_limit.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_poi_parking_pos_no_limit.png b/OsmAnd/res/drawable-xxhdpi/map_poi_parking_pos_no_limit.png
deleted file mode 100644
index 3a19aa5bac..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_poi_parking_pos_no_limit.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_transport_stop_bg.png b/OsmAnd/res/drawable-xxhdpi/map_transport_stop_bg.png
deleted file mode 100644
index 1679401d7b..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_transport_stop_bg.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_transport_stop_bus.png b/OsmAnd/res/drawable-xxhdpi/map_transport_stop_bus.png
deleted file mode 100644
index 5d1636ae9e..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_transport_stop_bus.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_transport_stop_small.png b/OsmAnd/res/drawable-xxhdpi/map_transport_stop_small.png
deleted file mode 100644
index 33a327e22f..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_transport_stop_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_transport_stop_tram.png b/OsmAnd/res/drawable-xxhdpi/map_transport_stop_tram.png
deleted file mode 100644
index 327e5250d2..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_transport_stop_tram.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward.png
deleted file mode 100644
index c1015b73dd..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_keep_right.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_keep_right.png
deleted file mode 100644
index b4ce1ee92f..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_keep_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_keep_right_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_keep_right_small.png
deleted file mode 100644
index 7ee6716151..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_keep_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_right_turn.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_right_turn.png
deleted file mode 100644
index 0435ded215..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_right_turn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_right_turn_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_right_turn_small.png
deleted file mode 100644
index a744e9f595..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_right_turn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_slight_right_turn.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_slight_right_turn.png
deleted file mode 100644
index 9ecc92c619..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_slight_right_turn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_slight_right_turn_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_slight_right_turn_small.png
deleted file mode 100644
index a44916e491..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_slight_right_turn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_small.png
deleted file mode 100644
index dafb941c83..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_turn_sharp.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_turn_sharp.png
deleted file mode 100644
index 06d941c1ba..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_turn_sharp.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_turn_sharp_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_turn_sharp_small.png
deleted file mode 100644
index b9d34a95e5..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_turn_sharp_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_uturn_right.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_uturn_right.png
deleted file mode 100644
index 62fc53f569..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_uturn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_uturn_right_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_forward_uturn_right_small.png
deleted file mode 100644
index ace2fed237..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_forward_uturn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_keep_right.png b/OsmAnd/res/drawable-xxhdpi/map_turn_keep_right.png
deleted file mode 100644
index 503cf38469..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_keep_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_keep_right_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_keep_right_small.png
deleted file mode 100644
index c488b8170b..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_keep_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_right.png b/OsmAnd/res/drawable-xxhdpi/map_turn_right.png
deleted file mode 100644
index 2a7f0fff53..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_right2.png b/OsmAnd/res/drawable-xxhdpi/map_turn_right2.png
deleted file mode 100644
index 87a839262d..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_right2.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_right2_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_right2_small.png
deleted file mode 100644
index 6a1ed801bd..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_right2_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_right_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_right_small.png
deleted file mode 100644
index cfa7d81925..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_sharp_right.png b/OsmAnd/res/drawable-xxhdpi/map_turn_sharp_right.png
deleted file mode 100644
index bf0582845e..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_sharp_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_sharp_right_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_sharp_right_small.png
deleted file mode 100644
index 96bdcad4ea..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_sharp_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_slight_right.png b/OsmAnd/res/drawable-xxhdpi/map_turn_slight_right.png
deleted file mode 100644
index 357ed538b8..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_slight_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_slight_right_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_slight_right_small.png
deleted file mode 100644
index 8debf40f17..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_slight_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_uturn.png b/OsmAnd/res/drawable-xxhdpi/map_turn_uturn.png
deleted file mode 100644
index c645cb9158..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_uturn.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_uturn_right.png b/OsmAnd/res/drawable-xxhdpi/map_turn_uturn_right.png
deleted file mode 100644
index 018ce214e6..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_uturn_right.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_uturn_right_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_uturn_right_small.png
deleted file mode 100644
index 2ba8b92d76..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_uturn_right_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_turn_uturn_small.png b/OsmAnd/res/drawable-xxhdpi/map_turn_uturn_small.png
deleted file mode 100644
index 41e2bf50c9..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_turn_uturn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_white_shield.png b/OsmAnd/res/drawable-xxhdpi/map_white_shield.png
deleted file mode 100644
index eba1522750..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_white_shield.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_widget_compass_ruller_day.png b/OsmAnd/res/drawable-xxhdpi/map_widget_compass_ruller_day.png
deleted file mode 100644
index 89c82b29ce..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_widget_compass_ruller_day.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_widget_compass_ruller_location_day.png b/OsmAnd/res/drawable-xxhdpi/map_widget_compass_ruller_location_day.png
deleted file mode 100644
index 1b86292f0c..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_widget_compass_ruller_location_day.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_world_globe_dark.png b/OsmAnd/res/drawable-xxhdpi/map_world_globe_dark.png
deleted file mode 100644
index 97d6b3b781..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/map_world_globe_dark.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_pin_avoid_road.png b/OsmAnd/res/drawable-xxxhdpi/ic_pin_avoid_road.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_pin_avoid_road.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_pin_avoid_road.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_widget_compass_ruller_day.png b/OsmAnd/res/drawable-xxxhdpi/map_widget_compass_ruller_day.png
deleted file mode 100644
index 4b2714ce58..0000000000
Binary files a/OsmAnd/res/drawable-xxxhdpi/map_widget_compass_ruller_day.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_widget_compass_ruller_location_day.png b/OsmAnd/res/drawable-xxxhdpi/map_widget_compass_ruller_location_day.png
deleted file mode 100644
index 1e461a55e8..0000000000
Binary files a/OsmAnd/res/drawable-xxxhdpi/map_widget_compass_ruller_location_day.png and /dev/null differ
diff --git a/OsmAnd/res/layout-land/map_hud_top.xml b/OsmAnd/res/layout-land/map_hud_top.xml
index bf63d6862c..d9d17ad27d 100644
--- a/OsmAnd/res/layout-land/map_hud_top.xml
+++ b/OsmAnd/res/layout-land/map_hud_top.xml
@@ -367,8 +367,7 @@
android:id="@+id/map_turn_icon"
android:layout_width="@dimen/map_widget_height"
android:layout_height="@dimen/map_widget_height"
- android:scaleType="fitCenter"
- tools:src="@drawable/map_turn_right_small" />
+ android:scaleType="fitCenter"/>
+ android:visibility="gone"/>
#128a89
#4caf50
- #d44a4a
- #4caf50
+ #D42020
+ #12B21A
#ff8f00
#33B4E4
@@ -190,6 +190,8 @@
#eecc22
#b3b3b3
+ #244DBD
+ #5870FE
diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml
index b5cb7cc697..087d69932b 100644
--- a/OsmAnd/res/values/sizes.xml
+++ b/OsmAnd/res/values/sizes.xml
@@ -77,6 +77,7 @@
13dp
28dp
48dp
+ 20dp
2dp
60dp
76dp
diff --git a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java
index 7e50a098a7..f6bb1866e7 100644
--- a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java
+++ b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java
@@ -342,7 +342,7 @@ public class FavouritesDbHelper {
if (!p.getName().equals("")) {
p.setVisible(group.visible);
if (FavouritePoint.SpecialPointType.PARKING.equals(p.getSpecialPointType())) {
- p.setColor(ContextCompat.getColor(context, R.color.map_widget_blue));
+ p.setColor(ContextCompat.getColor(context, R.color.parking_icon_background));
} else {
if (p.getColor() == 0) {
p.setColor(group.color);
@@ -485,7 +485,7 @@ public class FavouritesDbHelper {
FavoriteGroup pg = getOrCreateGroup(p, 0);
p.setVisible(pg.visible);
if (FavouritePoint.SpecialPointType.PARKING.equals(p.getSpecialPointType())) {
- p.setColor(ContextCompat.getColor(context, R.color.map_widget_blue));
+ p.setColor(ContextCompat.getColor(context, R.color.parking_icon_background));
} else {
if (p.getColor() == 0) {
p.setColor(pg.color);
diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java
index f5db5a3ce4..e2d8ff2e03 100644
--- a/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java
+++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesListFragment.java
@@ -32,7 +32,7 @@ import net.osmand.plus.UiUtilities;
import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
import net.osmand.plus.activities.search.SearchActivity;
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.base.OsmAndListFragment;
import net.osmand.util.MapUtils;
@@ -232,7 +232,7 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
}
((TextView) row.findViewById(R.id.group_name)).setText(favorite.getCategory());
- icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(activity, app.getFavorites().getColorWithCategory(favorite,
+ icon.setImageDrawable(PointImageDrawable.getFromFavorite(activity, app.getFavorites().getColorWithCategory(favorite,
app.getResources().getColor(R.color.color_favorite)), false, favorite));
app.getUIUtilities().updateLocationView(cache, direction, distanceText,
diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesSearchFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesSearchFragment.java
index 192176ca42..ac02ed60c9 100644
--- a/OsmAnd/src/net/osmand/plus/activities/FavoritesSearchFragment.java
+++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesSearchFragment.java
@@ -47,7 +47,7 @@ import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.R;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.myplaces.FavoritesActivity;
import net.osmand.util.Algorithms;
import net.osmand.util.MapUtils;
@@ -463,7 +463,7 @@ public class FavoritesSearchFragment extends DialogFragment {
TextView title = (TextView) view.findViewById(R.id.title);
TextView subtitle = (TextView) view.findViewById(R.id.subtitle);
- imageView.setImageDrawable(FavoriteImageDrawable.getOrCreate(activity,
+ imageView.setImageDrawable(PointImageDrawable.getFromFavorite(activity,
helper.getColorWithCategory(point, getResources().getColor(R.color.color_favorite)),
false, point));
title.setText(point.getDisplayName(app));
diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java
index 7f0f1b287d..f04b727d5f 100644
--- a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java
+++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java
@@ -47,7 +47,7 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.base.OsmandExpandableListFragment;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.FontCache;
@@ -1032,7 +1032,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen
int color = visible
? app.getFavorites().getColorWithCategory(model, getResources().getColor(R.color.color_favorite))
: ContextCompat.getColor(app, disabledIconColor);
- icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(getActivity(), color, false, model));
+ icon.setImageDrawable(PointImageDrawable.getFromFavorite(getActivity(), color, false, model));
int iconSize = (int) getResources().getDimension(R.dimen.favorites_my_places_icon_size);
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(iconSize, iconSize, CENTER);
icon.setLayoutParams(lp);
diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java
index 6e9938f4ef..b5f0aed71d 100644
--- a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java
+++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java
@@ -1,16 +1,11 @@
package net.osmand.plus.audionotes;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.Paint.Style;
import android.graphics.PointF;
-import android.graphics.Rect;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.core.content.ContextCompat;
import net.osmand.data.DataTileManager;
import net.osmand.data.LatLon;
@@ -21,6 +16,7 @@ import net.osmand.data.RotatedTileBox;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.audionotes.AudioVideoNotesPlugin.Recording;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.views.ContextMenuLayer;
import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider;
import net.osmand.plus.views.OsmandMapLayer;
@@ -36,14 +32,7 @@ public class AudioNotesLayer extends OsmandMapLayer implements
private static final int startZoom = 10;
private MapActivity activity;
private AudioVideoNotesPlugin plugin;
- private Paint pointAltUI;
- private Paint paintIcon;
private OsmandMapTileView view;
- private Bitmap audio;
- private Bitmap video;
- private Bitmap photo;
- private Bitmap pointSmall;
-
private ContextMenuLayer contextMenuLayer;
public AudioNotesLayer(MapActivity activity, AudioVideoNotesPlugin plugin) {
@@ -54,24 +43,6 @@ public class AudioNotesLayer extends OsmandMapLayer implements
@Override
public void initLayer(OsmandMapTileView view) {
this.view = view;
-
- pointAltUI = new Paint();
- pointAltUI.setColor(0xa0FF3344);
- pointAltUI.setStyle(Style.FILL);
-
- audio = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_note_audio);
- video = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_note_video);
- photo = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_note_photo);
-
- pointSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_note_small);
-
- paintIcon = new Paint();
-
- Paint point = new Paint();
- point.setColor(Color.GRAY);
- point.setAntiAlias(true);
- point.setStyle(Style.STROKE);
-
contextMenuLayer = view.getLayerByClass(ContextMenuLayer.class);
}
@@ -99,7 +70,7 @@ public class AudioNotesLayer extends OsmandMapLayer implements
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
if (tileBox.getZoom() >= startZoom) {
float textScale = activity.getMyApplication().getSettings().TEXT_SCALE.get();
- float iconSize = audio.getWidth() * 3 / 2.5f * textScale;
+ float iconSize = getIconSize(activity) * 3 / 2.5f * textScale;
QuadTree boundIntersections = initBoundIntersections(tileBox);
DataTileManager recs = plugin.getRecordings();
@@ -114,8 +85,10 @@ public class AudioNotesLayer extends OsmandMapLayer implements
float y = tileBox.getPixYFromLatLon(o.getLatitude(), o.getLongitude());
if (intersects(boundIntersections, x, y, iconSize, iconSize)) {
- Rect destRect = getIconDestinationRect(x, y, pointSmall.getWidth(), pointSmall.getHeight(), textScale);
- canvas.drawBitmap(pointSmall, null, destRect, paintIcon);
+ PointImageDrawable pointImageDrawable = PointImageDrawable.getOrCreate(activity,
+ ContextCompat.getColor(activity, R.color.audio_video_icon_color), true);
+ pointImageDrawable.setAlpha(0.8f);
+ pointImageDrawable.drawSmallPoint(canvas, x, y, textScale);
smallObjectsLatLon.add(new LatLon(o.getLatitude(), o.getLongitude()));
} else {
fullObjects.add(o);
@@ -134,16 +107,18 @@ public class AudioNotesLayer extends OsmandMapLayer implements
}
private void drawRecording(Canvas canvas, Recording o, float x, float y, float textScale) {
- Bitmap b;
+ int iconId;
if (o.isPhoto()) {
- b = photo;
+ iconId = R.drawable.mx_special_photo_camera;
} else if (o.isAudio()) {
- b = audio;
+ iconId = R.drawable.mx_special_microphone;
} else {
- b = video;
+ iconId = R.drawable.mx_special_video_camera;
}
- Rect destRect = getIconDestinationRect(x, y, b.getWidth(), b.getHeight(), textScale);
- canvas.drawBitmap(b, null, destRect, paintIcon);
+ PointImageDrawable pointImageDrawable = PointImageDrawable.getOrCreate(activity,
+ ContextCompat.getColor(activity, R.color.audio_video_icon_color), true, iconId);
+ pointImageDrawable.setAlpha(0.8f);
+ pointImageDrawable.drawPoint(canvas, x, y, textScale, false);
}
@Override
@@ -155,7 +130,6 @@ public class AudioNotesLayer extends OsmandMapLayer implements
return true;
}
-
@Override
public PointDescription getObjectName(Object o) {
if (o instanceof Recording) {
@@ -227,7 +201,6 @@ public class AudioNotesLayer extends OsmandMapLayer implements
return null;
}
-
@Override
public boolean isObjectMovable(Object o) {
return o instanceof Recording;
diff --git a/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java b/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java
deleted file mode 100644
index f0eaf64273..0000000000
--- a/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java
+++ /dev/null
@@ -1,223 +0,0 @@
-package net.osmand.plus.base;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Canvas;
-import android.graphics.ColorFilter;
-import android.graphics.Paint;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffColorFilter;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-
-import androidx.annotation.NonNull;
-
-import net.osmand.GPXUtilities;
-import net.osmand.data.FavouritePoint;
-import net.osmand.data.FavouritePoint.BackgroundType;
-import net.osmand.plus.OsmandApplication;
-import net.osmand.plus.R;
-import net.osmand.plus.UiUtilities;
-
-import java.util.TreeMap;
-
-import static net.osmand.data.FavouritePoint.DEFAULT_BACKGROUND_TYPE;
-import static net.osmand.data.FavouritePoint.DEFAULT_UI_ICON_ID;
-
-public class FavoriteImageDrawable extends Drawable {
-
- private boolean withShadow;
- private boolean synced;
- private boolean history;
- private Drawable favIcon;
- private Bitmap favBackgroundTop;
- private Bitmap favBackgroundCenter;
- private Bitmap favBackgroundBottom;
- private Bitmap syncedStroke;
- private Bitmap syncedColor;
- private Bitmap syncedShadow;
- private Bitmap syncedIcon;
- private Drawable uiListIcon;
- private Drawable uiBackgroundIcon;
- private Paint paintIcon = new Paint();
- private Paint paintBackground = new Paint();
- private ColorFilter colorFilter;
- private ColorFilter grayFilter;
-
- private FavoriteImageDrawable(Context ctx, int color, boolean withShadow, boolean synced, FavouritePoint point) {
- this.withShadow = withShadow;
- this.synced = synced;
- Resources res = ctx.getResources();
- UiUtilities uiUtilities = ((OsmandApplication) ctx.getApplicationContext()).getUIUtilities();
- int overlayIconId = point != null ? point.getOverlayIconId(ctx) : 0;
- int uiIconId;
- if (overlayIconId != 0) {
- favIcon = uiUtilities.getIcon(getMapIconId(ctx, overlayIconId), R.color.color_white);
- uiIconId = overlayIconId;
- } else {
- favIcon = res.getDrawable(R.drawable.mm_special_star);
- uiIconId = DEFAULT_UI_ICON_ID;
- }
- int col = color == 0 ? res.getColor(R.color.color_favorite) : color;
- uiListIcon = uiUtilities.getIcon(uiIconId, R.color.color_white);
- int uiBackgroundIconId = point != null ? point.getBackgroundType().getIconId() : R.drawable.bg_point_circle;
- uiBackgroundIcon = uiUtilities.getPaintedIcon(uiBackgroundIconId, col);
- int mapBackgroundIconIdTop = getMapBackgroundIconId(ctx, point, "top");
- int mapBackgroundIconIdCenter = getMapBackgroundIconId(ctx, point, "center");
- int mapBackgroundIconIdBottom = getMapBackgroundIconId(ctx, point, "bottom");
- favBackgroundTop = BitmapFactory.decodeResource(res, mapBackgroundIconIdTop);
- favBackgroundCenter = BitmapFactory.decodeResource(res, mapBackgroundIconIdCenter);
- favBackgroundBottom = BitmapFactory.decodeResource(res, mapBackgroundIconIdBottom);
- syncedStroke = BitmapFactory.decodeResource(res, R.drawable.map_shield_marker_point_stroke);
- syncedColor = BitmapFactory.decodeResource(res, R.drawable.map_shield_marker_point_color);
- syncedShadow = BitmapFactory.decodeResource(res, R.drawable.map_shield_marker_point_shadow);
- syncedIcon = BitmapFactory.decodeResource(res, R.drawable.map_marker_point_14dp);
- colorFilter = new PorterDuffColorFilter(col, PorterDuff.Mode.SRC_IN);
- grayFilter = new PorterDuffColorFilter(res.getColor(R.color.color_favorite_gray), PorterDuff.Mode.MULTIPLY);
- }
-
- private int getMapIconId(Context ctx, int iconId) {
- String iconName = ctx.getResources().getResourceEntryName(iconId);
- return ctx.getResources().getIdentifier(iconName
- .replaceFirst("mx_", "mm_"), "drawable", ctx.getPackageName());
- }
-
- private int getMapBackgroundIconId(Context ctx, FavouritePoint point, String layer) {
- if (point != null) {
- int iconId = point.getBackgroundType().getIconId();
- String iconName = ctx.getResources().getResourceEntryName(iconId);
- return ctx.getResources().getIdentifier("ic_" + iconName + "_" + layer
- , "drawable", ctx.getPackageName());
- }
- return R.drawable.ic_white_favorite_shield;
- }
-
- @Override
- protected void onBoundsChange(Rect bounds) {
- super.onBoundsChange(bounds);
- Rect bs = new Rect(bounds);
- if (!withShadow && !synced) {
- uiBackgroundIcon.setBounds(0, 0, uiBackgroundIcon.getIntrinsicWidth(), uiBackgroundIcon.getIntrinsicHeight());
- int offsetX = bounds.centerX() - uiListIcon.getIntrinsicWidth() / 2;
- int offsetY = bounds.centerY() - uiListIcon.getIntrinsicHeight() / 2;
- uiListIcon.setBounds(offsetX, offsetY, uiListIcon.getIntrinsicWidth() + offsetX,
- uiListIcon.getIntrinsicHeight() + offsetY);
- }
- }
-
- @Override
- public int getIntrinsicHeight() {
- if (synced) {
- return syncedShadow.getHeight();
- } else if (withShadow) {
- return favBackgroundCenter.getHeight();
- }
- return uiBackgroundIcon.getIntrinsicHeight();
- }
-
- @Override
- public int getIntrinsicWidth() {
- if (synced) {
- return syncedShadow.getWidth();
- } else if (withShadow) {
- return favBackgroundCenter.getWidth();
- }
- return uiBackgroundIcon.getIntrinsicWidth();
- }
-
- @Override
- public void draw(@NonNull Canvas canvas) {
- paintBackground.setColorFilter(history ? grayFilter : colorFilter);
- Rect bs = getBounds();
- if (synced) {
- drawBitmap(canvas, bs, syncedShadow, paintBackground);
- drawBitmap(canvas, bs, syncedColor, paintBackground);
- drawBitmap(canvas, bs, syncedStroke, paintBackground);
- drawBitmap(canvas, bs, syncedIcon, paintIcon);
- } else if (withShadow) {
- drawBitmap(canvas, bs, favBackgroundBottom, null);
- drawBitmap(canvas, bs, favBackgroundCenter, paintBackground);
- drawBitmap(canvas, bs, favBackgroundTop, null);
- favIcon.draw(canvas);
- } else {
- uiBackgroundIcon.draw(canvas);
- uiListIcon.draw(canvas);
- }
- }
-
- public void drawBitmap(@NonNull Canvas canvas, Rect bs, Bitmap bitmap, Paint paintBackground) {
- canvas.drawBitmap(bitmap, null, bs, paintBackground);
- }
-
- public void drawBitmapInCenter(Canvas canvas, Rect destRect, boolean history) {
- this.history = history;
- setBounds(destRect);
- Rect bounds = new Rect(destRect);
- bounds.inset(bounds.width() / 3, bounds.height() / 3);
- favIcon.setBounds(bounds);
- draw(canvas);
- }
-
- @Override
- public int getOpacity() {
- return 0;
- }
-
- @Override
- public void setAlpha(int alpha) {
- paintBackground.setAlpha(alpha);
- }
-
- @Override
- public void setColorFilter(ColorFilter cf) {
- paintIcon.setColorFilter(cf);
- }
-
- private static TreeMap cache = new TreeMap<>();
-
- private static FavoriteImageDrawable getOrCreate(Context ctx, int color, boolean withShadow, boolean synced, FavouritePoint point) {
- String uniqueId = "";
- if (point != null) {
- uniqueId = point.getIconEntryName(ctx);
- uniqueId += point.getBackgroundType().name();
- }
- color = color | 0xff000000;
- int hash = (color << 4) + ((withShadow ? 1 : 0) << 2) + ((synced ? 3 : 0) << 2);
- uniqueId = hash + uniqueId;
- FavoriteImageDrawable drawable = cache.get(uniqueId);
- if (drawable == null) {
- drawable = new FavoriteImageDrawable(ctx, color, withShadow, synced, point);
- drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
- cache.put(uniqueId, drawable);
- }
- return drawable;
- }
-
- public static FavoriteImageDrawable getOrCreate(Context a, int color, boolean withShadow, FavouritePoint point) {
- return getOrCreate(a, color, withShadow, false, point);
- }
-
- public static FavoriteImageDrawable getOrCreate(Context a, int color, boolean withShadow, GPXUtilities.WptPt pt) {
- return getOrCreate(a, color, withShadow, false, getFavouriteFromWpt(a, pt));
- }
-
- public static FavoriteImageDrawable getOrCreateSyncedIcon(Context a, int color, FavouritePoint point) {
- return getOrCreate(a, color, false, true, point);
- }
-
- public static FavoriteImageDrawable getOrCreateSyncedIcon(Context a, int color, GPXUtilities.WptPt pt) {
- return getOrCreate(a, color, false, true, getFavouriteFromWpt(a, pt));
- }
-
- private static FavouritePoint getFavouriteFromWpt(Context a, GPXUtilities.WptPt pt) {
- FavouritePoint point = null;
- if (pt != null) {
- point = new FavouritePoint(pt.getLatitude(), pt.getLongitude(), pt.name, pt.category);
- point.setIconIdFromName(a, pt.getIconNameOrDefault());
- point.setBackgroundType(BackgroundType.getByTypeName(pt.getBackgroundType(), DEFAULT_BACKGROUND_TYPE));
- }
- return point;
- }
-}
diff --git a/OsmAnd/src/net/osmand/plus/base/PointImageDrawable.java b/OsmAnd/src/net/osmand/plus/base/PointImageDrawable.java
new file mode 100644
index 0000000000..cca1b6a122
--- /dev/null
+++ b/OsmAnd/src/net/osmand/plus/base/PointImageDrawable.java
@@ -0,0 +1,315 @@
+package net.osmand.plus.base;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.Paint;
+import android.graphics.PorterDuff;
+import android.graphics.PorterDuffColorFilter;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+
+import androidx.annotation.ColorInt;
+import androidx.annotation.DrawableRes;
+import androidx.annotation.NonNull;
+
+import net.osmand.GPXUtilities;
+import net.osmand.data.FavouritePoint;
+import net.osmand.data.FavouritePoint.BackgroundType;
+import net.osmand.plus.OsmandApplication;
+import net.osmand.plus.R;
+import net.osmand.plus.UiUtilities;
+
+import java.util.TreeMap;
+
+import static net.osmand.data.FavouritePoint.DEFAULT_BACKGROUND_TYPE;
+import static net.osmand.data.FavouritePoint.DEFAULT_UI_ICON_ID;
+
+public class PointImageDrawable extends Drawable {
+
+ private boolean withShadow;
+ private boolean synced;
+ private boolean history;
+ private Drawable favIcon;
+ private Bitmap favBackgroundTop;
+ private Bitmap favBackgroundCenter;
+ private Bitmap favBackgroundBottom;
+ private Bitmap favBackgroundTopSmall;
+ private Bitmap favBackgroundCenterSmall;
+ private Bitmap favBackgroundBottomSmall;
+ private Bitmap syncedStroke;
+ private Bitmap syncedColor;
+ private Bitmap syncedShadow;
+ private Bitmap syncedIcon;
+ private Drawable uiListIcon;
+ private Drawable uiBackgroundIcon;
+ private Paint paintIcon = new Paint();
+ private Paint paintBackground = new Paint();
+ private ColorFilter colorFilter;
+ private ColorFilter grayFilter;
+ private float scale = 1.0f;
+
+ private PointImageDrawable(PointInfo pointInfo) {
+ this.withShadow = pointInfo.withShadow;
+ this.synced = pointInfo.synced;
+ Resources res = pointInfo.ctx.getResources();
+ UiUtilities uiUtilities = ((OsmandApplication) pointInfo.ctx.getApplicationContext()).getUIUtilities();
+ int overlayIconId = pointInfo.overlayIconId;
+ int uiIconId;
+ favIcon = uiUtilities.getIcon(getMapIconId(pointInfo.ctx, overlayIconId), R.color.color_white);
+ uiIconId = overlayIconId;
+
+ int col = pointInfo.color == 0 ? res.getColor(R.color.color_favorite) : pointInfo.color;
+ uiListIcon = uiUtilities.getIcon(uiIconId, R.color.color_white);
+ int uiBackgroundIconId = pointInfo.backgroundType.getIconId();
+ uiBackgroundIcon = uiUtilities.getPaintedIcon(uiBackgroundIconId, col);
+ int mapBackgroundIconIdTop = getMapBackgroundIconId(pointInfo, "top", false);
+ int mapBackgroundIconIdCenter = getMapBackgroundIconId(pointInfo, "center", false);
+ int mapBackgroundIconIdBottom = getMapBackgroundIconId(pointInfo, "bottom", false);
+ favBackgroundTop = BitmapFactory.decodeResource(res, mapBackgroundIconIdTop);
+ favBackgroundCenter = BitmapFactory.decodeResource(res, mapBackgroundIconIdCenter);
+ favBackgroundBottom = BitmapFactory.decodeResource(res, mapBackgroundIconIdBottom);
+ int mapBackgroundIconIdTopSmall = getMapBackgroundIconId(pointInfo, "top", true);
+ int mapBackgroundIconIdCenterSmall = getMapBackgroundIconId(pointInfo, "center", true);
+ int mapBackgroundIconIdBottomSmall = getMapBackgroundIconId(pointInfo, "bottom", true);
+ favBackgroundTopSmall = BitmapFactory.decodeResource(res, mapBackgroundIconIdTopSmall);
+ favBackgroundCenterSmall = BitmapFactory.decodeResource(res, mapBackgroundIconIdCenterSmall);
+ favBackgroundBottomSmall = BitmapFactory.decodeResource(res, mapBackgroundIconIdBottomSmall);
+ syncedStroke = BitmapFactory.decodeResource(res, R.drawable.ic_shield_marker_point_stroke);
+ syncedColor = BitmapFactory.decodeResource(res, R.drawable.ic_shield_marker_point_color);
+ syncedShadow = BitmapFactory.decodeResource(res, R.drawable.ic_shield_marker_point_shadow);
+ syncedIcon = BitmapFactory.decodeResource(res, R.drawable.ic_marker_point_14dp);
+ colorFilter = new PorterDuffColorFilter(col, PorterDuff.Mode.SRC_IN);
+ grayFilter = new PorterDuffColorFilter(res.getColor(R.color.color_favorite_gray), PorterDuff.Mode.MULTIPLY);
+ }
+
+ private int getMapIconId(Context ctx, int iconId) {
+ String iconName = ctx.getResources().getResourceEntryName(iconId);
+ return ctx.getResources().getIdentifier(iconName
+ .replaceFirst("mx_", "mm_"), "drawable", ctx.getPackageName());
+ }
+
+ private int getMapBackgroundIconId(PointInfo pointInfo, String layer, boolean isSmall) {
+ Context ctx = pointInfo.ctx;
+ int iconId = pointInfo.backgroundType.getIconId();
+ String iconName = ctx.getResources().getResourceEntryName(iconId);
+ String suffix = isSmall ? "_small" : "";
+ return ctx.getResources().getIdentifier("ic_" + iconName + "_" + layer + suffix,
+ "drawable", ctx.getPackageName());
+ }
+
+ @Override
+ protected void onBoundsChange(Rect bounds) {
+ super.onBoundsChange(bounds);
+ if (!withShadow && !synced) {
+ uiBackgroundIcon.setBounds(0, 0,
+ uiBackgroundIcon.getIntrinsicWidth(), uiBackgroundIcon.getIntrinsicHeight());
+ int offsetX = bounds.centerX() - uiListIcon.getIntrinsicWidth() / 2;
+ int offsetY = bounds.centerY() - uiListIcon.getIntrinsicHeight() / 2;
+ uiListIcon.setBounds(offsetX, offsetY, uiListIcon.getIntrinsicWidth() + offsetX,
+ uiListIcon.getIntrinsicHeight() + offsetY);
+ }
+ }
+
+ @Override
+ public int getIntrinsicHeight() {
+ if (synced) {
+ return syncedShadow.getHeight();
+ } else if (withShadow) {
+ return favBackgroundCenter.getHeight();
+ }
+ return uiBackgroundIcon.getIntrinsicHeight();
+ }
+
+ @Override
+ public int getIntrinsicWidth() {
+ if (synced) {
+ return syncedShadow.getWidth();
+ } else if (withShadow) {
+ return favBackgroundCenter.getWidth();
+ }
+ return uiBackgroundIcon.getIntrinsicWidth();
+ }
+
+ @Override
+ public void draw(@NonNull Canvas canvas) {
+ paintBackground.setColorFilter(history ? grayFilter : colorFilter);
+ Rect bs = getBounds();
+ if (synced) {
+ drawBitmap(canvas, bs, syncedShadow, paintBackground);
+ drawBitmap(canvas, bs, syncedColor, paintBackground);
+ drawBitmap(canvas, bs, syncedStroke, paintBackground);
+ drawBitmap(canvas, bs, syncedIcon, paintIcon);
+ } else if (withShadow) {
+ drawBitmap(canvas, bs, favBackgroundBottom, null);
+ drawBitmap(canvas, bs, favBackgroundCenter, paintBackground);
+ drawBitmap(canvas, bs, favBackgroundTop, null);
+ favIcon.draw(canvas);
+ } else {
+ uiBackgroundIcon.draw(canvas);
+ uiListIcon.draw(canvas);
+ }
+ }
+
+ public void drawBitmap(@NonNull Canvas canvas, Rect bs, Bitmap bitmap, Paint paintBackground) {
+ canvas.drawBitmap(bitmap, null, bs, paintBackground);
+ }
+
+ private void drawInCenter(Canvas canvas, Rect destRect, boolean history) {
+ this.history = history;
+ setBounds(destRect);
+ int offsetX = destRect.centerX() - (int) (favIcon.getIntrinsicWidth() / 2 * scale);
+ int offsetY = destRect.centerY() - (int) (favIcon.getIntrinsicHeight() / 2 * scale);
+ favIcon.setBounds(offsetX, offsetY, (int) (offsetX + favIcon.getIntrinsicWidth() * scale),
+ offsetY + (int) (favIcon.getIntrinsicHeight() * scale));
+ draw(canvas);
+ }
+
+ public void drawPoint(Canvas canvas, float x, float y, float scale, boolean history) {
+ this.scale = scale;
+ int scaledWidth = getIntrinsicWidth();
+ int scaledHeight = getIntrinsicHeight();
+ if (scale != 1.0f) {
+ scaledWidth *= scale;
+ scaledHeight *= scale;
+ }
+ Rect rect = new Rect(0, 0, scaledWidth, scaledHeight);
+ rect.offset((int) x - scaledWidth / 2, (int) y - scaledHeight / 2);
+ drawInCenter(canvas, rect, history);
+ }
+
+ public void drawSmallPoint(Canvas canvas, float x, float y, float scale) {
+ this.scale = scale;
+ paintBackground.setColorFilter(history ? grayFilter : colorFilter);
+ int scaledWidth = favBackgroundBottomSmall.getWidth();
+ int scaledHeight = favBackgroundBottomSmall.getHeight();
+ if (scale != 1.0f) {
+ scaledWidth *= scale;
+ scaledHeight *= scale;
+ }
+ Rect destRect = new Rect(0, 0, scaledWidth, scaledHeight);
+ destRect.offset((int) x - scaledWidth / 2, (int) y - scaledHeight / 2);
+ canvas.drawBitmap(favBackgroundBottomSmall, null, destRect, null);
+ canvas.drawBitmap(favBackgroundCenterSmall, null, destRect, paintBackground);
+ canvas.drawBitmap(favBackgroundTopSmall, null, destRect, null);
+ }
+
+ @Override
+ public int getOpacity() {
+ return 0;
+ }
+
+ public void setAlpha(float alpha) {
+ setAlpha((int) (255 * alpha));
+ }
+
+ @Override
+ public void setAlpha(int alpha) {
+ paintBackground.setAlpha(alpha);
+ }
+
+ @Override
+ public void setColorFilter(ColorFilter cf) {
+ paintIcon.setColorFilter(cf);
+ }
+
+ public void setScale(float scale) {
+ this.scale = scale;
+ }
+
+ private static TreeMap cache = new TreeMap<>();
+
+ private static PointImageDrawable getOrCreate(@NonNull PointInfo pointInfo) {
+
+ String uniqueId = pointInfo.ctx.getResources().getResourceEntryName(pointInfo.overlayIconId);
+ uniqueId += pointInfo.backgroundType.name();
+ int color = pointInfo.color | 0xff000000;
+ int hash = (color << 4) + ((pointInfo.withShadow ? 1 : 0) << 2) + ((pointInfo.synced ? 3 : 0) << 2);
+ uniqueId = hash + uniqueId;
+ PointImageDrawable drawable = cache.get(uniqueId);
+ if (drawable == null) {
+ drawable = new PointImageDrawable(pointInfo);
+ drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
+ cache.put(uniqueId, drawable);
+ }
+ return drawable;
+ }
+
+ public static PointImageDrawable getOrCreateSyncedIcon(Context ctx, @ColorInt int color, FavouritePoint point) {
+ return getFromFavorite(ctx, color, false, true, point);
+ }
+
+ public static PointImageDrawable getOrCreateSyncedIcon(Context ctx, @ColorInt int color, GPXUtilities.WptPt wpt) {
+ return getFromWpt(ctx, color, false, true, wpt);
+ }
+
+ public static PointImageDrawable getFromWpt(Context ctx, @ColorInt int color, boolean withShadow,
+ GPXUtilities.WptPt wpt) {
+ return getFromWpt(ctx, color, withShadow, false, wpt);
+ }
+
+ public static PointImageDrawable getFromWpt(Context ctx, @ColorInt int color, boolean withShadow, boolean synced,
+ GPXUtilities.WptPt wpt) {
+ if (wpt != null) {
+ int overlayIconId = ctx.getResources().getIdentifier("mx_" + wpt.getIconNameOrDefault(),
+ "drawable", ctx.getPackageName());
+ return getOrCreate(ctx, color, withShadow, synced, overlayIconId,
+ BackgroundType.getByTypeName(wpt.getBackgroundType(), DEFAULT_BACKGROUND_TYPE));
+ } else {
+ return getOrCreate(ctx, color, withShadow);
+ }
+ }
+
+ public static PointImageDrawable getFromFavorite(Context ctx, @ColorInt int color, boolean withShadow,
+ FavouritePoint favoritePoint) {
+ return getFromFavorite(ctx, color, withShadow, false, favoritePoint);
+ }
+
+ public static PointImageDrawable getFromFavorite(Context ctx, @ColorInt int color, boolean withShadow,
+ boolean synced, FavouritePoint favoritePoint) {
+ if (favoritePoint != null) {
+ return getOrCreate(ctx, color, withShadow, synced, favoritePoint.getOverlayIconId(ctx),
+ favoritePoint.getBackgroundType());
+ } else {
+ return getOrCreate(ctx, color, withShadow);
+ }
+ }
+
+ public static PointImageDrawable getOrCreate(Context ctx, @ColorInt int color, boolean withShadow) {
+ return getOrCreate(ctx, color, withShadow, DEFAULT_UI_ICON_ID);
+ }
+
+ public static PointImageDrawable getOrCreate(Context ctx, @ColorInt int color, boolean withShadow, int overlayIconId) {
+ return getOrCreate(ctx, color, withShadow, false, overlayIconId, BackgroundType.CIRCLE);
+ }
+
+ public static PointImageDrawable getOrCreate(Context ctx, @ColorInt int color, boolean withShadow, boolean synced,
+ int overlayIconId, @NonNull BackgroundType backgroundType) {
+ overlayIconId = overlayIconId == 0 ? DEFAULT_UI_ICON_ID : overlayIconId;
+ PointInfo pointInfo = new PointInfo(ctx, color, withShadow, overlayIconId, backgroundType);
+ pointInfo.synced = synced;
+ return getOrCreate(pointInfo);
+ }
+
+ private static class PointInfo {
+ Context ctx;
+ @ColorInt
+ int color;
+ boolean withShadow;
+ boolean synced = false;
+ @DrawableRes
+ int overlayIconId;
+ BackgroundType backgroundType;
+
+ private PointInfo(Context ctx, int color, boolean withShadow, int overlayIconId, BackgroundType backgroundType) {
+ this.ctx = ctx;
+ this.color = color;
+ this.withShadow = withShadow;
+ this.overlayIconId = overlayIconId;
+ this.backgroundType = backgroundType;
+ }
+ }
+}
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java
index 65eeffd8bd..59e89f8cb9 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java
@@ -21,7 +21,7 @@ import net.osmand.plus.FavouritesDbHelper.FavoritesListener;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.dashboard.tools.DashFragmentData;
import net.osmand.plus.dialogs.DirectionsDialogs;
import net.osmand.plus.myplaces.FavoritesActivity;
@@ -144,7 +144,7 @@ public class DashFavoritesFragment extends DashLocationFragment {
}
int iconColor = app.getFavorites().getColorWithCategory(point, getResources().getColor(R.color.color_favorite));
- Drawable favoriteIcon = FavoriteImageDrawable.getOrCreate(app, iconColor, false, point);
+ Drawable favoriteIcon = PointImageDrawable.getFromFavorite(app, iconColor, false, point);
((ImageView) view.findViewById(R.id.favourite_icon)).setImageDrawable(favoriteIcon);
DashLocationView dv = new DashLocationView(direction, label, new LatLon(point.getLatitude(),
point.getLongitude()));
diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java
index 31dde7f59e..8dbfb93a78 100644
--- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java
+++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java
@@ -23,7 +23,7 @@ import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper.TargetPoint;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.IntermediatePointsDialog;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.poi.PoiUIFilter;
import net.osmand.plus.render.RenderingIcons;
import net.osmand.plus.routing.AlarmInfo;
@@ -776,14 +776,14 @@ public class WaypointHelper {
}
} else if (type == FAVORITES ) {
- return FavoriteImageDrawable.getOrCreate(uiCtx,
+ return PointImageDrawable.getFromFavorite(uiCtx,
app.getFavorites().getColorWithCategory((FavouritePoint) point,
app.getResources().getColor(R.color.color_favorite)), false, (FavouritePoint) point);
} else if (type == WAYPOINTS) {
if (point instanceof WptLocationPoint) {
- return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor(), false, ((WptLocationPoint) point).getPt());
+ return PointImageDrawable.getFromWpt(uiCtx, point.getColor(), false, ((WptLocationPoint) point).getPt());
} else if (point instanceof GPXUtilities.WptPt) {
- return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor(), false, (GPXUtilities.WptPt) point);
+ return PointImageDrawable.getFromWpt(uiCtx, point.getColor(), false, (GPXUtilities.WptPt) point);
} else {
return null;
}
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java
index 362113e586..f374629dae 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java
@@ -189,7 +189,7 @@ public abstract class MenuController extends BaseMenuController implements Colla
} else if (object instanceof FavouritePoint) {
if (pointDescription.isParking()
|| (FavouritePoint.SpecialPointType.PARKING.equals(((FavouritePoint) object).getSpecialPointType()))) {
- menuController = new ParkingPositionMenuController(mapActivity, pointDescription);
+ menuController = new ParkingPositionMenuController(mapActivity, pointDescription, (FavouritePoint) object);
} else {
menuController = new FavouritePointMenuController(mapActivity, pointDescription, (FavouritePoint) object);
}
@@ -218,9 +218,7 @@ public abstract class MenuController extends BaseMenuController implements Colla
} else if (object instanceof AidlMapPointWrapper) {
menuController = new AMapPointMenuController(mapActivity, pointDescription, (AidlMapPointWrapper) object);
} else if (object instanceof LatLon) {
- if (pointDescription.isParking()) {
- menuController = new ParkingPositionMenuController(mapActivity, pointDescription);
- } else if (pointDescription.isMyLocation()) {
+ if (pointDescription.isMyLocation()) {
menuController = new MyLocationMenuController(mapActivity, pointDescription);
}
} else if (object instanceof AvoidSpecificRoads.AvoidRoadInfo) {
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java
index 6aa59d60f8..7dea6105ef 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java
@@ -15,7 +15,7 @@ import net.osmand.plus.MapMarkersHelper;
import net.osmand.plus.MapMarkersHelper.MapMarker;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.mapcontextmenu.MenuController;
import net.osmand.plus.mapcontextmenu.builders.FavouritePointMenuBuilder;
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditor;
@@ -126,7 +126,7 @@ public class FavouritePointMenuController extends MenuController {
public Drawable getRightIcon() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
- return FavoriteImageDrawable.getOrCreate(mapActivity.getMyApplication(),
+ return PointImageDrawable.getFromFavorite(mapActivity.getMyApplication(),
mapActivity.getMyApplication().getFavorites().getColorWithCategory(fav,
ContextCompat.getColor(mapActivity, R.color.color_favorite)), false, fav);
} else {
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ImpassibleRoadsMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ImpassibleRoadsMenuController.java
index 2d29f217ff..b4779f1d27 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ImpassibleRoadsMenuController.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/ImpassibleRoadsMenuController.java
@@ -68,7 +68,7 @@ public class ImpassibleRoadsMenuController extends MenuController {
public Drawable getRightIcon() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
- return AppCompatResources.getDrawable(mapActivity, R.drawable.map_pin_avoid_road);
+ return AppCompatResources.getDrawable(mapActivity, R.drawable.ic_pin_avoid_road);
} else {
return null;
}
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java
index d94079c977..3c1ce7d9f4 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java
@@ -15,7 +15,7 @@ import net.osmand.plus.MapMarkersHelper;
import net.osmand.plus.MapMarkersHelper.MapMarker;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.mapcontextmenu.MenuBuilder;
import net.osmand.plus.mapcontextmenu.MenuController;
import net.osmand.plus.wikivoyage.menu.WikivoyageWptPtMenuBuilder;
@@ -83,7 +83,7 @@ public class WptPtMenuController extends MenuController {
public Drawable getRightIcon() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
- return FavoriteImageDrawable.getOrCreate(mapActivity.getMyApplication(),
+ return PointImageDrawable.getFromWpt(mapActivity.getMyApplication(),
wpt.getColor(ContextCompat.getColor(mapActivity, R.color.gpx_color_point)), false, wpt);
} else {
return null;
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragment.java
index 384024c54f..d3f6ea52c6 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragment.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragment.java
@@ -21,7 +21,7 @@ import net.osmand.plus.FavouritesDbHelper.FavoriteGroup;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.dialogs.FavoriteDialogs;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.util.Algorithms;
@@ -313,7 +313,7 @@ public class FavoritePointEditorFragment extends PointEditorFragment {
@Override
public Drawable getNameIcon() {
- return FavoriteImageDrawable.getOrCreate(getMapActivity(), getPointColor(), false, getFavorite());
+ return PointImageDrawable.getFromFavorite(getMapActivity(), getPointColor(), false, getFavorite());
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragmentNew.java
index 822b3cb170..81db01571a 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragmentNew.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/FavoritePointEditorFragmentNew.java
@@ -25,7 +25,7 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.dialogs.FavoriteDialogs;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.util.Algorithms;
@@ -415,7 +415,7 @@ public class FavoritePointEditorFragmentNew extends PointEditorFragmentNew {
point.setBackgroundType(backgroundType);
point.setIconId(iconId);
}
- return FavoriteImageDrawable.getOrCreate(getMapActivity(), getPointColor(), false, point);
+ return PointImageDrawable.getFromFavorite(getMapActivity(), getPointColor(), false, point);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragment.java
index cefbebf253..21cbe28ff1 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragment.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragment.java
@@ -24,7 +24,7 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.SavingTrackHelper;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.plus.mapcontextmenu.editors.WptPtEditor.OnDismissListener;
import net.osmand.util.Algorithms;
@@ -365,7 +365,7 @@ public class WptPtEditorFragment extends PointEditorFragment {
@Override
public Drawable getNameIcon() {
- return FavoriteImageDrawable.getOrCreate(getMapActivity(), getPointColor(), false, wpt);
+ return PointImageDrawable.getFromWpt(getMapActivity(), getPointColor(), false, wpt);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
index 427b7d3f9e..e74539a06a 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/WptPtEditorFragmentNew.java
@@ -27,7 +27,7 @@ import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.SavingTrackHelper;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.plus.mapcontextmenu.editors.WptPtEditor.OnDismissListener;
import net.osmand.util.Algorithms;
@@ -411,7 +411,7 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
point.setBackgroundType(backgroundTypeName);
point.setIconName(iconName);
}
- return FavoriteImageDrawable.getOrCreate(getMapActivity(), getPointColor(), false, point);
+ return PointImageDrawable.getFromWpt(getMapActivity(), getPointColor(), false, point);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesAdapter.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesAdapter.java
index 94ac032e63..1cd0f59fea 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/FavouritesAdapter.java
@@ -13,7 +13,7 @@ import net.osmand.data.FavouritePoint;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import java.util.List;
@@ -47,7 +47,7 @@ public class FavouritesAdapter extends RecyclerView.Adapter {
@@ -67,7 +67,7 @@ public class CoordinateInputAdapter extends RecyclerView.Adapter> data;
@@ -86,13 +78,6 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
@Override
public void initLayer(OsmandMapTileView view) {
this.view = view;
-
- paintIcon = new Paint();
- resolvedNote = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_osm_resolved);
- unresolvedNote = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_osm_unresolved);
- resolvedNoteSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_osm_resolved_small);
- unresolvedNoteSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_osm_unresolved_small);
-
data = new OsmandMapLayer.MapLayerData>() {
{
@@ -125,7 +110,8 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
List objects = data.getResults();
if (objects != null) {
- float iconSize = resolvedNote.getWidth() * 3 / 2.5f;
+ float textScale = activity.getMyApplication().getSettings().TEXT_SCALE.get();
+ float iconSize = getIconSize(activity) * 3 / 2.5f * textScale;
QuadTree boundIntersections = initBoundIntersections(tileBox);
List fullObjects = new ArrayList<>();
List fullObjectsLatLon = new ArrayList<>();
@@ -139,14 +125,15 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
float y = tileBox.getPixYFromLatLon(o.getLatitude(), o.getLongitude());
if (intersects(boundIntersections, x, y, iconSize, iconSize)) {
- Bitmap b;
+ int backgroundColorRes;
if (o.isOpened()) {
- b = unresolvedNoteSmall;
+ backgroundColorRes = R.color.osm_bug_unresolved_icon_color;
} else {
- b = resolvedNoteSmall;
+ backgroundColorRes = R.color.osm_bug_resolved_icon_color;
}
- canvas.drawBitmap(b, x - b.getWidth() / 2, y - b.getHeight() / 2, paintIcon);
- smallObjectsLatLon.add(new LatLon(o.getLatitude(), o.getLongitude()));
+ PointImageDrawable pointImageDrawable = PointImageDrawable.getOrCreate(activity,
+ ContextCompat.getColor(activity, backgroundColorRes), true);
+ pointImageDrawable.drawSmallPoint(canvas, x, y, textScale);
} else {
fullObjects.add(o);
fullObjectsLatLon.add(new LatLon(o.getLatitude(), o.getLongitude()));
@@ -158,13 +145,18 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
}
float x = tileBox.getPixXFromLatLon(o.getLatitude(), o.getLongitude());
float y = tileBox.getPixYFromLatLon(o.getLatitude(), o.getLongitude());
- Bitmap b;
+ int iconId;
+ int backgroundColorRes;
if (o.isOpened()) {
- b = unresolvedNote;
+ iconId = R.drawable.mx_special_symbol_remove;
+ backgroundColorRes = R.color.osm_bug_unresolved_icon_color;
} else {
- b = resolvedNote;
+ iconId = R.drawable.mx_special_symbol_check_mark;
+ backgroundColorRes = R.color.osm_bug_resolved_icon_color;
}
- canvas.drawBitmap(b, x - b.getWidth() / 2, y - b.getHeight() / 2, paintIcon);
+ PointImageDrawable pointImageDrawable = PointImageDrawable.getOrCreate(activity,
+ ContextCompat.getColor(activity, backgroundColorRes), true, iconId);
+ pointImageDrawable.drawPoint(canvas, x, y, textScale, false);
}
this.fullObjectsLatLon = fullObjectsLatLon;
this.smallObjectsLatLon = smallObjectsLatLon;
@@ -196,7 +188,6 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
return (int) (z * tb.getDensity());
}
-
@Override
public boolean onLongPressEvent(PointF point, RotatedTileBox tileBox) {
return false;
@@ -207,7 +198,7 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
if (objects != null && view != null) {
int ex = (int) point.x;
int ey = (int) point.y;
- final int rad = getRadiusBug(tb);
+ final int rad = getScaledTouchRadius(activity.getMyApplication(), getRadiusBug(tb));
int radius = rad * 3 / 2;
int small = rad * 3 / 4;
boolean showClosed = activity.getMyApplication().getSettings().SHOW_CLOSED_OSM_BUGS.get();
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java
index 4d1aa34116..8363891600 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java
@@ -1,15 +1,13 @@
package net.osmand.plus.osmedit;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.graphics.Canvas;
-import android.graphics.Paint;
import android.graphics.PointF;
import android.os.AsyncTask;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.core.content.ContextCompat;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
@@ -17,6 +15,7 @@ import net.osmand.data.RotatedTileBox;
import net.osmand.osm.edit.Entity;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.views.ContextMenuLayer;
import net.osmand.plus.views.OsmandMapLayer;
import net.osmand.plus.views.OsmandMapTileView;
@@ -31,10 +30,6 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
private final MapActivity activity;
private final OpenstreetmapLocalUtil mOsmChangeUtil;
private final OsmBugsLocalUtil mOsmBugsUtil;
- private Bitmap poi;
- private Bitmap bug;
- private OsmandMapTileView view;
- private Paint paintIcon;
private ContextMenuLayer contextMenuLayer;
@@ -47,12 +42,6 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
@Override
public void initLayer(OsmandMapTileView view) {
- this.view = view;
-
- poi = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_pin_poi);
- bug = poi;
- paintIcon = new Paint();
-
contextMenuLayer = view.getLayerByClass(ContextMenuLayer.class);
}
@@ -88,20 +77,16 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
}
private void drawPoint(Canvas canvas, OsmPoint o, float x, float y) {
- Bitmap b;
- if (o.getGroup() == OsmPoint.Group.POI) {
- b = poi;
- } else if (o.getGroup() == OsmPoint.Group.BUG) {
- b = bug;
- } else {
- b = poi;
- }
- canvas.drawBitmap(b, x - b.getWidth() / 2, y - b.getHeight() / 2, paintIcon);
+ float textScale = activity.getMyApplication().getSettings().TEXT_SCALE.get();
+ PointImageDrawable pointImageDrawable = PointImageDrawable.getOrCreate(activity,
+ ContextCompat.getColor(activity, R.color.created_poi_icon_color), true,
+ R.drawable.mx_special_information);
+ pointImageDrawable.setAlpha(0.8f);
+ pointImageDrawable.drawPoint(canvas, x, y, textScale, false);
}
@Override
public void destroyLayer() {
-
}
@Override
@@ -113,7 +98,7 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
public void getOsmEditsFromPoint(PointF point, RotatedTileBox tileBox, List super OsmPoint> am) {
int ex = (int) point.x;
int ey = (int) point.y;
- int compare = getRadiusPoi(tileBox);
+ int compare = getScaledTouchRadius(activity.getMyApplication(), getRadiusPoi(tileBox));
int radius = compare * 3 / 2;
compare = getFromPoint(tileBox, am, ex, ey, compare, radius, plugin.getDBBug().getOsmbugsPoints());
getFromPoint(tileBox, am, ex, ey, compare, radius, plugin.getDBPOI().getOpenstreetmapPoints());
diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java
index 97563be6b1..e59775cbe4 100644
--- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java
+++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java
@@ -3,11 +3,14 @@ package net.osmand.plus.parkingpoint;
import android.graphics.drawable.Drawable;
import androidx.annotation.NonNull;
+import androidx.core.content.ContextCompat;
+import net.osmand.data.FavouritePoint;
import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.mapcontextmenu.MenuBuilder;
import net.osmand.plus.mapcontextmenu.MenuController;
@@ -17,9 +20,12 @@ public class ParkingPositionMenuController extends MenuController {
private String parkingStartDescription = "";
private String parkingLeftDescription = "";
private String parkingTitle = "";
+ private FavouritePoint fav;
- public ParkingPositionMenuController(@NonNull MapActivity mapActivity, @NonNull PointDescription pointDescription) {
+ public ParkingPositionMenuController(@NonNull MapActivity mapActivity, @NonNull PointDescription pointDescription,
+ FavouritePoint fav) {
super(new MenuBuilder(mapActivity), pointDescription, mapActivity);
+ this.fav = fav;
plugin = OsmandPlugin.getPlugin(ParkingPositionPlugin.class);
if (plugin != null) {
buildParkingDescription(mapActivity);
@@ -99,9 +105,13 @@ public class ParkingPositionMenuController extends MenuController {
@Override
public Drawable getRightIcon() {
-
- return getIcon( plugin == null || plugin.getParkingTime() <= 0 ?
- R.drawable.mx_parking : R.drawable.mx_special_parking_time_limited, R.color.map_widget_blue);
+ MapActivity mapActivity = getMapActivity();
+ if (mapActivity != null) {
+ return PointImageDrawable.getFromFavorite(mapActivity.getMyApplication(),
+ ContextCompat.getColor(mapActivity, R.color.parking_icon_background), false, fav);
+ } else {
+ return null;
+ }
}
@NonNull
diff --git a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java
index 59dbe1fae6..4f941b9b48 100644
--- a/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java
+++ b/OsmAnd/src/net/osmand/plus/search/listitems/QuickSearchListItem.java
@@ -26,7 +26,7 @@ import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.search.SearchHistoryFragment;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
import net.osmand.plus.poi.PoiUIFilter;
import net.osmand.plus.render.RenderingIcons;
@@ -377,11 +377,11 @@ public class QuickSearchListItem {
return getIcon(app, R.drawable.ic_action_world_globe);
case FAVORITE:
FavouritePoint fav = (FavouritePoint) searchResult.object;
- return FavoriteImageDrawable.getOrCreate(app,
- app.getFavorites().getColorWithCategory(fav, app.getResources().getColor(R.color.color_favorite)), false, fav);
+ int color = app.getFavorites().getColorWithCategory(fav, app.getResources().getColor(R.color.color_favorite));
+ return PointImageDrawable.getFromFavorite(app, color, false, fav);
case FAVORITE_GROUP:
FavoriteGroup group = (FavoriteGroup) searchResult.object;
- int color = group.getColor() == 0 ? ContextCompat.getColor(app, R.color.color_favorite) : group.getColor();
+ color = group.getColor() == 0 ? ContextCompat.getColor(app, R.color.color_favorite) : group.getColor();
return app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_favorite, color | 0xff000000);
case REGION:
return getIcon(app, R.drawable.ic_world_globe_dark);
@@ -395,7 +395,7 @@ public class QuickSearchListItem {
}
case WPT:
WptPt wpt = (WptPt) searchResult.object;
- return FavoriteImageDrawable.getOrCreate(app, wpt.getColor(), false, wpt);
+ return PointImageDrawable.getFromWpt(app, wpt.getColor(), false, wpt);
case UNKNOWN_NAME_FILTER:
break;
}
diff --git a/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java b/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java
index 58a38d40b0..248c911834 100644
--- a/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java
@@ -118,7 +118,7 @@ public class AidlMapLayer extends OsmandMapLayer implements IContextMenuProvider
bitmapPaint.setDither(true);
bitmapPaint.setFilterBitmap(true);
- circle = BitmapFactory.decodeResource(res, R.drawable.map_white_shield_small);
+ circle = BitmapFactory.decodeResource(res, R.drawable.ic_white_shield_small);
smallIconBg = BitmapFactory.decodeResource(res, night
? R.drawable.map_pin_user_location_small_night : R.drawable.map_pin_user_location_small_day);
bigIconBg = BitmapFactory.decodeResource(res, night
diff --git a/OsmAnd/src/net/osmand/plus/views/FavouritesLayer.java b/OsmAnd/src/net/osmand/plus/views/FavouritesLayer.java
index 1e74a054b0..2426dc213a 100644
--- a/OsmAnd/src/net/osmand/plus/views/FavouritesLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/FavouritesLayer.java
@@ -1,13 +1,7 @@
package net.osmand.plus.views;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.graphics.Canvas;
-import android.graphics.Paint;
import android.graphics.PointF;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffColorFilter;
-import android.graphics.Rect;
import android.util.Pair;
import androidx.annotation.ColorInt;
@@ -16,7 +10,6 @@ import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import net.osmand.data.FavouritePoint;
-import net.osmand.data.FavouritePoint.BackgroundType;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.data.QuadRect;
@@ -28,12 +21,11 @@ import net.osmand.plus.MapMarkersHelper;
import net.osmand.plus.MapMarkersHelper.MapMarker;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.R;
-import net.osmand.plus.base.FavoriteImageDrawable;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.views.ContextMenuLayer.ApplyMovedObjectCallback;
import net.osmand.plus.views.MapTextLayer.MapTextProvider;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider,
@@ -46,9 +38,6 @@ public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.
private MapMarkersHelper mapMarkersHelper;
protected List cache = new ArrayList<>();
private MapTextLayer textLayer;
- private Paint paintIcon;
- private HashMap smallIconCache = new HashMap<>();
- private Bitmap pointSmall;
@ColorInt
private int defaultColor;
@ColorInt
@@ -66,23 +55,11 @@ public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.
favorites = view.getApplication().getFavorites();
mapMarkersHelper = view.getApplication().getMapMarkersHelper();
textLayer = view.getLayerByClass(MapTextLayer.class);
- paintIcon = new Paint();
- for (BackgroundType backgroundType : BackgroundType.values()) {
- putBitmapToIconCache(backgroundType, "top");
- putBitmapToIconCache(backgroundType, "center");
- putBitmapToIconCache(backgroundType, "bottom");
- }
- pointSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_white_shield_small);
defaultColor = ContextCompat.getColor(view.getContext(), R.color.color_favorite);
grayColor = ContextCompat.getColor(view.getContext(), R.color.color_favorite_gray);
contextMenuLayer = view.getLayerByClass(ContextMenuLayer.class);
}
- private void putBitmapToIconCache(BackgroundType backgroundType, String layer) {
- smallIconCache.put(backgroundType.getTypeName() + "_" + layer, BitmapFactory.decodeResource(view.getResources(),
- getSmallIconId(layer, backgroundType.getIconId())));
- }
-
private boolean calculateBelongs(int ex, int ey, int objx, int objy, int radius) {
return (Math.abs(objx - ex) <= radius * 1.5 && Math.abs(objy - ey) <= radius * 1.5) ;
// return Math.abs(objx - ex) <= radius && (ey - objy) <= radius / 2 && (objy - ey) <= 3 * radius ;
@@ -116,8 +93,7 @@ public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.
if (this.settings.SHOW_FAVORITES.get() && favorites.isFavoritesLoaded()) {
if (tileBox.getZoom() >= startZoom) {
float textScale = this.settings.TEXT_SCALE.get();
- float iconSize = FavoriteImageDrawable.getOrCreate(view.getContext(), 0,
- true, (FavouritePoint) null).getIntrinsicWidth() * 3 / 2.5f * textScale;
+ float iconSize = getIconSize(view.getContext()) * 3 / 2.5f * textScale;
QuadTree boundIntersections = initBoundIntersections(tileBox);
// request to load
@@ -127,19 +103,19 @@ public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.
for (FavoriteGroup group : favorites.getFavoriteGroups()) {
List> fullObjects = new ArrayList<>();
boolean synced = mapMarkersHelper.getMarkersGroup(group) != null;
- for (FavouritePoint o : group.getPoints()) {
- double lat = o.getLatitude();
- double lon = o.getLongitude();
- if (o.isVisible() && o != contextMenuLayer.getMoveableObject()
+ for (FavouritePoint favoritePoint : group.getPoints()) {
+ double lat = favoritePoint.getLatitude();
+ double lon = favoritePoint.getLongitude();
+ if (favoritePoint.isVisible() && favoritePoint != contextMenuLayer.getMoveableObject()
&& lat >= latLonBounds.bottom && lat <= latLonBounds.top
&& lon >= latLonBounds.left && lon <= latLonBounds.right) {
MapMarker marker = null;
if (synced) {
- if ((marker = mapMarkersHelper.getMapMarker(o)) == null) {
+ if ((marker = mapMarkersHelper.getMapMarker(favoritePoint)) == null) {
continue;
}
}
- cache.add(o);
+ cache.add(favoritePoint);
float x = tileBox.getPixXFromLatLon(lat, lon);
float y = tileBox.getPixYFromLatLon(lat, lon);
@@ -149,28 +125,23 @@ public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.
if (marker != null && marker.history) {
color = grayColor;
} else {
- color = favorites.getColorWithCategory(o,defaultColor);
+ color = favorites.getColorWithCategory(favoritePoint,defaultColor);
}
- paintIcon.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
- Bitmap pointSmallTop = getBitmap(o, "top");
- Bitmap pointSmallCenter = getBitmap(o, "center");
- Bitmap pointSmallBottom = getBitmap(o, "bottom");
- Rect destRect = getIconDestinationRect(x, y, pointSmallTop.getWidth(), pointSmallTop.getHeight(), textScale);
- canvas.drawBitmap(pointSmallBottom, null, destRect, null);
- canvas.drawBitmap(pointSmallCenter, null, destRect, paintIcon);
- canvas.drawBitmap(pointSmallTop, null, destRect, null);
+ PointImageDrawable pointImageDrawable = PointImageDrawable.getFromFavorite(
+ view.getContext(), color,true, favoritePoint);
+ pointImageDrawable.drawSmallPoint(canvas, x, y, textScale);
smallObjectsLatLon.add(new LatLon(lat, lon));
} else {
- fullObjects.add(new Pair<>(o, marker));
+ fullObjects.add(new Pair<>(favoritePoint, marker));
fullObjectsLatLon.add(new LatLon(lat, lon));
}
}
}
for (Pair pair : fullObjects) {
- FavouritePoint o = pair.first;
- float x = tileBox.getPixXFromLatLon(o.getLatitude(), o.getLongitude());
- float y = tileBox.getPixYFromLatLon(o.getLatitude(), o.getLongitude());
- drawBigPoint(canvas, o, x, y, pair.second, textScale);
+ FavouritePoint favoritePoint = pair.first;
+ float x = tileBox.getPixXFromLatLon(favoritePoint.getLatitude(), favoritePoint.getLongitude());
+ float y = tileBox.getPixYFromLatLon(favoritePoint.getLatitude(), favoritePoint.getLongitude());
+ drawBigPoint(canvas, favoritePoint, x, y, pair.second, textScale);
}
}
this.fullObjectsLatLon = fullObjectsLatLon;
@@ -183,31 +154,19 @@ public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.
}
- private Bitmap getBitmap(FavouritePoint o, String layer) {
- Bitmap pointSmall = smallIconCache.get(o.getBackgroundType().getTypeName() + "_" + layer);
- if (pointSmall == null) {
- pointSmall = this.pointSmall;
- }
- return pointSmall;
- }
-
- private void drawBigPoint(Canvas canvas, FavouritePoint o, float x, float y, @Nullable MapMarker marker, float textScale) {
- FavoriteImageDrawable fid;
+ private void drawBigPoint(Canvas canvas, FavouritePoint favoritePoint, float x, float y, @Nullable MapMarker marker,
+ float textScale) {
+ PointImageDrawable pointImageDrawable;
boolean history = false;
if (marker != null) {
- fid = FavoriteImageDrawable.getOrCreateSyncedIcon(view.getContext(), favorites.getColorWithCategory(o,defaultColor), o);
+ pointImageDrawable = PointImageDrawable.getOrCreateSyncedIcon(view.getContext(),
+ favorites.getColorWithCategory(favoritePoint,defaultColor), favoritePoint);
history = marker.history;
} else {
- fid = FavoriteImageDrawable.getOrCreate(view.getContext(), favorites.getColorWithCategory(o,defaultColor), true, o);
+ pointImageDrawable = PointImageDrawable.getFromFavorite(view.getContext(),
+ favorites.getColorWithCategory(favoritePoint, defaultColor),true, favoritePoint);
}
- Rect destRest = getIconDestinationRect(x, y, fid.getIntrinsicWidth(), fid.getIntrinsicHeight(), textScale);
- fid.drawBitmapInCenter(canvas, destRest, history);
- }
-
- private int getSmallIconId(String layer, int iconId) {
- String iconName = view.getResources().getResourceEntryName(iconId);
- return view.getResources().getIdentifier("ic_" + iconName + "_" + layer + "_small"
- , "drawable", view.getContext().getPackageName());
+ pointImageDrawable.drawPoint(canvas, x, y, textScale, history);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java
index 881b7159f4..62c7795979 100644
--- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java
@@ -1,7 +1,5 @@
package net.osmand.plus.views;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
@@ -9,7 +7,6 @@ import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Paint.Style;
import android.graphics.PointF;
-import android.graphics.PorterDuff;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
@@ -43,7 +40,8 @@ import net.osmand.plus.MapMarkersHelper.MapMarker;
import net.osmand.plus.MapMarkersHelper.MapMarkersGroup;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
-import net.osmand.plus.base.FavoriteImageDrawable;
+
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.mapcontextmenu.controllers.SelectedGpxMenuController.SelectedGpxPoint;
import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenu.TrackChartPoints;
import net.osmand.plus.render.OsmandRenderer;
@@ -85,7 +83,6 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
private int cachedHash;
private int cachedColor;
private Paint paintIcon;
- private Bitmap pointSmall;
private int currentTrackColor;
private LayerDrawable selectedPoint;
@@ -181,7 +178,6 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
paintGridOuterCircle.setAlpha(204);
paintIcon = new Paint();
- pointSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_white_shield_small);
selectedPoint = (LayerDrawable) AppCompatResources.getDrawable(view.getContext(), R.drawable.map_location_default);
contextMenuLayer = view.getLayerByClass(ContextMenuLayer.class);
@@ -376,8 +372,7 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
private void drawSelectedFilesPoints(Canvas canvas, RotatedTileBox tileBox, List selectedGPXFiles) {
if (tileBox.getZoom() >= START_ZOOM) {
float textScale = view.getSettings().TEXT_SCALE.get();
- float iconSize = FavoriteImageDrawable.getOrCreate(view.getContext(), 0,
- true, (WptPt) null).getIntrinsicWidth() * 3 / 2.5f * textScale;
+ float iconSize = getIconSize(view.getContext()) * 3 / 2.5f * textScale;
QuadTree boundIntersections = initBoundIntersections(tileBox);
List fullObjectsLatLon = new ArrayList<>();
@@ -389,20 +384,20 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
List> fullObjects = new ArrayList<>();
int fileColor = getFileColor(g);
boolean synced = mapMarkersHelper.getMarkersGroup(g.getGpxFile()) != null;
- for (WptPt o : getListStarPoints(g)) {
- if (o.lat >= latLonBounds.bottom && o.lat <= latLonBounds.top
- && o.lon >= latLonBounds.left && o.lon <= latLonBounds.right
- && o != contextMenuLayer.getMoveableObject()) {
- pointFileMap.put(o, g);
+ for (WptPt wpt : getListStarPoints(g)) {
+ if (wpt.lat >= latLonBounds.bottom && wpt.lat <= latLonBounds.top
+ && wpt.lon >= latLonBounds.left && wpt.lon <= latLonBounds.right
+ && wpt != contextMenuLayer.getMoveableObject()) {
+ pointFileMap.put(wpt, g);
MapMarker marker = null;
if (synced) {
- if ((marker = mapMarkersHelper.getMapMarker(o)) == null) {
+ if ((marker = mapMarkersHelper.getMapMarker(wpt)) == null) {
continue;
}
}
- cache.add(o);
- float x = tileBox.getPixXFromLatLon(o.lat, o.lon);
- float y = tileBox.getPixYFromLatLon(o.lat, o.lon);
+ cache.add(wpt);
+ float x = tileBox.getPixXFromLatLon(wpt.lat, wpt.lon);
+ float y = tileBox.getPixYFromLatLon(wpt.lat, wpt.lon);
if (intersects(boundIntersections, x, y, iconSize, iconSize)) {
@ColorInt
@@ -410,26 +405,26 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
if (marker != null && marker.history) {
color = grayColor;
} else {
- color = getPointColor(o, fileColor);
+ color = getPointColor(wpt, fileColor);
}
- paintIcon.setColorFilter(new PorterDuffColorFilter(color | 0xff000000, PorterDuff.Mode.MULTIPLY));
- Rect destRect = getIconDestinationRect(x, y, pointSmall.getWidth(), pointSmall.getHeight(), textScale);
- canvas.drawBitmap(pointSmall, null, destRect, paintIcon);
- smallObjectsLatLon.add(new LatLon(o.lat, o.lon));
+ PointImageDrawable pointImageDrawable = PointImageDrawable.getFromWpt(view.getContext(), color,
+ true, wpt);
+ pointImageDrawable.drawSmallPoint(canvas, x, y, textScale);
+ smallObjectsLatLon.add(new LatLon(wpt.lat, wpt.lon));
} else {
- fullObjects.add(new Pair<>(o, marker));
- fullObjectsLatLon.add(new LatLon(o.lat, o.lon));
+ fullObjects.add(new Pair<>(wpt, marker));
+ fullObjectsLatLon.add(new LatLon(wpt.lat, wpt.lon));
}
}
- if (o == contextMenuLayer.getMoveableObject()) {
- pointFileMap.put(o, g);
+ if (wpt == contextMenuLayer.getMoveableObject()) {
+ pointFileMap.put(wpt, g);
}
}
for (Pair pair : fullObjects) {
- WptPt o = pair.first;
- float x = tileBox.getPixXFromLatLon(o.lat, o.lon);
- float y = tileBox.getPixYFromLatLon(o.lat, o.lon);
- drawBigPoint(canvas, o, fileColor, x, y, pair.second, textScale);
+ WptPt wpt = pair.first;
+ float x = tileBox.getPixXFromLatLon(wpt.lat, wpt.lon);
+ float y = tileBox.getPixYFromLatLon(wpt.lat, wpt.lon);
+ drawBigPoint(canvas, wpt, fileColor, x, y, pair.second, textScale);
}
}
if (trackChartPoints != null) {
@@ -503,18 +498,17 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
return g.getColor() == 0 ? defPointColor : g.getColor();
}
- private void drawBigPoint(Canvas canvas, WptPt o, int fileColor, float x, float y, @Nullable MapMarker marker, float textScale) {
- int pointColor = getPointColor(o, fileColor);
- FavoriteImageDrawable fid;
+ private void drawBigPoint(Canvas canvas, WptPt wpt, int fileColor, float x, float y, @Nullable MapMarker marker, float textScale) {
+ int pointColor = getPointColor(wpt, fileColor);
+ PointImageDrawable pointImageDrawable;
boolean history = false;
if (marker != null) {
- fid = FavoriteImageDrawable.getOrCreateSyncedIcon(view.getContext(), pointColor, o);
+ pointImageDrawable = PointImageDrawable.getOrCreateSyncedIcon(view.getContext(), pointColor, wpt);
history = marker.history;
} else {
- fid = FavoriteImageDrawable.getOrCreate(view.getContext(), pointColor, true, o);
+ pointImageDrawable = PointImageDrawable.getFromWpt(view.getContext(), pointColor, true, wpt);
}
- Rect destRest = getIconDestinationRect(x, y, fid.getIntrinsicWidth(), fid.getIntrinsicHeight(), textScale);
- fid.drawBitmapInCenter(canvas, destRest, history);
+ pointImageDrawable.drawPoint(canvas, x, y, textScale, history);
}
@ColorInt
diff --git a/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java b/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java
index 002de90d66..6acc0c8d7b 100644
--- a/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java
@@ -7,6 +7,7 @@ import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.graphics.PointF;
+import android.graphics.Rect;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -46,7 +47,7 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
public void initLayer(OsmandMapTileView view) {
avoidSpecificRoads = activity.getMyApplication().getAvoidSpecificRoads();
contextMenuLayer = view.getLayerByClass(ContextMenuLayer.class);
- roadWorkIcon = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_pin_avoid_road);
+ roadWorkIcon = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_pin_avoid_road);
activePaint = new Paint();
ColorMatrix matrix = new ColorMatrix();
matrix.setSaturation(0);
@@ -90,14 +91,15 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
}
private void drawPoint(Canvas canvas, float x, float y, boolean active) {
- float left = x - roadWorkIcon.getWidth() / 2;
- float top = y - roadWorkIcon.getHeight();
- canvas.drawBitmap(roadWorkIcon, left, top, active ? activePaint : paint);
+ float textScale = activity.getMyApplication().getSettings().TEXT_SCALE.get();
+ float left = x - roadWorkIcon.getWidth() / 2f * textScale;
+ float top = y - roadWorkIcon.getHeight() * textScale;
+ Rect destRect = getIconDestinationRect(left, top, roadWorkIcon.getWidth(), roadWorkIcon.getHeight(), textScale);
+ canvas.drawBitmap(roadWorkIcon, null, destRect, active ? activePaint : paint);
}
@Override
public void destroyLayer() {
-
}
@Override
@@ -144,7 +146,7 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
if (tileBox.getZoom() >= START_ZOOM) {
int ex = (int) point.x;
int ey = (int) point.y;
- int compare = getRadiusPoi(tileBox);
+ int compare = getScaledTouchRadius(activity.getMyApplication(), getRadiusPoi(tileBox));
int radius = compare * 3 / 2;
for (Map.Entry entry : avoidSpecificRoads.getImpassableRoads().entrySet()) {
diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java
index 45f5541d29..700cb9a7a2 100644
--- a/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java
@@ -626,6 +626,10 @@ public abstract class OsmandMapLayer {
return (int) (r * tb.getDensity());
}
+ protected int getIconSize(Context ctx) {
+ return ctx.getResources().getDimensionPixelSize(R.dimen.favorites_icon_outline_size);
+ }
+
public Rect getIconDestinationRect(float x, float y, int width, int height, float scale) {
int scaledWidth = width;
int scaledHeight = height;
diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
index dadd9f5f58..b2dc12e0e0 100644
--- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
@@ -2,15 +2,8 @@ package net.osmand.plus.views;
import android.app.Dialog;
import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
import android.graphics.PointF;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffColorFilter;
-import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.text.util.Linkify;
import android.util.TypedValue;
@@ -38,8 +31,8 @@ import net.osmand.osm.PoiType;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.helpers.WaypointHelper;
-import net.osmand.plus.poi.PoiFiltersHelper;
import net.osmand.plus.poi.PoiUIFilter;
import net.osmand.plus.render.RenderingIcons;
import net.osmand.plus.routing.IRouteInformationListener;
@@ -63,12 +56,6 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
public static final org.apache.commons.logging.Log log = PlatformUtil.getLog(POIMapLayer.class);
- private Paint paintIconBackground;
- private Bitmap poiBackground;
- private Bitmap poiBackgroundSmall;
- private PorterDuffColorFilter poiColorFilter;
- private int poiSize;
-
private OsmandMapTileView view;
private RoutingHelper routingHelper;
@@ -81,7 +68,6 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
private OsmandApplication app;
-
public POIMapLayer(final MapActivity activity) {
routingHelper = activity.getRoutingHelper();
routingHelper.addListener(this);
@@ -99,7 +85,6 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
return super.isInterrupted();
}
-
@Override
public void layerOnPreExecute() {
calculatedFilters = new TreeSet<>(filters);
@@ -148,7 +133,6 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
};
}
-
public void getAmenityFromPoint(RotatedTileBox tb, PointF point, List super Amenity> am) {
List objects = data.getResults();
if (objects != null) {
@@ -172,16 +156,9 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
}
}
-
@Override
public void initLayer(OsmandMapTileView view) {
this.view = view;
- poiSize = app.getResources().getDimensionPixelSize(R.dimen.poi_icon_size);
- poiColorFilter = new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.SRC_IN);
- paintIconBackground = new Paint();
- poiBackground = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_white_orange_poi_shield);
- poiBackgroundSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_white_orange_poi_shield_small);
-
mapTextLayer = view.getLayerByClass(MapTextLayer.class);
}
@@ -221,10 +198,12 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
objects = data.getResults();
if (objects != null) {
float textScale = app.getSettings().TEXT_SCALE.get();
- float iconSize = poiBackground.getWidth() * 3 / 2 * textScale;
+ float iconSize = getIconSize(app) * 1.5f * textScale;
QuadTree boundIntersections = initBoundIntersections(tileBox);
WaypointHelper wph = app.getWaypointHelper();
-
+ PointImageDrawable pointImageDrawable = PointImageDrawable.getOrCreate(view.getContext(),
+ ContextCompat.getColor(app, R.color.osmand_orange), true);
+ pointImageDrawable.setAlpha(0.8f);
for (Amenity o : objects) {
float x = tileBox.getPixXFromLatLon(o.getLocation().getLatitude(), o.getLocation()
.getLongitude());
@@ -234,8 +213,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
if (tileBox.containsPoint(x, y, iconSize)) {
if (intersects(boundIntersections, x, y, iconSize, iconSize) ||
(app.getSettings().SHOW_NEARBY_POI.get() && wph.isRouteCalculated() && !wph.isAmenityNoPassed(o))) {
- Rect destRect = getIconDestinationRect(x, y, poiBackgroundSmall.getWidth(), poiBackgroundSmall.getHeight(), textScale);
- canvas.drawBitmap(poiBackgroundSmall, null, destRect, paintIconBackground);
+ pointImageDrawable.drawSmallPoint(canvas, x, y, textScale);
smallObjectsLatLon.add(new LatLon(o.getLocation().getLatitude(),
o.getLocation().getLongitude()));
} else {
@@ -251,8 +229,6 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
int y = (int) tileBox.getPixYFromLatLon(o.getLocation().getLatitude(), o.getLocation()
.getLongitude());
if (tileBox.containsPoint(x, y, iconSize)) {
- Rect destRect = getIconDestinationRect(x, y, poiBackground.getWidth(), poiBackground.getHeight(), textScale);
- canvas.drawBitmap(poiBackground, null, destRect, paintIconBackground);
String id = null;
PoiType st = o.getType().getPoiTypeByKeyName(o.getSubType());
if (st != null) {
@@ -263,13 +239,11 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
}
}
if (id != null) {
- Drawable img = RenderingIcons.getDrawableIcon(view.getContext(), id, false);
- if (img != null) {
- destRect = getIconDestinationRect(x, y, poiSize, poiSize, textScale);
- img.setBounds(destRect);
- img.setColorFilter(poiColorFilter);
- img.draw(canvas);
- }
+ pointImageDrawable = PointImageDrawable.getOrCreate(view.getContext(),
+ ContextCompat.getColor(app, R.color.osmand_orange), true,
+ RenderingIcons.getResId(id));
+ pointImageDrawable.setAlpha(0.8f);
+ pointImageDrawable.drawPoint(canvas, x, y, textScale, false);
}
}
}
@@ -419,9 +393,8 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
public int getTextShift(Amenity amenity, RotatedTileBox rb) {
int radiusPoi = getRadiusPoi(rb);
if (isPresentInFullObjects(amenity.getLocation())) {
- radiusPoi += poiBackground.getHeight() / 2 - poiBackgroundSmall.getHeight() / 2;
+ radiusPoi += (getIconSize(app) - app.getResources().getDimensionPixelSize(R.dimen.favorites_icon_size_small)) / 2;
}
-
return radiusPoi;
}
diff --git a/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java b/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java
index db1eae9605..a5e1489ee1 100644
--- a/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java
@@ -1,23 +1,17 @@
package net.osmand.plus.views;
import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.graphics.Canvas;
-import android.graphics.ColorFilter;
-import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PointF;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffColorFilter;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
import android.util.DisplayMetrics;
import android.view.WindowManager;
+import androidx.annotation.DrawableRes;
import androidx.core.content.ContextCompat;
import net.osmand.ResultMatcher;
+import net.osmand.data.FavouritePoint.BackgroundType;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.data.QuadRect;
@@ -26,6 +20,7 @@ import net.osmand.data.RotatedTileBox;
import net.osmand.data.TransportStop;
import net.osmand.osm.edit.Node;
import net.osmand.osm.edit.Way;
+import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
@@ -50,12 +45,6 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
private final MapActivity mapActivity;
private OsmandMapTileView view;
- private Paint paintIcon;
- private ColorFilter paintLightIconFilter;
- private ColorFilter paintDarkIconFilter;
- private Bitmap backgroundIcon;
- private Bitmap stopBus;
- private Bitmap stopSmall;
private RenderingLineAttributes attrs;
private MapLayerData> data;
@@ -64,8 +53,6 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
private OsmandSettings.CommonPreference showTransportStops;
private Path path;
- private float backgroundIconHalfWidth;
- private float backgroundIconHalfHeight;
public TransportStopsLayer(MapActivity mapActivity) {
this.mapActivity = mapActivity;
@@ -76,19 +63,11 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
@SuppressWarnings("deprecation")
@Override
public void initLayer(final OsmandMapTileView view) {
- backgroundIcon = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_transport_stop_bg);
- backgroundIconHalfWidth = backgroundIcon.getWidth() / 2f;
- backgroundIconHalfHeight = backgroundIcon.getWidth() / 2f;
this.view = view;
DisplayMetrics dm = new DisplayMetrics();
WindowManager wmgr = (WindowManager) view.getContext().getSystemService(Context.WINDOW_SERVICE);
wmgr.getDefaultDisplay().getMetrics(dm);
- paintIcon = new Paint();
- paintLightIconFilter = new PorterDuffColorFilter(ContextCompat.getColor(mapActivity, R.color.active_buttons_and_links_text_light), PorterDuff.Mode.SRC_IN);
- paintDarkIconFilter = new PorterDuffColorFilter(ContextCompat.getColor(mapActivity, R.color.active_buttons_and_links_text_dark), PorterDuff.Mode.SRC_IN);
path = new Path();
- stopBus = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_transport_stop_bus);
- stopSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_transport_stop_small);
attrs = new RenderingLineAttributes("transport_route");
attrs.defaultWidth = (int) (6 * view.getDensity());
data = new OsmandMapLayer.MapLayerData>() {
@@ -235,7 +214,7 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
if (objects != null) {
float textScale = mapActivity.getMyApplication().getSettings().TEXT_SCALE.get();
- float iconSize = stopBus.getWidth() * 3 / 2.5f * textScale;
+ float iconSize = getIconSize(mapActivity) * 3 / 2.5f * textScale;
QuadTree boundIntersections = initBoundIntersections(tb);
List fullObjects = new ArrayList<>();
for (TransportStop o : objects) {
@@ -243,8 +222,11 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
float y = tb.getPixYFromLatLon(o.getLocation().getLatitude(), o.getLocation().getLongitude());
if (intersects(boundIntersections, x, y, iconSize, iconSize)) {
- Rect destRect = getIconDestinationRect(x, y, stopSmall.getWidth(), stopSmall.getHeight(), textScale);
- canvas.drawBitmap(stopSmall, null, destRect, paintIcon);
+ PointImageDrawable pointImageDrawable = PointImageDrawable.getOrCreate(mapActivity,
+ ContextCompat.getColor(mapActivity, R.color.transport_stop_icon_background),
+ true,false ,0, BackgroundType.SQUARE);
+ pointImageDrawable.setAlpha(0.9f);
+ pointImageDrawable.drawSmallPoint(canvas, x, y, textScale);
} else {
fullObjects.add(o);
}
@@ -256,22 +238,23 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
if (stopRoute != null) {
TransportStopType type = TransportStopType.findType(stopRoute.route.getType());
if (type != null) {
- Drawable foregroundIcon = RenderingIcons.getDrawableIcon(mapActivity, type.getResName(), false);
- Rect destRect = getIconDestinationRect(x, y, backgroundIcon.getWidth(), backgroundIcon.getHeight(), textScale);
- canvas.drawBitmap(backgroundIcon, null, destRect, paintIcon);
- destRect = getIconDestinationRect(x, y, foregroundIcon.getIntrinsicWidth(), foregroundIcon.getIntrinsicHeight(), textScale);
- foregroundIcon.setBounds(destRect);
- foregroundIcon.setColorFilter(nightMode ? paintDarkIconFilter : paintLightIconFilter);
- foregroundIcon.draw(canvas);
+ drawPoint(canvas, textScale, x, y, RenderingIcons.getResId(type.getResName()));
}
} else {
- Rect destRect = getIconDestinationRect(x, y, stopBus.getWidth(), stopBus.getHeight(), textScale);
- canvas.drawBitmap(stopBus, null, destRect, paintIcon);
+ drawPoint(canvas, textScale, x, y, R.drawable.mx_highway_bus_stop);
}
}
}
}
+ private void drawPoint(Canvas canvas, float textScale, float x, float y, @DrawableRes int iconId) {
+ PointImageDrawable pointImageDrawable = PointImageDrawable.getOrCreate(mapActivity,
+ ContextCompat.getColor(mapActivity, R.color.transport_stop_icon_background),
+ true,false ,iconId, BackgroundType.SQUARE);
+ pointImageDrawable.setAlpha(0.9f);
+ pointImageDrawable.drawPoint(canvas, x, y, textScale, false);
+ }
+
@Override
public void onDraw(Canvas canvas, RotatedTileBox tb, DrawSettings settings) {
}