diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_circle_bottom.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_circle_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_circle_bottom.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_circle_bottom.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_circle_bottom_small.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_circle_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_circle_bottom_small.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_circle_bottom_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_circle_center.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_circle_center.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_circle_center.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_circle_center.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_circle_center_small.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_circle_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_circle_center_small.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_circle_center_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_circle_top.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_circle_top.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_circle_top.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_circle_top.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_circle_top_small.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_circle_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_circle_top_small.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_circle_top_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_octagon_bottom.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_octagon_bottom.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_bottom.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_octagon_bottom_small.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_octagon_bottom_small.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_bottom_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_octagon_center.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_center.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_octagon_center.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_center.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_octagon_center_small.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_octagon_center_small.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_center_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_octagon_top.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_top.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_octagon_top.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_top.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_octagon_top_small.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_octagon_top_small.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_octagon_top_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_square_bottom.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_square_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_square_bottom.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_square_bottom.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_square_bottom_small.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_square_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_square_bottom_small.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_square_bottom_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_square_center.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_square_center.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_square_center.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_square_center.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_square_center_small.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_square_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_square_center_small.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_square_center_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_square_top.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_square_top.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_square_top.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_square_top.png
diff --git a/OsmAnd/res/drawable-hdpi/map_bg_point_square_top_small.png b/OsmAnd/res/drawable-hdpi/ic_bg_point_square_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_bg_point_square_top_small.png
rename to OsmAnd/res/drawable-hdpi/ic_bg_point_square_top_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_note_audio.png b/OsmAnd/res/drawable-hdpi/ic_note_audio.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_note_audio.png
rename to OsmAnd/res/drawable-hdpi/ic_note_audio.png
diff --git a/OsmAnd/res/drawable-hdpi/map_note_photo.png b/OsmAnd/res/drawable-hdpi/ic_note_photo.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_note_photo.png
rename to OsmAnd/res/drawable-hdpi/ic_note_photo.png
diff --git a/OsmAnd/res/drawable-hdpi/map_note_small.png b/OsmAnd/res/drawable-hdpi/ic_note_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_note_small.png
rename to OsmAnd/res/drawable-hdpi/ic_note_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_note_video.png b/OsmAnd/res/drawable-hdpi/ic_note_video.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_note_video.png
rename to OsmAnd/res/drawable-hdpi/ic_note_video.png
diff --git a/OsmAnd/res/drawable-hdpi/map_shield_tap.png b/OsmAnd/res/drawable-hdpi/ic_shield_tap.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_shield_tap.png
rename to OsmAnd/res/drawable-hdpi/ic_shield_tap.png
diff --git a/OsmAnd/res/drawable-hdpi/map_shield_tap_small.png b/OsmAnd/res/drawable-hdpi/ic_shield_tap_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_shield_tap_small.png
rename to OsmAnd/res/drawable-hdpi/ic_shield_tap_small.png
diff --git a/OsmAnd/res/drawable-hdpi/map_white_favorite_shield.png b/OsmAnd/res/drawable-hdpi/ic_white_favorite_shield.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_white_favorite_shield.png
rename to OsmAnd/res/drawable-hdpi/ic_white_favorite_shield.png
diff --git a/OsmAnd/res/drawable-hdpi/map_white_orange_poi_shield.png b/OsmAnd/res/drawable-hdpi/ic_white_orange_poi_shield.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_white_orange_poi_shield.png
rename to OsmAnd/res/drawable-hdpi/ic_white_orange_poi_shield.png
diff --git a/OsmAnd/res/drawable-hdpi/map_white_orange_poi_shield_small.png b/OsmAnd/res/drawable-hdpi/ic_white_orange_poi_shield_small.png
similarity index 100%
rename from OsmAnd/res/drawable-hdpi/map_white_orange_poi_shield_small.png
rename to OsmAnd/res/drawable-hdpi/ic_white_orange_poi_shield_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_circle_bottom.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_circle_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_circle_bottom.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_circle_bottom.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_circle_bottom_small.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_circle_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_circle_bottom_small.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_circle_bottom_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_circle_center.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_circle_center.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_circle_center.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_circle_center.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_circle_center_small.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_circle_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_circle_center_small.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_circle_center_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_circle_top.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_circle_top.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_circle_top.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_circle_top.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_circle_top_small.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_circle_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_circle_top_small.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_circle_top_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_octagon_bottom.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_octagon_bottom.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_bottom.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_octagon_bottom_small.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_octagon_bottom_small.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_bottom_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_octagon_center.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_center.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_octagon_center.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_center.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_octagon_center_small.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_octagon_center_small.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_center_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_octagon_top.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_top.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_octagon_top.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_top.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_octagon_top_small.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_octagon_top_small.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_octagon_top_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_square_bottom.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_square_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_square_bottom.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_square_bottom.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_square_bottom_small.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_square_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_square_bottom_small.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_square_bottom_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_square_center.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_square_center.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_square_center.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_square_center.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_square_center_small.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_square_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_square_center_small.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_square_center_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_square_top.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_square_top.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_square_top.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_square_top.png
diff --git a/OsmAnd/res/drawable-mdpi/map_bg_point_square_top_small.png b/OsmAnd/res/drawable-mdpi/ic_bg_point_square_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_bg_point_square_top_small.png
rename to OsmAnd/res/drawable-mdpi/ic_bg_point_square_top_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_note_audio.png b/OsmAnd/res/drawable-mdpi/ic_note_audio.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_note_audio.png
rename to OsmAnd/res/drawable-mdpi/ic_note_audio.png
diff --git a/OsmAnd/res/drawable-mdpi/map_note_photo.png b/OsmAnd/res/drawable-mdpi/ic_note_photo.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_note_photo.png
rename to OsmAnd/res/drawable-mdpi/ic_note_photo.png
diff --git a/OsmAnd/res/drawable-mdpi/map_note_small.png b/OsmAnd/res/drawable-mdpi/ic_note_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_note_small.png
rename to OsmAnd/res/drawable-mdpi/ic_note_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_note_video.png b/OsmAnd/res/drawable-mdpi/ic_note_video.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_note_video.png
rename to OsmAnd/res/drawable-mdpi/ic_note_video.png
diff --git a/OsmAnd/res/drawable-mdpi/map_shield_tap.png b/OsmAnd/res/drawable-mdpi/ic_shield_tap.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_shield_tap.png
rename to OsmAnd/res/drawable-mdpi/ic_shield_tap.png
diff --git a/OsmAnd/res/drawable-mdpi/map_shield_tap_small.png b/OsmAnd/res/drawable-mdpi/ic_shield_tap_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_shield_tap_small.png
rename to OsmAnd/res/drawable-mdpi/ic_shield_tap_small.png
diff --git a/OsmAnd/res/drawable-mdpi/map_white_favorite_shield.png b/OsmAnd/res/drawable-mdpi/ic_white_favorite_shield.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_white_favorite_shield.png
rename to OsmAnd/res/drawable-mdpi/ic_white_favorite_shield.png
diff --git a/OsmAnd/res/drawable-mdpi/map_white_orange_poi_shield.png b/OsmAnd/res/drawable-mdpi/ic_white_orange_poi_shield.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_white_orange_poi_shield.png
rename to OsmAnd/res/drawable-mdpi/ic_white_orange_poi_shield.png
diff --git a/OsmAnd/res/drawable-mdpi/map_white_orange_poi_shield_small.png b/OsmAnd/res/drawable-mdpi/ic_white_orange_poi_shield_small.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/map_white_orange_poi_shield_small.png
rename to OsmAnd/res/drawable-mdpi/ic_white_orange_poi_shield_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_circle_bottom.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_circle_bottom.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_bottom.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_circle_bottom_small.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_circle_bottom_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_bottom_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_circle_center.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_center.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_circle_center.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_center.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_circle_center_small.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_circle_center_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_center_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_circle_top.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_top.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_circle_top.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_top.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_circle_top_small.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_circle_top_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_circle_top_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_bottom.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_bottom.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_bottom.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_bottom_small.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_bottom_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_bottom_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_center.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_center.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_center.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_center.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_center_small.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_center_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_center_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_top.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_top.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_top.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_top.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_top_small.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_octagon_top_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_octagon_top_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_square_bottom.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_square_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_square_bottom.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_square_bottom.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_square_bottom_small.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_square_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_square_bottom_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_square_bottom_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_square_center.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_square_center.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_square_center.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_square_center.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_square_center_small.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_square_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_square_center_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_square_center_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_square_top.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_square_top.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_square_top.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_square_top.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_bg_point_square_top_small.png b/OsmAnd/res/drawable-xhdpi/ic_bg_point_square_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_bg_point_square_top_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_bg_point_square_top_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_note_audio.png b/OsmAnd/res/drawable-xhdpi/ic_note_audio.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_note_audio.png
rename to OsmAnd/res/drawable-xhdpi/ic_note_audio.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_note_photo.png b/OsmAnd/res/drawable-xhdpi/ic_note_photo.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_note_photo.png
rename to OsmAnd/res/drawable-xhdpi/ic_note_photo.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_note_small.png b/OsmAnd/res/drawable-xhdpi/ic_note_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_note_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_note_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_note_video.png b/OsmAnd/res/drawable-xhdpi/ic_note_video.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_note_video.png
rename to OsmAnd/res/drawable-xhdpi/ic_note_video.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_shield_tap.png b/OsmAnd/res/drawable-xhdpi/ic_shield_tap.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_shield_tap.png
rename to OsmAnd/res/drawable-xhdpi/ic_shield_tap.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_shield_tap_small.png b/OsmAnd/res/drawable-xhdpi/ic_shield_tap_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_shield_tap_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_shield_tap_small.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_white_favorite_shield.png b/OsmAnd/res/drawable-xhdpi/ic_white_favorite_shield.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_white_favorite_shield.png
rename to OsmAnd/res/drawable-xhdpi/ic_white_favorite_shield.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_white_orange_poi_shield.png b/OsmAnd/res/drawable-xhdpi/ic_white_orange_poi_shield.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_white_orange_poi_shield.png
rename to OsmAnd/res/drawable-xhdpi/ic_white_orange_poi_shield.png
diff --git a/OsmAnd/res/drawable-xhdpi/map_white_orange_poi_shield_small.png b/OsmAnd/res/drawable-xhdpi/ic_white_orange_poi_shield_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/map_white_orange_poi_shield_small.png
rename to OsmAnd/res/drawable-xhdpi/ic_white_orange_poi_shield_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_bottom.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_bottom.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_bottom.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_bottom_small.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_bottom_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_bottom_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_center.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_center.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_center.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_center.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_center_small.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_center_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_center_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_top.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_top.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_top.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_top.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_top_small.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_circle_top_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_circle_top_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_bottom.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_bottom.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_bottom.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_bottom_small.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_bottom_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_bottom_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_center.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_center.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_center.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_center.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_center_small.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_center_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_center_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_top.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_top.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_top.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_top.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_top_small.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_octagon_top_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_octagon_top_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_square_bottom.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_square_bottom.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_bottom.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_square_bottom_small.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_square_bottom_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_bottom_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_square_center.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_center.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_square_center.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_center.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_square_center_small.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_square_center_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_center_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_square_top.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_top.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_square_top.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_top.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_bg_point_square_top_small.png b/OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_bg_point_square_top_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_bg_point_square_top_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_note_audio.png b/OsmAnd/res/drawable-xxhdpi/ic_note_audio.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_note_audio.png
rename to OsmAnd/res/drawable-xxhdpi/ic_note_audio.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_note_photo.png b/OsmAnd/res/drawable-xxhdpi/ic_note_photo.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_note_photo.png
rename to OsmAnd/res/drawable-xxhdpi/ic_note_photo.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_note_small.png b/OsmAnd/res/drawable-xxhdpi/ic_note_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_note_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_note_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_note_video.png b/OsmAnd/res/drawable-xxhdpi/ic_note_video.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_note_video.png
rename to OsmAnd/res/drawable-xxhdpi/ic_note_video.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_shield_tap.png b/OsmAnd/res/drawable-xxhdpi/ic_shield_tap.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_shield_tap.png
rename to OsmAnd/res/drawable-xxhdpi/ic_shield_tap.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_shield_tap_small.png b/OsmAnd/res/drawable-xxhdpi/ic_shield_tap_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_shield_tap_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_shield_tap_small.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_white_favorite_shield.png b/OsmAnd/res/drawable-xxhdpi/ic_white_favorite_shield.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_white_favorite_shield.png
rename to OsmAnd/res/drawable-xxhdpi/ic_white_favorite_shield.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_white_orange_poi_shield.png b/OsmAnd/res/drawable-xxhdpi/ic_white_orange_poi_shield.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_white_orange_poi_shield.png
rename to OsmAnd/res/drawable-xxhdpi/ic_white_orange_poi_shield.png
diff --git a/OsmAnd/res/drawable-xxhdpi/map_white_orange_poi_shield_small.png b/OsmAnd/res/drawable-xxhdpi/ic_white_orange_poi_shield_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/map_white_orange_poi_shield_small.png
rename to OsmAnd/res/drawable-xxhdpi/ic_white_orange_poi_shield_small.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_bottom.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_bottom.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_bottom.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_bottom_small.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_bottom_small.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_bottom_small.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_center.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_center.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_center.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_center.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_center_small.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_center_small.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_center_small.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_top.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_top.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_top.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_top.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_top_small.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_circle_top_small.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_circle_top_small.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_bottom.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_bottom.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_bottom.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_bottom_small.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_bottom_small.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_bottom_small.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_center.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_center.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_center.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_center.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_center_small.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_center_small.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_center_small.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_top.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_top.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_top.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_top.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_top_small.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_octagon_top_small.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_octagon_top_small.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_bottom.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_bottom.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_bottom.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_bottom.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_bottom_small.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_bottom_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_bottom_small.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_bottom_small.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_center.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_center.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_center.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_center.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_center_small.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_center_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_center_small.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_center_small.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_top.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_top.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_top.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_top.png
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_top_small.png b/OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_top_small.png
similarity index 100%
rename from OsmAnd/res/drawable-xxxhdpi/map_bg_point_square_top_small.png
rename to OsmAnd/res/drawable-xxxhdpi/ic_bg_point_square_top_small.png
diff --git a/OsmAnd/res/layout/bottom_sheet_item_toolbar_title.xml b/OsmAnd/res/layout/bottom_sheet_item_toolbar_title.xml
index c4cc113ff6..abddfb63d6 100644
--- a/OsmAnd/res/layout/bottom_sheet_item_toolbar_title.xml
+++ b/OsmAnd/res/layout/bottom_sheet_item_toolbar_title.xml
@@ -1,26 +1,30 @@
-
+ android:layout_height="wrap_content"
+ android:background="@android:color/transparent"
+ osmand:elevation="0dp">
-
+ android:fitsSystemWindows="true"
+ android:layout_height="@dimen/bottom_sheet_selected_item_title_height"
+ android:padding="0dp">
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/fragment_subcategories.xml b/OsmAnd/res/layout/fragment_subcategories.xml
index aa3b449c0c..0e8aaf367a 100644
--- a/OsmAnd/res/layout/fragment_subcategories.xml
+++ b/OsmAnd/res/layout/fragment_subcategories.xml
@@ -15,27 +15,16 @@
+ android:padding="0dp"
+ android:theme="?attr/toolbar_theme">
+ android:layout_height="wrap_content">
-
-
-
-
-
diff --git a/OsmAnd/res/layout/maps_in_category_fragment.xml b/OsmAnd/res/layout/maps_in_category_fragment.xml
index 072dd0902c..16d5fe9d29 100644
--- a/OsmAnd/res/layout/maps_in_category_fragment.xml
+++ b/OsmAnd/res/layout/maps_in_category_fragment.xml
@@ -1,6 +1,5 @@
@@ -12,15 +11,10 @@
+ android:padding="0dp" />
-
+ android:layout_marginStart="0dp"
+ android:layout_marginEnd="0dp" />
\ No newline at end of file
diff --git a/OsmAnd/res/layout/preference_activity.xml b/OsmAnd/res/layout/preference_activity.xml
index 3fecba1078..49b97f2938 100644
--- a/OsmAnd/res/layout/preference_activity.xml
+++ b/OsmAnd/res/layout/preference_activity.xml
@@ -4,8 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:background="?attr/list_background_color"
- tools:context="com.antonioleiva.materialeverywhere.SettingsActivity" >
+ android:background="?attr/list_background_color">
+ android:layout_height="@dimen/toolbar_height"
+ android:padding="0dp"
+ android:background="?attr/colorPrimary">
diff --git a/OsmAnd/res/layout/search_poi_filter.xml b/OsmAnd/res/layout/search_poi_filter.xml
index 569a8286e6..1699c4ac10 100644
--- a/OsmAnd/res/layout/search_poi_filter.xml
+++ b/OsmAnd/res/layout/search_poi_filter.xml
@@ -17,10 +17,7 @@
android:background="@color/osmand_orange"
android:minHeight="@dimen/dashboard_map_toolbar"
android:theme="?attr/toolbar_theme"
- app:contentInsetLeft="54dp"
- app:contentInsetStart="54dp"
- app:contentInsetRight="0dp"
- app:contentInsetEnd="0dp">
+ android:padding="0dp">
-
+
-
+
-
+
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/wikipedia_dialog_fragment.xml b/OsmAnd/res/layout/wikipedia_dialog_fragment.xml
index 37429ac0eb..91714016cd 100644
--- a/OsmAnd/res/layout/wikipedia_dialog_fragment.xml
+++ b/OsmAnd/res/layout/wikipedia_dialog_fragment.xml
@@ -15,11 +15,7 @@
android:layout_height="@dimen/toolbar_height"
android:background="?attr/wikivoyage_app_bar_color"
android:gravity="center_vertical"
- android:minHeight="@dimen/toolbar_height"
- osmand:contentInsetLeft="54dp"
- osmand:contentInsetStart="54dp"
- osmand:contentInsetRight="0dp"
- osmand:contentInsetEnd="0dp">
+ android:padding="0dp">
36dp
30dp
15dp
- 9dp
23dp
27dp
3dp
@@ -68,10 +67,6 @@
9dp
5dp
- 90dp
- 18dp
- 108dp
-
30dp
@@ -107,13 +102,8 @@
13dp
60dp
- 78dp
-
29dp
- 20dp
- 23dp
-
180dp
24dp
60dp
@@ -121,6 +111,4 @@
450dp
54dp
- 24dp
-
\ No newline at end of file
diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml
index 5e22e66f86..b5cb7cc697 100644
--- a/OsmAnd/res/values/sizes.xml
+++ b/OsmAnd/res/values/sizes.xml
@@ -195,8 +195,9 @@
40dp
62dp
- 12dp
- 72dp
+ 12dp
+ 72dp
+ 18dp
19sp
@@ -319,6 +320,7 @@
52dp
19dp
+ 48dp
13dp
15dp
@@ -384,4 +386,6 @@
132dp
1.4
+
+ 92dp
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java
index ae8af82440..4074785025 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java
@@ -65,8 +65,6 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map.Entry;
-import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList;
-
/**
* Object is responsible to maintain layers using by map activity
*/
@@ -273,7 +271,9 @@ public class MapActivityLayers {
final ContextMenuAdapter adapter = new ContextMenuAdapter(app);
final List list = new ArrayList<>();
for (PoiUIFilter f : poiFilters.getSortedPoiFilters(true)) {
- addFilterToList(adapter, list, f, true);
+ if (!f.isTopWikiFilter()) {
+ addFilterToList(adapter, list, f, true);
+ }
}
list.add(poiFilters.getCustomPOIFilter());
adapter.setProfileDependent(true);
@@ -306,9 +306,9 @@ public class MapActivityLayers {
if (filter.isStandardFilter()) {
filter.removeUnsavedFilterByName();
}
- poiFilters.addSelectedPoiFilter(PoiTemplateList.POI, filter);
+ poiFilters.addSelectedPoiFilter(filter);
} else {
- poiFilters.removeSelectedPoiFilter(PoiTemplateList.POI, filter);
+ poiFilters.removeSelectedPoiFilter(filter);
}
}
mapView.refreshMap();
@@ -351,7 +351,9 @@ public class MapActivityLayers {
final List list = new ArrayList<>();
list.add(poiFilters.getCustomPOIFilter());
for (PoiUIFilter f : poiFilters.getSortedPoiFilters(true)) {
- addFilterToList(adapter, list, f, false);
+ if (!f.isTopWikiFilter()) {
+ addFilterToList(adapter, list, f, false);
+ }
}
final ArrayAdapter listAdapter = adapter.createListAdapter(activity, !isNightMode(app));
@@ -370,8 +372,9 @@ public class MapActivityLayers {
if (pf.isStandardFilter()) {
pf.removeUnsavedFilterByName();
}
- poiFilters.clearSelectedPoiFilters(PoiTemplateList.POI);
- poiFilters.addSelectedPoiFilter(PoiTemplateList.POI, pf);
+ PoiUIFilter wiki = poiFilters.getTopWikiPoiFilter();
+ poiFilters.clearSelectedPoiFilters(wiki);
+ poiFilters.addSelectedPoiFilter(pf);
mapView.refreshMap();
}
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java
index 6f446d40b1..727c67ce43 100644
--- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java
@@ -78,8 +78,6 @@ import java.util.TreeMap;
import gnu.trove.set.hash.TLongHashSet;
-import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList;
-
/**
* Search poi activity
*/
@@ -166,7 +164,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
public boolean onMenuItemClick(MenuItem item) {
OsmandSettings settings = app.getSettings();
filter.setFilterByName(searchFilter.getText().toString().trim());
- app.getPoiFilters().addSelectedPoiFilter(PoiTemplateList.POI, filter);
+ app.getPoiFilters().addSelectedPoiFilter(filter);
if (location != null) {
settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(), 15);
}
diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java
index 627450665e..6e9938f4ef 100644
--- a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java
+++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java
@@ -59,11 +59,11 @@ public class AudioNotesLayer extends OsmandMapLayer implements
pointAltUI.setColor(0xa0FF3344);
pointAltUI.setStyle(Style.FILL);
- audio = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_note_audio);
- video = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_note_video);
- photo = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_note_photo);
+ 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.map_note_small);
+ pointSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_note_small);
paintIcon = new Paint();
diff --git a/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java b/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java
index 486e64b86d..f0eaf64273 100644
--- a/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java
+++ b/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java
@@ -88,10 +88,10 @@ public class FavoriteImageDrawable extends Drawable {
if (point != null) {
int iconId = point.getBackgroundType().getIconId();
String iconName = ctx.getResources().getResourceEntryName(iconId);
- return ctx.getResources().getIdentifier("map_" + iconName + "_" + layer
+ return ctx.getResources().getIdentifier("ic_" + iconName + "_" + layer
, "drawable", ctx.getPackageName());
}
- return R.drawable.map_white_favorite_shield;
+ return R.drawable.ic_white_favorite_shield;
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java
index b3e11e54b6..1ea1502fcf 100644
--- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java
+++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java
@@ -46,6 +46,7 @@ import net.osmand.plus.activities.SettingsActivity;
import net.osmand.plus.dashboard.DashboardOnMap;
import net.osmand.plus.inapp.InAppPurchaseHelper;
import net.osmand.plus.poi.PoiFiltersHelper;
+import net.osmand.plus.poi.PoiUIFilter;
import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin;
import net.osmand.plus.render.RendererRegistry;
import net.osmand.plus.settings.backend.OsmandSettings;
@@ -101,7 +102,6 @@ import static net.osmand.aidlapi.OsmAndCustomizationConstants.TEXT_SIZE_ID;
import static net.osmand.aidlapi.OsmAndCustomizationConstants.TRANSPORT_ID;
import static net.osmand.aidlapi.OsmAndCustomizationConstants.WIKIPEDIA_ID;
import static net.osmand.plus.ContextMenuAdapter.makeDeleteAction;
-import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList;
import static net.osmand.plus.srtmplugin.SRTMPlugin.CONTOUR_DENSITY_ATTR;
import static net.osmand.plus.srtmplugin.SRTMPlugin.CONTOUR_LINES_ATTR;
import static net.osmand.plus.srtmplugin.SRTMPlugin.CONTOUR_LINES_SCHEME_ATTR;
@@ -255,7 +255,8 @@ public class ConfigureMapMenu {
}
@Override
- public boolean onContextMenuClick(final ArrayAdapter adapter, int itemId, final int pos, boolean isChecked, int[] viewCoordinates) {
+ public boolean onContextMenuClick(final ArrayAdapter adapter, int itemId,
+ final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandSettings settings = ma.getMyApplication().getSettings();
final PoiFiltersHelper poiFiltersHelper = ma.getMyApplication().getPoiFilters();
final ContextMenuItem item = cm.getItem(pos);
@@ -263,12 +264,13 @@ public class ConfigureMapMenu {
item.setColorRes(isChecked ? R.color.osmand_orange : ContextMenuItem.INVALID_ID);
}
if (itemId == R.string.layer_poi) {
- poiFiltersHelper.clearSelectedPoiFilters(PoiTemplateList.POI);
+ PoiUIFilter wiki = poiFiltersHelper.getTopWikiPoiFilter();
+ poiFiltersHelper.clearSelectedPoiFilters(wiki);
if (isChecked) {
showPoiFilterDialog(adapter, adapter.getItem(pos));
} else {
adapter.getItem(pos).setDescription(
- poiFiltersHelper.getSelectedPoiFiltersName(PoiTemplateList.POI));
+ poiFiltersHelper.getSelectedPoiFiltersName(wiki));
}
} else if (itemId == R.string.layer_amenity_label) {
settings.SHOW_POI_LABEL.set(isChecked);
@@ -283,17 +285,17 @@ public class ConfigureMapMenu {
showGpxSelectionDialog(adapter, adapter.getItem(pos));
}
} else if (itemId == R.string.shared_string_wikipedia) {
- WikipediaPoiMenu.toggleWikipediaPoi(ma, isChecked, true,
- new CallbackWithObject() {
- @Override
- public boolean processResult(Boolean selected) {
- item.setSelected(selected);
- item.setColorRes(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID);
- item.setDescription(selected ? WikipediaPoiMenu.getLanguagesSummary(ma.getMyApplication()) : null);
- adapter.notifyDataSetChanged();
- return true;
- }
- });
+ WikipediaPoiMenu.toggleWikipediaPoi(ma, isChecked, new CallbackWithObject() {
+ @Override
+ public boolean processResult(Boolean selected) {
+ item.setSelected(selected);
+ item.setColorRes(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID);
+ item.setDescription(selected ?
+ WikipediaPoiMenu.getLanguagesSummary(ma.getMyApplication()) : null);
+ adapter.notifyDataSetChanged();
+ return true;
+ }
+ });
} else if (itemId == R.string.rendering_category_transport) {
boolean selected = TransportLinesMenu.isShowLines(ma.getMyApplication());
TransportLinesMenu.toggleTransportLines(ma, !selected, new CallbackWithObject() {
@@ -343,19 +345,20 @@ public class ConfigureMapMenu {
protected void showPoiFilterDialog(final ArrayAdapter adapter,
final ContextMenuItem item) {
final PoiFiltersHelper poiFiltersHelper = ma.getMyApplication().getPoiFilters();
+ final PoiUIFilter wiki = poiFiltersHelper.getTopWikiPoiFilter();
MapActivityLayers.DismissListener dismissListener =
new MapActivityLayers.DismissListener() {
@Override
public void dismiss() {
PoiFiltersHelper pf = ma.getMyApplication().getPoiFilters();
- boolean selected = pf.isShowingAnyPoi(PoiTemplateList.POI);
+ boolean selected = pf.isShowingAnyPoi(wiki);
item.setSelected(selected);
- item.setDescription(pf.getSelectedPoiFiltersName(PoiTemplateList.POI));
+ item.setDescription(pf.getSelectedPoiFiltersName(wiki));
item.setColorRes(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID);
adapter.notifyDataSetChanged();
}
};
- if (poiFiltersHelper.isShowingAnyPoi(PoiTemplateList.POI)) {
+ if (poiFiltersHelper.isShowingAnyPoi(wiki)) {
ma.getMapLayers().showMultichoicePoiFilterDialog(ma.getMapView(),
dismissListener);
} else {
@@ -387,12 +390,13 @@ public class ConfigureMapMenu {
.setItemDeleteAction(makeDeleteAction(settings.SHOW_FAVORITES))
.setListener(l)
.createItem());
- selected = app.getPoiFilters().isShowingAnyPoi(PoiTemplateList.POI);
+ PoiUIFilter wiki = app.getPoiFilters().getTopWikiPoiFilter();
+ selected = app.getPoiFilters().isShowingAnyPoi(wiki);
adapter.addItem(new ContextMenuItem.ItemBuilder()
.setId(POI_OVERLAY_ID)
.setTitleId(R.string.layer_poi, activity)
.setSelected(selected)
- .setDescription(app.getPoiFilters().getSelectedPoiFiltersName(PoiTemplateList.POI))
+ .setDescription(app.getPoiFilters().getSelectedPoiFiltersName(wiki))
.setColor(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID)
.setIcon(R.drawable.ic_action_info_dark)
.setSecondaryIcon(R.drawable.ic_action_additional_option)
@@ -428,7 +432,7 @@ public class ConfigureMapMenu {
.setSecondaryIcon(R.drawable.ic_action_additional_option)
.setListener(l).createItem());
- selected = app.getPoiFilters().isShowingAnyPoi(PoiTemplateList.WIKI);
+ selected = app.getPoiFilters().isTopWikiFilterSelected();
adapter.addItem(new ContextMenuItem.ItemBuilder()
.setId(WIKIPEDIA_ID)
.setTitleId(R.string.shared_string_wikipedia, activity)
@@ -437,7 +441,6 @@ public class ConfigureMapMenu {
.setColor(selected ? R.color.osmand_orange : ContextMenuItem.INVALID_ID)
.setIcon(R.drawable.ic_plugin_wikipedia)
.setSecondaryIcon(R.drawable.ic_action_additional_option)
- .setItemDeleteAction(makeDeleteAction(settings.SHOW_WIKIPEDIA_POI))
.setListener(l).createItem());
selected = settings.SHOW_MAP_MARKERS.get();
diff --git a/OsmAnd/src/net/osmand/plus/download/ui/SearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/SearchDialogFragment.java
index a6486f8594..0fa52dc2b7 100644
--- a/OsmAnd/src/net/osmand/plus/download/ui/SearchDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/download/ui/SearchDialogFragment.java
@@ -157,7 +157,7 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
progressBar = (ProgressBar) view.findViewById(R.id.searchProgressBar);
clearButton = (ImageButton) view.findViewById(R.id.clearButton);
- clearButton.setColorFilter(iconColorResId);
+ clearButton.setColorFilter(ContextCompat.getColor(getMyApplication(), iconColorResId));
clearButton.setVisibility(View.GONE);
searchEditText.addTextChangedListener(new TextWatcher() {
diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java
index 8e30fb274f..1a71eea836 100644
--- a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java
+++ b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java
@@ -13,7 +13,6 @@ import net.osmand.osm.PoiCategory;
import net.osmand.osm.PoiType;
import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.OsmandApplication;
-import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.api.SQLiteAPI;
import net.osmand.plus.api.SQLiteAPI.SQLiteConnection;
@@ -38,10 +37,11 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.TreeMap;
import java.util.TreeSet;
import static net.osmand.osm.MapPoiTypes.WIKI_PLACE;
+import static net.osmand.plus.wikipedia.WikipediaPoiMenu.ENABLED_WIKI_POI_LANGUAGES_KEY;
+import static net.osmand.plus.wikipedia.WikipediaPoiMenu.GLOBAL_WIKI_POI_ENABLED_KEY;
public class PoiFiltersHelper {
@@ -55,10 +55,9 @@ public class PoiFiltersHelper {
private PoiUIFilter customPOIFilter;
private PoiUIFilter showAllPOIFilter;
private PoiUIFilter localWikiPoiFilter;
- private PoiUIFilter globalWikiPoiFilter;
+ private PoiUIFilter topWikiPoiFilter;
private List cacheTopStandardFilters;
- private List cacheWikipediaFilters;
- private Map> selectedPoiFilters = new TreeMap<>();
+ private Set selectedPoiFilters = new TreeSet<>();
private static final String UDF_CAR_AID = "car_aid";
private static final String UDF_FOR_TOURISTS = "for_tourists";
@@ -75,10 +74,6 @@ public class PoiFiltersHelper {
UDF_CAR_AID, UDF_FOR_TOURISTS, UDF_FOOD_SHOP, UDF_FUEL, UDF_SIGHTSEEING, UDF_EMERGENCY,
UDF_PUBLIC_TRANSPORT, UDF_ACCOMMODATION, UDF_RESTAURANTS, UDF_PARKING
};
-
- public enum PoiTemplateList {
- POI, WIKI
- }
public PoiFiltersHelper(OsmandApplication application) {
this.application = application;
@@ -139,56 +134,42 @@ public class PoiFiltersHelper {
return localWikiPoiFilter;
}
- public PoiUIFilter getGlobalWikiPoiFilter() {
- if (globalWikiPoiFilter == null) {
+ public void prepareTopWikiFilter(@NonNull PoiUIFilter wiki) {
+ boolean prepareByDefault = true;
+ Bundle wikiSettings = WikipediaPoiMenu.getWikiPoiSettings(application);
+ if (wikiSettings != null) {
+ boolean allLanguages = wikiSettings.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY);
+ List languages = wikiSettings
+ .getStringArrayList(ENABLED_WIKI_POI_LANGUAGES_KEY);
+ if (!allLanguages && languages != null) {
+ prepareByDefault = false;
+ String wikiLang = "wiki:lang:";
+ StringBuilder sb = new StringBuilder();
+ for (String lang : languages) {
+ if (sb.length() > 1) {
+ sb.append(" ");
+ }
+ sb.append(wikiLang).append(lang);
+ }
+ wiki.setFilterByName(sb.toString());
+ }
+ }
+ if (prepareByDefault) {
+ wiki.setFilterByName(null);
+ }
+ }
+
+ public PoiUIFilter getTopWikiPoiFilter() {
+ if (topWikiPoiFilter == null) {
String wikiFilterId = PoiUIFilter.STD_PREFIX + "osmwiki";
for (PoiUIFilter filter : getTopDefinedPoiFilters()) {
if (wikiFilterId.equals(filter.getFilterId())) {
- globalWikiPoiFilter = filter;
+ topWikiPoiFilter = filter;
break;
}
}
}
- return globalWikiPoiFilter;
- }
-
- public List getLocalWikipediaPoiFilters(boolean onlyActiveLocales) {
- String wikiLang = "wiki:lang:";
- if (cacheWikipediaFilters == null) {
- List wikipediaFilters = new ArrayList<>();
- PoiType place = application.getPoiTypes().getPoiTypeByKey(WIKI_PLACE);
- if (place != null) {
- for (String locale : application.getPoiTypes().getAllAvailableWikiLocales()) {
- PoiUIFilter filter = new PoiUIFilter(place, application, " " +
- WikipediaPoiMenu.getTranslation(application, locale));
- filter.setSavedFilterByName(wikiLang + locale);
- filter.setStandardFilter(true);
- wikipediaFilters.add(filter);
- }
- }
- cacheWikipediaFilters = wikipediaFilters;
- }
- if (onlyActiveLocales && cacheWikipediaFilters.size() > 0) {
- List onlyActiveLocalFilters = new ArrayList<>();
- Bundle wikiPoiSettings = WikipediaPoiMenu.getWikiPoiSettings(application);
- if (wikiPoiSettings != null) {
- List enabledWikipediaPoiLocales =
- wikiPoiSettings.getStringArrayList(WikipediaPoiMenu.ENABLED_WIKI_POI_LANGUAGES_KEY);
- if (enabledWikipediaPoiLocales != null) {
- for (PoiUIFilter filter : cacheWikipediaFilters) {
- for (String locale : enabledWikipediaPoiLocales) {
- String filterId = filter.getSavedFilterByName();
- String filterLocale = filterId.substring(wikiLang.length());
- if (locale.equalsIgnoreCase(filterLocale)) {
- onlyActiveLocalFilters.add(filter);
- }
- }
- }
- }
- }
- return onlyActiveLocalFilters;
- }
- return cacheWikipediaFilters;
+ return topWikiPoiFilter;
}
public PoiUIFilter getShowAllPOIFilter() {
@@ -235,13 +216,9 @@ public class PoiFiltersHelper {
return f;
}
}
- for (PoiUIFilter f : getLocalWikipediaPoiFilters(true)) {
- if (f.getFilterId().equals(filterId)) {
- return f;
- }
- }
PoiUIFilter ff = getFilterById(filterId, getCustomPOIFilter(), getSearchByNamePOIFilter(),
- getGlobalWikiPoiFilter(), getShowAllPOIFilter(), getNominatimPOIFilter(), getNominatimAddressFilter());
+ getTopWikiPoiFilter(), getLocalWikiPOIFilter(), getShowAllPOIFilter(),
+ getNominatimPOIFilter(), getNominatimAddressFilter());
if (ff != null) {
return ff;
}
@@ -306,6 +283,9 @@ public class PoiFiltersHelper {
List top = new ArrayList<>();
// user defined
top.addAll(getUserDefinedPoiFilters(true));
+ if (getLocalWikiPOIFilter() != null) {
+ top.add(getLocalWikiPOIFilter());
+ }
// default
MapPoiTypes poiTypes = application.getPoiTypes();
for (AbstractPoiType t : poiTypes.getTopVisibleFilters()) {
@@ -505,79 +485,68 @@ public class PoiFiltersHelper {
return false;
}
- public Set getSelectedPoiFilters() {
- Set result = new TreeSet<>();
- for (Set template : selectedPoiFilters.values()) {
- if (template != null) {
- result.addAll(template);
+ public Set getSelectedPoiFilters(PoiUIFilter ... filtersToExclude) {
+ if (filtersToExclude != null && filtersToExclude.length > 0) {
+ Set filters = new TreeSet<>();
+ for (PoiUIFilter filter : selectedPoiFilters) {
+ boolean skip = false;
+ for (PoiUIFilter filterToExclude : filtersToExclude) {
+ String filterToExcludeId = filterToExclude.getFilterId();
+ if (filterToExcludeId != null && filterToExcludeId.equals(filter.getFilterId())) {
+ skip = true;
+ break;
+ }
+ }
+ if (!skip) {
+ filters.add(filter);
+ }
}
+ return filters;
}
- return result;
+ return selectedPoiFilters;
}
- @NonNull
- public Set getSelectedPoiFilters(PoiTemplateList type) {
- Set result = selectedPoiFilters.get(type);
- if (result == null) {
- return new TreeSet<>();
- }
- return result;
- }
-
- public void addSelectedPoiFilter(PoiTemplateList type, PoiUIFilter filter) {
- if (!selectedPoiFilters.containsKey(type)) {
- selectedPoiFilters.put(type, new TreeSet());
- }
- Set templateFilters = selectedPoiFilters.get(type);
- if (templateFilters != null) {
- templateFilters.add(filter);
+ public void addSelectedPoiFilter(PoiUIFilter filter) {
+ if (filter.isTopWikiFilter()) {
+ prepareTopWikiFilter(filter);
}
+ selectedPoiFilters.add(filter);
saveSelectedPoiFilters();
}
- public void removeSelectedPoiFilter(PoiTemplateList type, PoiUIFilter filter) {
- if (selectedPoiFilters.containsKey(type)) {
- Set templateFilters = selectedPoiFilters.get(type);
- if (templateFilters != null) {
- templateFilters.remove(filter);
+ public void removeSelectedPoiFilter(PoiUIFilter filter) {
+ selectedPoiFilters.remove(filter);
+ saveSelectedPoiFilters();
+ }
+
+ public boolean isShowingAnyPoi(PoiUIFilter ... filtersToExclude) {
+ return !getSelectedPoiFilters(filtersToExclude).isEmpty();
+ }
+
+ public void clearSelectedPoiFilters(PoiUIFilter ... filtersToExclude) {
+ if (filtersToExclude != null && filtersToExclude.length > 0) {
+ Iterator it = selectedPoiFilters.iterator();
+ while (it.hasNext()) {
+ PoiUIFilter filter = it.next();
+ boolean skip = false;
+ for (PoiUIFilter filterToExclude : filtersToExclude) {
+ String filterToExcludeId = filterToExclude.getFilterId();
+ if (filterToExcludeId != null
+ && filterToExcludeId.equals(filter.getFilterId())) {
+ skip = true;
+ break;
+ }
+ }
+ if (!skip) {
+ it.remove();
+ }
}
+ } else {
+ selectedPoiFilters.clear();
}
saveSelectedPoiFilters();
}
- public boolean isShowingAnyPoi() {
- for (PoiTemplateList type : selectedPoiFilters.keySet()) {
- if (isShowingAnyPoi(type)) {
- return true;
- }
- }
- return false;
- }
-
- public boolean isShowingAnyPoi(PoiTemplateList type) {
- return !getSelectedPoiFilters(type).isEmpty();
- }
-
- public void clearSelectedPoiFilters() {
- for (PoiTemplateList t : selectedPoiFilters.keySet()) {
- clearSelectedPoiFilters(t);
- }
- saveSelectedPoiFilters();
- }
-
- public void clearSelectedPoiFilters(PoiTemplateList type) {
- Set templateFilters = selectedPoiFilters.get(type);
- if (templateFilters != null) {
- templateFilters.clear();
- }
- saveSelectedPoiFilters();
- }
-
- public void hidePoiFilters() {
- selectedPoiFilters.clear();
- saveSelectedPoiFilters();
- }
-
public String getFiltersName(Set filters) {
if (filters.isEmpty()) {
return application.getResources().getString(R.string.shared_string_none);
@@ -590,23 +559,28 @@ public class PoiFiltersHelper {
}
}
- public String getSelectedPoiFiltersName(PoiTemplateList type) {
- return getFiltersName(getSelectedPoiFilters(type));
+ public String getSelectedPoiFiltersName(PoiUIFilter ... filtersToExclude) {
+ return getFiltersName(getSelectedPoiFilters(filtersToExclude));
}
public boolean isPoiFilterSelected(PoiUIFilter filter) {
- for (Set template : selectedPoiFilters.values()) {
- return template.contains(filter);
+ return selectedPoiFilters.contains(filter);
+ }
+
+ public boolean isTopWikiFilterSelected() {
+ String wikiFilterId = getTopWikiPoiFilter().getFilterId();
+ for (PoiUIFilter filter : selectedPoiFilters) {
+ if (wikiFilterId.equals(filter.getFilterId())) {
+ return true;
+ }
}
return false;
}
public boolean isPoiFilterSelected(String filterId) {
- for (Set template : selectedPoiFilters.values()) {
- for (PoiUIFilter filter : template) {
- if (filter.filterId.equals(filterId)) {
- return true;
- }
+ for (PoiUIFilter filter : selectedPoiFilters) {
+ if (filter.filterId.equals(filterId)) {
+ return true;
}
}
return false;
@@ -617,20 +591,14 @@ public class PoiFiltersHelper {
if(!application.getPoiTypes().isInit()) {
return;
}
- selectedPoiFilters.clear();
- OsmandSettings settings = application.getSettings();
- Set filters = settings.getSelectedPoiFilters();
- boolean shouldShowWikiPoi = WikipediaPoiMenu.isWikiPoiEnabled(application);
- for (String f : filters) {
+ selectedPoiFilters = new TreeSet<>();
+ for (String f : application.getSettings().getSelectedPoiFilters()) {
PoiUIFilter filter = getFilterById(f);
if (filter != null) {
- if (filter.isWikiFilter()) {
- if (shouldShowWikiPoi) {
- addSelectedPoiFilter(PoiTemplateList.WIKI, filter);
- }
- } else {
- addSelectedPoiFilter(PoiTemplateList.POI, filter);
+ if (filter.isTopWikiFilter()) {
+ prepareTopWikiFilter(filter);
}
+ selectedPoiFilters.add(filter);
}
}
}
@@ -664,10 +632,8 @@ public class PoiFiltersHelper {
private void saveSelectedPoiFilters() {
Set filters = new HashSet<>();
- for (Set template : selectedPoiFilters.values()) {
- for (PoiUIFilter filter : template) {
- filters.add(filter.filterId);
- }
+ for (PoiUIFilter filter : selectedPoiFilters) {
+ filters.add(filter.filterId);
}
application.getSettings().setSelectedPoiFilters(filters);
}
diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java
index 59d22aef93..99c42dea21 100644
--- a/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java
+++ b/OsmAnd/src/net/osmand/plus/poi/PoiUIFilter.java
@@ -4,6 +4,7 @@ package net.osmand.plus.poi;
import android.content.Context;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import net.osmand.CollatorStringMatcher;
import net.osmand.CollatorStringMatcher.StringMatcherMode;
@@ -150,8 +151,11 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable
}
public boolean isWikiFilter() {
- return filterId.startsWith(STD_PREFIX + WIKI_PLACE)
- || filterId.equals(STD_PREFIX + OSM_WIKI_CATEGORY);
+ return filterId.startsWith(STD_PREFIX + WIKI_PLACE) || isTopWikiFilter();
+ }
+
+ public boolean isTopWikiFilter() {
+ return filterId.equals(STD_PREFIX + OSM_WIKI_CATEGORY);
}
public String getFilterByName() {
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java
index f244fe0f4c..4c2d452e64 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java
@@ -33,8 +33,6 @@ import java.util.Collections;
import java.util.List;
import java.util.Set;
-import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList;
-
public class ShowHidePoiAction extends QuickAction {
@@ -114,18 +112,18 @@ public class ShowHidePoiAction extends QuickAction {
PoiFiltersHelper pf = activity.getMyApplication().getPoiFilters();
List poiFilters = loadPoiFilters(activity.getMyApplication().getPoiFilters());
- if (!isCurrentFilters(pf.getSelectedPoiFilters(PoiTemplateList.POI), poiFilters)) {
+ if (!isCurrentFilters(pf.getSelectedPoiFilters(), poiFilters)) {
- pf.clearSelectedPoiFilters(PoiTemplateList.POI);
+ pf.clearSelectedPoiFilters();
for (PoiUIFilter filter : poiFilters) {
if (filter.isStandardFilter()) {
filter.removeUnsavedFilterByName();
}
- pf.addSelectedPoiFilter(PoiTemplateList.POI, filter);
+ pf.addSelectedPoiFilter(filter);
}
- } else pf.clearSelectedPoiFilters(PoiTemplateList.POI);
+ } else pf.clearSelectedPoiFilters();
activity.getMapLayers().updateLayers(activity.getMapView());
}
@@ -135,7 +133,7 @@ public class ShowHidePoiAction extends QuickAction {
PoiFiltersHelper pf = application.getPoiFilters();
List poiFilters = loadPoiFilters(application.getPoiFilters());
- return isCurrentFilters(pf.getSelectedPoiFilters(PoiTemplateList.POI), poiFilters);
+ return isCurrentFilters(pf.getSelectedPoiFilters(), poiFilters);
}
private boolean isCurrentFilters(Set currentPoiFilters, List poiFilters) {
diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java
index 73d1573858..7cf08a10cc 100644
--- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java
+++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java
@@ -120,8 +120,6 @@ import java.util.Map;
import java.util.Set;
import java.util.Stack;
-import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList;
-
public class MapRouteInfoMenu implements IRouteInformationListener, CardListener, FavoritesListener {
private static final Log LOG = PlatformUtil.getLog(MapRouteInfoMenu.class);
@@ -1158,7 +1156,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
private void createShowAlongTheRouteItems(MapActivity mapActivity, LinearLayout optionsContainer) {
OsmandApplication app = mapActivity.getMyApplication();
final ApplicationMode applicationMode = app.getRoutingHelper().getAppMode();
- final Set poiFilters = app.getPoiFilters().getSelectedPoiFilters(PoiTemplateList.POI);
+ final Set poiFilters = app.getPoiFilters().getSelectedPoiFilters();
final boolean traffic = app.getSettings().SHOW_TRAFFIC_WARNINGS.getModeValue(applicationMode);
final boolean fav = app.getSettings().SHOW_NEARBY_FAVORITES.getModeValue(applicationMode);
if (!poiFilters.isEmpty()) {
@@ -1184,7 +1182,8 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
public void onClick(View v) {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
- mapActivity.getMyApplication().getPoiFilters().removeSelectedPoiFilter(PoiTemplateList.POI, poiUIFilter);
+ mapActivity.getMyApplication().getPoiFilters()
+ .removeSelectedPoiFilter(poiUIFilter);
mapActivity.getMapView().refreshMap();
updateOptionsButtons();
}
diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java
index c6df9e64a1..20c93dadc6 100644
--- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/ShowAlongTheRouteBottomSheet.java
@@ -45,8 +45,6 @@ import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
-import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList;
-
public class ShowAlongTheRouteBottomSheet extends MenuBottomSheetDialogFragment implements IRouteInformationListener, IRoutingDataUpdateListener {
public static final String TAG = "ShowAlongTheRouteBottomSheet";
@@ -436,8 +434,8 @@ public class ShowAlongTheRouteBottomSheet extends MenuBottomSheetDialogFragment
View v;
if (type == WaypointHelper.POI) {
v = themedInflater.inflate(R.layout.along_the_route_radius_poi, null);
- String descEx = !app.getPoiFilters().isShowingAnyPoi(PoiTemplateList.POI) ?
- getString(R.string.poi) : app.getPoiFilters().getSelectedPoiFiltersName(PoiTemplateList.POI);
+ String descEx = !app.getPoiFilters().isShowingAnyPoi() ?
+ getString(R.string.poi) : app.getPoiFilters().getSelectedPoiFiltersName();
((TextView) v.findViewById(R.id.title)).setText(getString(R.string.search_radius_proximity) + ":");
((TextView) v.findViewById(R.id.titleEx)).setText(getString(R.string.shared_string_type) + ":");
final TextView radiusEx = (TextView) v.findViewById(R.id.descriptionEx);
@@ -487,7 +485,7 @@ public class ShowAlongTheRouteBottomSheet extends MenuBottomSheetDialogFragment
new MapActivityLayers.DismissListener() {
@Override
public void dismiss() {
- if (app.getPoiFilters().isShowingAnyPoi(PoiTemplateList.POI)) {
+ if (app.getPoiFilters().isShowingAnyPoi()) {
enableType(type, enable);
}
}
diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java
index 078908ad1e..e882ff5da0 100644
--- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java
@@ -111,7 +111,6 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList;
import static net.osmand.plus.search.SendSearchQueryBottomSheet.MISSING_SEARCH_LOCATION_KEY;
import static net.osmand.plus.search.SendSearchQueryBottomSheet.MISSING_SEARCH_QUERY_KEY;
import static net.osmand.search.core.ObjectType.POI_TYPE;
@@ -388,8 +387,8 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
} else {
filter = (PoiUIFilter) searchPhrase.getLastSelectedWord().getResult().object;
}
- app.getPoiFilters().clearSelectedPoiFilters(PoiTemplateList.POI);
- app.getPoiFilters().addSelectedPoiFilter(PoiTemplateList.POI, filter);
+ app.getPoiFilters().clearSelectedPoiFilters();
+ app.getPoiFilters().addSelectedPoiFilter(filter);
mapActivity.getContextMenu().closeActiveToolbar();
showToolbar();
@@ -866,7 +865,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
}
public void closeSearch() {
- app.getPoiFilters().clearSelectedPoiFilters(PoiTemplateList.POI);
+ app.getPoiFilters().clearSelectedPoiFilters();
dismiss();
}
diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java
index e51454e548..fd13f09dc1 100644
--- a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java
+++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java
@@ -46,8 +46,6 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.List;
-import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList;
-
public class QuickSearchHelper implements ResourceListener {
public static final int SEARCH_FAVORITE_API_PRIORITY = 50;
@@ -504,8 +502,8 @@ public class QuickSearchHelper implements ResourceListener {
});
controller.setTitle(filter.getName());
PoiFiltersHelper helper = mapActivity.getMyApplication().getPoiFilters();
- helper.clearSelectedPoiFilters(PoiTemplateList.POI);
- helper.addSelectedPoiFilter(PoiTemplateList.POI, filter);
+ helper.clearSelectedPoiFilters();
+ helper.addSelectedPoiFilter(filter);
mapActivity.showTopToolbar(controller);
mapActivity.refreshMap();
}
@@ -514,7 +512,7 @@ public class QuickSearchHelper implements ResourceListener {
@NonNull TopToolbarController controller,
@Nullable Runnable action) {
mapActivity.hideTopToolbar(controller);
- mapActivity.getMyApplication().getPoiFilters().clearSelectedPoiFilters(PoiTemplateList.POI);
+ mapActivity.getMyApplication().getPoiFilters().clearSelectedPoiFilters();
mapActivity.refreshMap();
if (action != null) {
action.run();
diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java
index 1a336e50eb..152c2f1b90 100644
--- a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java
+++ b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java
@@ -1525,7 +1525,6 @@ public class OsmandSettings {
public final CommonPreference WIKI_ARTICLE_SHOW_IMAGES_ASKED = new BooleanPreference("wikivoyage_show_images_asked", false).makeGlobal();
public final CommonPreference WIKI_ARTICLE_SHOW_IMAGES = new EnumStringPreference<>("wikivoyage_show_imgs", WikiArticleShowImages.OFF, WikiArticleShowImages.values()).makeGlobal();
- public final CommonPreference SHOW_WIKIPEDIA_POI = new BooleanPreference("show_wikipedia_poi", false).makeProfile();
public final CommonPreference GLOBAL_WIKIPEDIA_POI_ENABLED = new BooleanPreference("global_wikipedia_poi_enabled", false).makeProfile();
public final ListStringPreference WIKIPEDIA_POI_ENABLED_LANGUAGES = (ListStringPreference) new ListStringPreference("wikipedia_poi_enabled_languages", null, ",").makeProfile().cache();
diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java
index 28deeb65af..40aea7d75b 100644
--- a/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java
@@ -97,7 +97,7 @@ public class TurnScreenOnFragment extends BaseSettingsFragment implements OnPref
private void setupTurnScreenOnPowerButtonPref() {
ApplicationMode appMode = getSelectedAppMode();
- boolean enabled = settings.TURN_SCREEN_ON_TIME_INT.get() == 0 || settings.USE_SYSTEM_SCREEN_TIMEOUT.get();
+ boolean enabled = settings.TURN_SCREEN_ON_TIME_INT.getModeValue(appMode) == 0 || settings.USE_SYSTEM_SCREEN_TIMEOUT.getModeValue(appMode);
SwitchPreferenceEx turnScreenOnPowerButton = (SwitchPreferenceEx) findPreference(settings.TURN_SCREEN_ON_POWER_BUTTON.getId());
turnScreenOnPowerButton.setEnabled(enabled);
turnScreenOnPowerButton.setDescription(R.string.turn_screen_on_power_button_descr);
diff --git a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java
index 18ccf6117b..ecc71dcfe2 100644
--- a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java
@@ -146,8 +146,8 @@ public class ContextMenuLayer extends OsmandMapLayer {
contextMarker.layout(0, 0, minw, minh);
paint = new Paint();
- pressedBitmap = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_shield_tap);
- pressedBitmapSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_shield_tap_small);
+ pressedBitmap = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_shield_tap);
+ pressedBitmapSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.ic_shield_tap_small);
outlinePaint = new Paint();
outlinePaint.setStyle(Paint.Style.STROKE);
diff --git a/OsmAnd/src/net/osmand/plus/views/OsmAndMapSurfaceView.java b/OsmAnd/src/net/osmand/plus/views/OsmAndMapSurfaceView.java
index 4a9b47e008..c4d682c2fb 100644
--- a/OsmAnd/src/net/osmand/plus/views/OsmAndMapSurfaceView.java
+++ b/OsmAnd/src/net/osmand/plus/views/OsmAndMapSurfaceView.java
@@ -1,8 +1,6 @@
package net.osmand.plus.views;
-import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
import android.content.Context;
-import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -102,20 +100,8 @@ public class OsmAndMapSurfaceView extends SurfaceView implements Callback {
}
return mapView.onTouchEvent(event);
}
-
- @Override
- protected void onDraw(Canvas canvas) {
- if(mapView == null) {
- return;
- }
- boolean nightMode = mapView.getApplication().getDaynightHelper().isNightMode();
- DrawSettings drawSettings = new DrawSettings(nightMode, false);
- mapView.drawOverMap(canvas, mapView.getCurrentRotatedTileBox().copy(), drawSettings);
- }
-
public OsmandMapTileView getMapView() {
return mapView;
}
-
-}
+}
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
index 3a9c022a9f..c6576a1027 100644
--- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
+++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
@@ -13,6 +13,7 @@ import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.PointF;
import android.graphics.RectF;
+import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
@@ -42,10 +43,10 @@ import net.osmand.map.MapTileDownloader.IMapDownloaderCallback;
import net.osmand.plus.OsmAndConstants;
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.activities.MapActivity;
import net.osmand.plus.helpers.TwoFingerTapDetector;
+import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.views.MultiTouchSupport.MultiTouchZoomListener;
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
import net.osmand.render.RenderingRuleSearchRequest;
@@ -267,6 +268,9 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
view.setClickable(true);
view.setLongClickable(true);
view.setFocusable(true);
+ if (Build.VERSION.SDK_INT >= 26) {
+ view.setDefaultFocusHighlightEnabled(false);
+ }
refreshMap(true);
}
diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
index 411eaf3d6c..dadd9f5f58 100644
--- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
@@ -39,6 +39,7 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
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;
@@ -178,8 +179,8 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
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.map_white_orange_poi_shield);
- poiBackgroundSmall = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_white_orange_poi_shield_small);
+ 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);
}
@@ -205,8 +206,8 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
@Override
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
Set selectedPoiFilters = app.getPoiFilters().getSelectedPoiFilters();
- if (!this.filters.equals(selectedPoiFilters)) {
- this.filters = new TreeSet<>(selectedPoiFilters);
+ if (this.filters != selectedPoiFilters) {
+ this.filters = selectedPoiFilters;
data.clearCache();
}
diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java b/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java
index 44a3042657..113cba1ebe 100644
--- a/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/wikipedia/SelectWikiLanguagesBottomSheet.java
@@ -151,6 +151,7 @@ public class SelectWikiLanguagesBottomSheet extends MenuBottomSheetDialogFragmen
languages.add(new WikiLanguageItem(locale, WikipediaPoiMenu.getTranslation(app, locale), checked, topDefined));
}
} else {
+ isGlobalWikiPoiEnabled = true;
for (String locale : app.getPoiTypes().getAllAvailableWikiLocales()) {
boolean topDefined = preferredLocales.contains(locale);
languages.add(new WikiLanguageItem(locale, WikipediaPoiMenu.getTranslation(app, locale), false, topDefined));
diff --git a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java
index cde895b1c3..054edb18c5 100644
--- a/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java
+++ b/OsmAnd/src/net/osmand/plus/wikipedia/WikipediaPoiMenu.java
@@ -29,7 +29,6 @@ import java.util.List;
import java.util.Set;
import static net.osmand.osm.MapPoiTypes.WIKI_LANG;
-import static net.osmand.plus.poi.PoiFiltersHelper.PoiTemplateList;
public class WikipediaPoiMenu {
@@ -54,7 +53,7 @@ public class WikipediaPoiMenu {
final int toggleActionStringId = R.string.shared_string_wikipedia;
final int languageActionStringId = R.string.shared_string_language;
final int spaceHeight = app.getResources().getDimensionPixelSize(R.dimen.bottom_sheet_big_item_height);
- final boolean enabled = app.getPoiFilters().isShowingAnyPoi(PoiTemplateList.WIKI);
+ final boolean enabled = app.getPoiFilters().isTopWikiFilterSelected();
ContextMenuAdapter adapter = new ContextMenuAdapter(app);
adapter.setDefaultLayoutId(R.layout.dash_item_with_description_72dp);
adapter.setProfileDependent(true);
@@ -76,11 +75,11 @@ public class WikipediaPoiMenu {
app.runInUIThread(new Runnable() {
@Override
public void run() {
- toggleWikipediaPoi(mapActivity, !enabled, true, callback);
+ toggleWikipediaPoi(mapActivity, !enabled, callback);
}
});
} else if (itemId == languageActionStringId) {
- showLanguagesDialog(mapActivity, appMode, true, true, callback);
+ showLanguagesDialog(mapActivity, appMode, true, callback);
}
return false;
}
@@ -234,7 +233,6 @@ public class WikipediaPoiMenu {
private static void showLanguagesDialog(@NonNull final MapActivity mapActivity,
@NonNull final ApplicationMode appMode,
final boolean usedOnMap,
- final boolean refresh,
final CallbackWithObject callback) {
final OsmandApplication app = mapActivity.getMyApplication();
SelectWikiLanguagesBottomSheet.showInstance(mapActivity, appMode, usedOnMap,
@@ -244,15 +242,9 @@ public class WikipediaPoiMenu {
if (result) {
Bundle wikiPoiSetting = getWikiPoiSettingsForProfile(app, appMode);
if (wikiPoiSetting != null) {
- boolean globalWikiEnabled =
- wikiPoiSetting.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY);
- if (refresh) {
- refreshWikiPoi(mapActivity, globalWikiEnabled);
- } else {
- toggleWikipediaPoi(mapActivity, true, usedOnMap, callback);
- }
+ refreshWikipediaOnMap(mapActivity);
} else {
- toggleWikipediaPoi(mapActivity, false, usedOnMap, callback);
+ toggleWikipediaPoi(mapActivity, false, callback);
}
}
return true;
@@ -304,65 +296,46 @@ public class WikipediaPoiMenu {
}
public static void toggleWikipediaPoi(final MapActivity mapActivity, boolean enable,
- boolean usedOnMap, CallbackWithObject callback) {
+ CallbackWithObject callback) {
OsmandApplication app = mapActivity.getMyApplication();
- OsmandSettings settings = app.getSettings();
if (enable) {
- Bundle wikiPoiSettings = getWikiPoiSettings(app);
- if (wikiPoiSettings != null) {
- settings.SHOW_WIKIPEDIA_POI.set(true);
- boolean globalWikiEnabled = wikiPoiSettings.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY);
- showWikiOnMap(app, globalWikiEnabled);
- } else {
- ApplicationMode appMode = settings.getApplicationMode();
- showLanguagesDialog(mapActivity, appMode, usedOnMap, false, callback);
- }
+ showWikipediaOnMap(app);
} else {
- settings.SHOW_WIKIPEDIA_POI.set(false);
- hideWikiFromMap(app);
+ hideWikipediaFromMap(app);
}
if (callback != null) {
- callback.processResult(settings.SHOW_WIKIPEDIA_POI.get());
+ callback.processResult(enable);
}
mapActivity.refreshMap();
}
- public static void refreshWikiPoi(MapActivity mapActivity, boolean globalWikiEnabled) {
+ public static void refreshWikipediaOnMap(MapActivity mapActivity) {
OsmandApplication app = mapActivity.getMyApplication();
- hideWikiFromMap(app);
- showWikiOnMap(app, globalWikiEnabled);
+ app.getPoiFilters().loadSelectedPoiFilters();
mapActivity.getDashboard().refreshContent(true);
mapActivity.refreshMap();
}
- private static void showWikiOnMap(OsmandApplication app, boolean globalWikiEnabled) {
+ private static void showWikipediaOnMap(OsmandApplication app) {
PoiFiltersHelper ph = app.getPoiFilters();
- if (globalWikiEnabled) {
- ph.addSelectedPoiFilter(PoiTemplateList.WIKI, ph.getGlobalWikiPoiFilter());
- } else {
- List filters = ph.getLocalWikipediaPoiFilters(true);
- for (PoiUIFilter filter : filters) {
- ph.addSelectedPoiFilter(PoiTemplateList.WIKI, filter);
- }
- }
+ PoiUIFilter wiki = ph.getTopWikiPoiFilter();
+ ph.loadSelectedPoiFilters();
+ ph.addSelectedPoiFilter(wiki);
}
- private static void hideWikiFromMap(OsmandApplication app) {
+ private static void hideWikipediaFromMap(OsmandApplication app) {
PoiFiltersHelper ph = app.getPoiFilters();
- for (PoiUIFilter filter : ph.getSelectedPoiFilters(PoiTemplateList.WIKI)) {
- ph.removePoiFilter(filter);
- }
- ph.clearSelectedPoiFilters(PoiTemplateList.WIKI);
+ PoiUIFilter wiki = ph.getTopWikiPoiFilter();
+ ph.removePoiFilter(wiki);
+ ph.removeSelectedPoiFilter(wiki);
}
public static String getLanguagesSummary(OsmandApplication app) {
- Bundle wikiLanguagesSetting = getWikiPoiSettings(app);
- if (wikiLanguagesSetting != null) {
- boolean globalWikiEnabled = wikiLanguagesSetting.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY);
- List enabledLocales = wikiLanguagesSetting.getStringArrayList(ENABLED_WIKI_POI_LANGUAGES_KEY);
- if (globalWikiEnabled) {
- return app.getString(R.string.shared_string_all_languages);
- } else if (enabledLocales != null) {
+ Bundle wikiSetting = getWikiPoiSettings(app);
+ if (wikiSetting != null) {
+ boolean globalWikiEnabled = wikiSetting.getBoolean(GLOBAL_WIKI_POI_ENABLED_KEY);
+ List enabledLocales = wikiSetting.getStringArrayList(ENABLED_WIKI_POI_LANGUAGES_KEY);
+ if (!globalWikiEnabled && enabledLocales != null) {
List translations = new ArrayList<>();
for (String locale : enabledLocales) {
translations.add(getTranslation(app, locale));
@@ -370,11 +343,7 @@ public class WikipediaPoiMenu {
return android.text.TextUtils.join(", ", translations);
}
}
- return null;
- }
-
- public static boolean isWikiPoiEnabled(OsmandApplication app) {
- return app.getSettings().SHOW_WIKIPEDIA_POI.get() && getWikiPoiSettings(app) != null;
+ return app.getString(R.string.shared_string_all_languages);
}
public static ContextMenuAdapter createListAdapter(final MapActivity mapActivity) {
@@ -385,7 +354,7 @@ public class WikipediaPoiMenu {
@NonNull Set availableArticleLangs,
String preferredLanguage) {
Bundle wikiPoiSettings = getWikiPoiSettings(app);
- if (!app.getSettings().SHOW_WIKIPEDIA_POI.get() || wikiPoiSettings == null) {
+ if (!app.getPoiFilters().isTopWikiFilterSelected() || wikiPoiSettings == null) {
// Wikipedia POI setting disabled
return preferredLanguage;
}