diff --git a/OsmAnd/res/drawable-hdpi/arrow_down.png b/OsmAnd/res/drawable-hdpi/arrow_down.png
deleted file mode 100644
index 104b98ed02..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/arrow_down.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/arrow_up.png b/OsmAnd/res/drawable-hdpi/arrow_up.png
deleted file mode 100644
index d69dd84fd8..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/arrow_up.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/background.png b/OsmAnd/res/drawable-hdpi/background.png
deleted file mode 100644
index 29530e3f8f..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/background.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_background_tabinfotext.9.png b/OsmAnd/res/drawable-hdpi/ic_background_tabinfotext.9.png
deleted file mode 100644
index 726f2818ff..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/ic_background_tabinfotext.9.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/poi.png b/OsmAnd/res/drawable-hdpi/poi.png
deleted file mode 100644
index c15526ca27..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/poi.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/poi_favourite.png b/OsmAnd/res/drawable-hdpi/poi_favourite.png
deleted file mode 100644
index 51ccb8f277..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/poi_favourite.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/tab_search_address_icon.png b/OsmAnd/res/drawable-hdpi/tab_search_address_icon.png
deleted file mode 100644
index 275cb91ddf..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/tab_search_address_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/tab_search_favorites_icon.png b/OsmAnd/res/drawable-hdpi/tab_search_favorites_icon.png
deleted file mode 100644
index 6c8065ded2..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/tab_search_favorites_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/tab_search_history_icon.png b/OsmAnd/res/drawable-hdpi/tab_search_history_icon.png
deleted file mode 100644
index 532b639b37..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/tab_search_history_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/tab_search_location_icon.png b/OsmAnd/res/drawable-hdpi/tab_search_location_icon.png
deleted file mode 100644
index b7ead813c6..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/tab_search_location_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/tab_search_poi_icon.png b/OsmAnd/res/drawable-hdpi/tab_search_poi_icon.png
deleted file mode 100644
index 1f5827f42b..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/tab_search_poi_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-hdpi/tab_search_transport_icon.png b/OsmAnd/res/drawable-hdpi/tab_search_transport_icon.png
deleted file mode 100644
index 120fb2b305..0000000000
Binary files a/OsmAnd/res/drawable-hdpi/tab_search_transport_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-land-hdpi/background.png b/OsmAnd/res/drawable-land-hdpi/background.png
deleted file mode 100644
index f2b9404afd..0000000000
Binary files a/OsmAnd/res/drawable-land-hdpi/background.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-land/background.png b/OsmAnd/res/drawable-land/background.png
deleted file mode 100644
index 27293c0b46..0000000000
Binary files a/OsmAnd/res/drawable-land/background.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large-land/background.png b/OsmAnd/res/drawable-large-land/background.png
deleted file mode 100644
index f2b9404afd..0000000000
Binary files a/OsmAnd/res/drawable-large-land/background.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/arrow_down.png b/OsmAnd/res/drawable-large/arrow_down.png
deleted file mode 100644
index 104b98ed02..0000000000
Binary files a/OsmAnd/res/drawable-large/arrow_down.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/arrow_up.png b/OsmAnd/res/drawable-large/arrow_up.png
deleted file mode 100644
index d69dd84fd8..0000000000
Binary files a/OsmAnd/res/drawable-large/arrow_up.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/background.png b/OsmAnd/res/drawable-large/background.png
deleted file mode 100644
index 29530e3f8f..0000000000
Binary files a/OsmAnd/res/drawable-large/background.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/button_icon_favorites.png b/OsmAnd/res/drawable-large/button_icon_favorites.png
deleted file mode 100644
index 81cd5d7395..0000000000
Binary files a/OsmAnd/res/drawable-large/button_icon_favorites.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/button_icon_map.png b/OsmAnd/res/drawable-large/button_icon_map.png
deleted file mode 100644
index b5a0b48a48..0000000000
Binary files a/OsmAnd/res/drawable-large/button_icon_map.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/button_icon_search.png b/OsmAnd/res/drawable-large/button_icon_search.png
deleted file mode 100644
index c396c82ca7..0000000000
Binary files a/OsmAnd/res/drawable-large/button_icon_search.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/button_icon_settings.png b/OsmAnd/res/drawable-large/button_icon_settings.png
deleted file mode 100644
index 5fa115f9b2..0000000000
Binary files a/OsmAnd/res/drawable-large/button_icon_settings.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/device_access_video.png b/OsmAnd/res/drawable-large/device_access_video.png
deleted file mode 100644
index 954cdb47fc..0000000000
Binary files a/OsmAnd/res/drawable-large/device_access_video.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/expandable_category_empty.png b/OsmAnd/res/drawable-large/expandable_category_empty.png
deleted file mode 100644
index 82c0a79f7d..0000000000
Binary files a/OsmAnd/res/drawable-large/expandable_category_empty.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/expandable_category_pushed.png b/OsmAnd/res/drawable-large/expandable_category_pushed.png
deleted file mode 100644
index 4a00927047..0000000000
Binary files a/OsmAnd/res/drawable-large/expandable_category_pushed.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/expandable_category_unpushed.png b/OsmAnd/res/drawable-large/expandable_category_unpushed.png
deleted file mode 100644
index a1fb25baa8..0000000000
Binary files a/OsmAnd/res/drawable-large/expandable_category_unpushed.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/headline_close_button.png b/OsmAnd/res/drawable-large/headline_close_button.png
deleted file mode 100644
index 48a31d6fe4..0000000000
Binary files a/OsmAnd/res/drawable-large/headline_close_button.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/headline_close_button__original.png b/OsmAnd/res/drawable-large/headline_close_button__original.png
deleted file mode 100644
index 92e7198cda..0000000000
Binary files a/OsmAnd/res/drawable-large/headline_close_button__original.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/headline_close_button_pressed.png b/OsmAnd/res/drawable-large/headline_close_button_pressed.png
deleted file mode 100644
index 1e6cb33735..0000000000
Binary files a/OsmAnd/res/drawable-large/headline_close_button_pressed.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/headline_close_button_pressed__original.png b/OsmAnd/res/drawable-large/headline_close_button_pressed__original.png
deleted file mode 100644
index bca7554a8c..0000000000
Binary files a/OsmAnd/res/drawable-large/headline_close_button_pressed__original.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/help_icon_pressed.png b/OsmAnd/res/drawable-large/help_icon_pressed.png
deleted file mode 100644
index aebd6fd38d..0000000000
Binary files a/OsmAnd/res/drawable-large/help_icon_pressed.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/help_icon_pressed__original.png b/OsmAnd/res/drawable-large/help_icon_pressed__original.png
deleted file mode 100644
index d3cb4baee5..0000000000
Binary files a/OsmAnd/res/drawable-large/help_icon_pressed__original.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/help_icon_simple.png b/OsmAnd/res/drawable-large/help_icon_simple.png
deleted file mode 100644
index 0345c1404a..0000000000
Binary files a/OsmAnd/res/drawable-large/help_icon_simple.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/help_icon_simple__original.png b/OsmAnd/res/drawable-large/help_icon_simple__original.png
deleted file mode 100644
index 6ab6f1e9cc..0000000000
Binary files a/OsmAnd/res/drawable-large/help_icon_simple__original.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_aircraft_dark.png b/OsmAnd/res/drawable-large/ic_action_aircraft_dark.png
deleted file mode 100644
index 772c6d4e0b..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_aircraft_dark.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_aircraft_light.png b/OsmAnd/res/drawable-large/ic_action_aircraft_light.png
deleted file mode 100644
index c0f3e91caa..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_aircraft_light.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_bicycle_dark.png b/OsmAnd/res/drawable-large/ic_action_bicycle_dark.png
deleted file mode 100644
index 0fe6f3e1aa..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_bicycle_dark.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_bicycle_light.png b/OsmAnd/res/drawable-large/ic_action_bicycle_light.png
deleted file mode 100644
index cf2b06954c..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_bicycle_light.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_car_dark.png b/OsmAnd/res/drawable-large/ic_action_car_dark.png
deleted file mode 100644
index 00b5a844e5..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_car_dark.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_car_light.png b/OsmAnd/res/drawable-large/ic_action_car_light.png
deleted file mode 100644
index 96002b3ed8..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_car_light.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_motorcycle_dark.png b/OsmAnd/res/drawable-large/ic_action_motorcycle_dark.png
deleted file mode 100644
index 0600f57d89..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_motorcycle_dark.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_motorcycle_light.png b/OsmAnd/res/drawable-large/ic_action_motorcycle_light.png
deleted file mode 100644
index ac248eecc3..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_motorcycle_light.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_pedestrian_dark.png b/OsmAnd/res/drawable-large/ic_action_pedestrian_dark.png
deleted file mode 100644
index d10b5caeca..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_pedestrian_dark.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_pedestrian_light.png b/OsmAnd/res/drawable-large/ic_action_pedestrian_light.png
deleted file mode 100644
index 22331dd027..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_pedestrian_light.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_sail_boat_dark.png b/OsmAnd/res/drawable-large/ic_action_sail_boat_dark.png
deleted file mode 100644
index 8a07f7ed88..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_sail_boat_dark.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_sail_boat_light.png b/OsmAnd/res/drawable-large/ic_action_sail_boat_light.png
deleted file mode 100644
index 266ae3b625..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_sail_boat_light.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_trekking_dark.png b/OsmAnd/res/drawable-large/ic_action_trekking_dark.png
deleted file mode 100644
index 6d037a680c..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_trekking_dark.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/ic_action_trekking_light.png b/OsmAnd/res/drawable-large/ic_action_trekking_light.png
deleted file mode 100644
index 7c2a857d0a..0000000000
Binary files a/OsmAnd/res/drawable-large/ic_action_trekking_light.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/icon.png b/OsmAnd/res/drawable-large/icon.png
deleted file mode 100644
index fce7e29d18..0000000000
Binary files a/OsmAnd/res/drawable-large/icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/icon_free.png b/OsmAnd/res/drawable-large/icon_free.png
deleted file mode 100644
index b283fe0b12..0000000000
Binary files a/OsmAnd/res/drawable-large/icon_free.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/icon_small.png b/OsmAnd/res/drawable-large/icon_small.png
deleted file mode 100644
index ace3167f0b..0000000000
Binary files a/OsmAnd/res/drawable-large/icon_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/la_backtoloc_disabled.png b/OsmAnd/res/drawable-large/la_backtoloc_disabled.png
deleted file mode 100644
index 88f5fe591e..0000000000
Binary files a/OsmAnd/res/drawable-large/la_backtoloc_disabled.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/la_backtoloc_disabled_white.png b/OsmAnd/res/drawable-large/la_backtoloc_disabled_white.png
deleted file mode 100644
index e1551c09e7..0000000000
Binary files a/OsmAnd/res/drawable-large/la_backtoloc_disabled_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/la_backtoloc_enabled.png b/OsmAnd/res/drawable-large/la_backtoloc_enabled.png
deleted file mode 100644
index 3347443c08..0000000000
Binary files a/OsmAnd/res/drawable-large/la_backtoloc_enabled.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/la_backtoloc_enabled_white.png b/OsmAnd/res/drawable-large/la_backtoloc_enabled_white.png
deleted file mode 100644
index a96327e764..0000000000
Binary files a/OsmAnd/res/drawable-large/la_backtoloc_enabled_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/la_backtoloc_tracked.png b/OsmAnd/res/drawable-large/la_backtoloc_tracked.png
deleted file mode 100644
index 94034f03a5..0000000000
Binary files a/OsmAnd/res/drawable-large/la_backtoloc_tracked.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/la_backtoloc_tracked_white.png b/OsmAnd/res/drawable-large/la_backtoloc_tracked_white.png
deleted file mode 100644
index 08810a75f5..0000000000
Binary files a/OsmAnd/res/drawable-large/la_backtoloc_tracked_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/list_destination.png b/OsmAnd/res/drawable-large/list_destination.png
deleted file mode 100644
index 9ef0d25d1f..0000000000
Binary files a/OsmAnd/res/drawable-large/list_destination.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/list_favorite.png b/OsmAnd/res/drawable-large/list_favorite.png
deleted file mode 100644
index 890f8f269d..0000000000
Binary files a/OsmAnd/res/drawable-large/list_favorite.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/list_intermediate.png b/OsmAnd/res/drawable-large/list_intermediate.png
deleted file mode 100644
index 8665634bd9..0000000000
Binary files a/OsmAnd/res/drawable-large/list_intermediate.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/list_stop.png b/OsmAnd/res/drawable-large/list_stop.png
deleted file mode 100644
index e8bcee1dc8..0000000000
Binary files a/OsmAnd/res/drawable-large/list_stop.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/list_warnings_pedestrian.png b/OsmAnd/res/drawable-large/list_warnings_pedestrian.png
deleted file mode 100644
index f497349f7e..0000000000
Binary files a/OsmAnd/res/drawable-large/list_warnings_pedestrian.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/list_warnings_pedestrian_us.png b/OsmAnd/res/drawable-large/list_warnings_pedestrian_us.png
deleted file mode 100644
index 5866f1dd9b..0000000000
Binary files a/OsmAnd/res/drawable-large/list_warnings_pedestrian_us.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/list_warnings_railways.png b/OsmAnd/res/drawable-large/list_warnings_railways.png
deleted file mode 100644
index 2bb563c121..0000000000
Binary files a/OsmAnd/res/drawable-large/list_warnings_railways.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/list_warnings_railways_us.png b/OsmAnd/res/drawable-large/list_warnings_railways_us.png
deleted file mode 100644
index 3d1efc8a62..0000000000
Binary files a/OsmAnd/res/drawable-large/list_warnings_railways_us.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/list_warnings_traffic_calming.png b/OsmAnd/res/drawable-large/list_warnings_traffic_calming.png
deleted file mode 100644
index 67bb9c9eaf..0000000000
Binary files a/OsmAnd/res/drawable-large/list_warnings_traffic_calming.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/list_warnings_traffic_calming_us.png b/OsmAnd/res/drawable-large/list_warnings_traffic_calming_us.png
deleted file mode 100644
index 8b369ea502..0000000000
Binary files a/OsmAnd/res/drawable-large/list_warnings_traffic_calming_us.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/lock_disabled.png b/OsmAnd/res/drawable-large/lock_disabled.png
deleted file mode 100644
index 21199a2483..0000000000
Binary files a/OsmAnd/res/drawable-large/lock_disabled.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/lock_disabled_white.png b/OsmAnd/res/drawable-large/lock_disabled_white.png
deleted file mode 100644
index 1a3cf28ea3..0000000000
Binary files a/OsmAnd/res/drawable-large/lock_disabled_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/lock_enabled.png b/OsmAnd/res/drawable-large/lock_enabled.png
deleted file mode 100644
index 5a212a0ff5..0000000000
Binary files a/OsmAnd/res/drawable-large/lock_enabled.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/lock_enabled_white.png b/OsmAnd/res/drawable-large/lock_enabled_white.png
deleted file mode 100644
index 38d481c47e..0000000000
Binary files a/OsmAnd/res/drawable-large/lock_enabled_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_activities_compass_white.png b/OsmAnd/res/drawable-large/map_activities_compass_white.png
deleted file mode 100644
index 320c2b50d2..0000000000
Binary files a/OsmAnd/res/drawable-large/map_activities_compass_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_cancel_o.png b/OsmAnd/res/drawable-large/map_btn_cancel_o.png
deleted file mode 100644
index ddff6ccea2..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_cancel_o.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_cancel_p.png b/OsmAnd/res/drawable-large/map_btn_cancel_p.png
deleted file mode 100644
index 7f4d171d32..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_cancel_p.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_hmenu_o.png b/OsmAnd/res/drawable-large/map_btn_hmenu_o.png
deleted file mode 100644
index 0338eee326..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_hmenu_o.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_hmenu_p.png b/OsmAnd/res/drawable-large/map_btn_hmenu_p.png
deleted file mode 100644
index d2fe88e7d1..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_hmenu_p.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_info_o.png b/OsmAnd/res/drawable-large/map_btn_info_o.png
deleted file mode 100644
index b470fbf544..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_info_o.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_info_p.png b/OsmAnd/res/drawable-large/map_btn_info_p.png
deleted file mode 100644
index 83e32a23f4..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_info_p.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_menu_o.png b/OsmAnd/res/drawable-large/map_btn_menu_o.png
deleted file mode 100644
index dca9ec1d0d..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_menu_o.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_menu_p.png b/OsmAnd/res/drawable-large/map_btn_menu_p.png
deleted file mode 100644
index 84f5222e10..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_menu_p.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_navigate_o.png b/OsmAnd/res/drawable-large/map_btn_navigate_o.png
deleted file mode 100644
index 3d5c591dfb..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_navigate_o.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_navigate_p.png b/OsmAnd/res/drawable-large/map_btn_navigate_p.png
deleted file mode 100644
index 0614f81f8d..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_navigate_p.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_ok_o.png b/OsmAnd/res/drawable-large/map_btn_ok_o.png
deleted file mode 100644
index 6daf38f82b..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_ok_o.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_ok_p.png b/OsmAnd/res/drawable-large/map_btn_ok_p.png
deleted file mode 100644
index 386683bd5f..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_ok_p.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_plain_o.png b/OsmAnd/res/drawable-large/map_btn_plain_o.png
deleted file mode 100644
index 26e933f848..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_plain_o.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_plain_p.png b/OsmAnd/res/drawable-large/map_btn_plain_p.png
deleted file mode 100644
index 657cf8d82a..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_plain_p.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_signpost_o.png b/OsmAnd/res/drawable-large/map_btn_signpost_o.png
deleted file mode 100644
index 8f0214ace6..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_signpost_o.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_btn_signpost_p.png b/OsmAnd/res/drawable-large/map_btn_signpost_p.png
deleted file mode 100644
index 5573f531f5..0000000000
Binary files a/OsmAnd/res/drawable-large/map_btn_signpost_p.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_compass.png b/OsmAnd/res/drawable-large/map_compass.png
deleted file mode 100644
index b8f95f0315..0000000000
Binary files a/OsmAnd/res/drawable-large/map_compass.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_compass_bearing.png b/OsmAnd/res/drawable-large/map_compass_bearing.png
deleted file mode 100644
index 5818cc9ea7..0000000000
Binary files a/OsmAnd/res/drawable-large/map_compass_bearing.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_compass_bearing_white.png b/OsmAnd/res/drawable-large/map_compass_bearing_white.png
deleted file mode 100644
index 5818cc9ea7..0000000000
Binary files a/OsmAnd/res/drawable-large/map_compass_bearing_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_compass_niu.png b/OsmAnd/res/drawable-large/map_compass_niu.png
deleted file mode 100644
index f8e94a3501..0000000000
Binary files a/OsmAnd/res/drawable-large/map_compass_niu.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_compass_niu_white.png b/OsmAnd/res/drawable-large/map_compass_niu_white.png
deleted file mode 100644
index 1c82ca78c4..0000000000
Binary files a/OsmAnd/res/drawable-large/map_compass_niu_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_compass_white.png b/OsmAnd/res/drawable-large/map_compass_white.png
deleted file mode 100644
index 320c2b50d2..0000000000
Binary files a/OsmAnd/res/drawable-large/map_compass_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_config.png b/OsmAnd/res/drawable-large/map_config.png
deleted file mode 100644
index f1365980d7..0000000000
Binary files a/OsmAnd/res/drawable-large/map_config.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_config_white.png b/OsmAnd/res/drawable-large/map_config_white.png
deleted file mode 100644
index d25308159e..0000000000
Binary files a/OsmAnd/res/drawable-large/map_config_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_globus.png b/OsmAnd/res/drawable-large/map_globus.png
deleted file mode 100644
index 850f27cb72..0000000000
Binary files a/OsmAnd/res/drawable-large/map_globus.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_globus_white.png b/OsmAnd/res/drawable-large/map_globus_white.png
deleted file mode 100644
index 3c00630fe5..0000000000
Binary files a/OsmAnd/res/drawable-large/map_globus_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_layers_black.png b/OsmAnd/res/drawable-large/map_layers_black.png
deleted file mode 100644
index a3ccc703e5..0000000000
Binary files a/OsmAnd/res/drawable-large/map_layers_black.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_layers_white.png b/OsmAnd/res/drawable-large/map_layers_white.png
deleted file mode 100644
index 220c4f973a..0000000000
Binary files a/OsmAnd/res/drawable-large/map_layers_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_magnifier.png b/OsmAnd/res/drawable-large/map_magnifier.png
deleted file mode 100644
index 9b509ad036..0000000000
Binary files a/OsmAnd/res/drawable-large/map_magnifier.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_monitoring.png b/OsmAnd/res/drawable-large/map_monitoring.png
deleted file mode 100644
index 37525a18fe..0000000000
Binary files a/OsmAnd/res/drawable-large/map_monitoring.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_monitoring_white.png b/OsmAnd/res/drawable-large/map_monitoring_white.png
deleted file mode 100644
index 41718507d7..0000000000
Binary files a/OsmAnd/res/drawable-large/map_monitoring_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_note_audio.png b/OsmAnd/res/drawable-large/map_note_audio.png
deleted file mode 100644
index 871ebf7635..0000000000
Binary files a/OsmAnd/res/drawable-large/map_note_audio.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_note_photo.png b/OsmAnd/res/drawable-large/map_note_photo.png
deleted file mode 100644
index e8dd083904..0000000000
Binary files a/OsmAnd/res/drawable-large/map_note_photo.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_note_video.png b/OsmAnd/res/drawable-large/map_note_video.png
deleted file mode 100644
index 6fd6304d57..0000000000
Binary files a/OsmAnd/res/drawable-large/map_note_video.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_pin_destination.png b/OsmAnd/res/drawable-large/map_pin_destination.png
deleted file mode 100644
index 0a3f498ed4..0000000000
Binary files a/OsmAnd/res/drawable-large/map_pin_destination.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_pin_origin.png b/OsmAnd/res/drawable-large/map_pin_origin.png
deleted file mode 100644
index 5d6dce52eb..0000000000
Binary files a/OsmAnd/res/drawable-large/map_pin_origin.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_zoom_in_o.png b/OsmAnd/res/drawable-large/map_zoom_in_o.png
deleted file mode 100644
index c8ec8bbb57..0000000000
Binary files a/OsmAnd/res/drawable-large/map_zoom_in_o.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_zoom_in_p.png b/OsmAnd/res/drawable-large/map_zoom_in_p.png
deleted file mode 100644
index afec60184b..0000000000
Binary files a/OsmAnd/res/drawable-large/map_zoom_in_p.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_zoom_out_o.png b/OsmAnd/res/drawable-large/map_zoom_out_o.png
deleted file mode 100644
index 4106a3ffbf..0000000000
Binary files a/OsmAnd/res/drawable-large/map_zoom_out_o.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/map_zoom_out_p.png b/OsmAnd/res/drawable-large/map_zoom_out_p.png
deleted file mode 100644
index 0d0b577002..0000000000
Binary files a/OsmAnd/res/drawable-large/map_zoom_out_p.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/mon_osmo_conn_big.png b/OsmAnd/res/drawable-large/mon_osmo_conn_big.png
deleted file mode 100644
index 071dee5e98..0000000000
Binary files a/OsmAnd/res/drawable-large/mon_osmo_conn_big.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/mon_osmo_conn_signal_big.png b/OsmAnd/res/drawable-large/mon_osmo_conn_signal_big.png
deleted file mode 100644
index bce72b4f07..0000000000
Binary files a/OsmAnd/res/drawable-large/mon_osmo_conn_signal_big.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/mon_osmo_conn_signal_small.png b/OsmAnd/res/drawable-large/mon_osmo_conn_signal_small.png
deleted file mode 100644
index a6c8f2d9ad..0000000000
Binary files a/OsmAnd/res/drawable-large/mon_osmo_conn_signal_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/mon_osmo_conn_small.png b/OsmAnd/res/drawable-large/mon_osmo_conn_small.png
deleted file mode 100644
index a479ddb442..0000000000
Binary files a/OsmAnd/res/drawable-large/mon_osmo_conn_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/mon_osmo_inactive.png b/OsmAnd/res/drawable-large/mon_osmo_inactive.png
deleted file mode 100644
index b7dbeab3ee..0000000000
Binary files a/OsmAnd/res/drawable-large/mon_osmo_inactive.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/mon_osmo_signal_inactive.png b/OsmAnd/res/drawable-large/mon_osmo_signal_inactive.png
deleted file mode 100644
index 2bdd01855d..0000000000
Binary files a/OsmAnd/res/drawable-large/mon_osmo_signal_inactive.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/monitoring_rec_big.png b/OsmAnd/res/drawable-large/monitoring_rec_big.png
deleted file mode 100644
index eeef327dde..0000000000
Binary files a/OsmAnd/res/drawable-large/monitoring_rec_big.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/monitoring_rec_inactive.png b/OsmAnd/res/drawable-large/monitoring_rec_inactive.png
deleted file mode 100644
index 0597634578..0000000000
Binary files a/OsmAnd/res/drawable-large/monitoring_rec_inactive.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/monitoring_rec_small.png b/OsmAnd/res/drawable-large/monitoring_rec_small.png
deleted file mode 100644
index eed6e8673b..0000000000
Binary files a/OsmAnd/res/drawable-large/monitoring_rec_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/pedestrian_small.png b/OsmAnd/res/drawable-large/pedestrian_small.png
deleted file mode 100644
index 27d7a70def..0000000000
Binary files a/OsmAnd/res/drawable-large/pedestrian_small.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/pedestrian_small_white.png b/OsmAnd/res/drawable-large/pedestrian_small_white.png
deleted file mode 100644
index f7a8ce9c9b..0000000000
Binary files a/OsmAnd/res/drawable-large/pedestrian_small_white.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/poi.png b/OsmAnd/res/drawable-large/poi.png
deleted file mode 100644
index c15526ca27..0000000000
Binary files a/OsmAnd/res/drawable-large/poi.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/poi_favourite.png b/OsmAnd/res/drawable-large/poi_favourite.png
deleted file mode 100644
index 51ccb8f277..0000000000
Binary files a/OsmAnd/res/drawable-large/poi_favourite.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/poi_parking_pos_limit.png b/OsmAnd/res/drawable-large/poi_parking_pos_limit.png
deleted file mode 100644
index f0be347077..0000000000
Binary files a/OsmAnd/res/drawable-large/poi_parking_pos_limit.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/poi_parking_pos_no_limit.png b/OsmAnd/res/drawable-large/poi_parking_pos_no_limit.png
deleted file mode 100644
index 31360bbaca..0000000000
Binary files a/OsmAnd/res/drawable-large/poi_parking_pos_no_limit.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/progress_blue.png b/OsmAnd/res/drawable-large/progress_blue.png
deleted file mode 100644
index 846a5a0c3d..0000000000
Binary files a/OsmAnd/res/drawable-large/progress_blue.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/progress_green.png b/OsmAnd/res/drawable-large/progress_green.png
deleted file mode 100644
index 048b1a3c5e..0000000000
Binary files a/OsmAnd/res/drawable-large/progress_green.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/progress_grey.png b/OsmAnd/res/drawable-large/progress_grey.png
deleted file mode 100644
index a4d7110880..0000000000
Binary files a/OsmAnd/res/drawable-large/progress_grey.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/progress_orange.png b/OsmAnd/res/drawable-large/progress_orange.png
deleted file mode 100644
index 9def7fc4b6..0000000000
Binary files a/OsmAnd/res/drawable-large/progress_orange.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/street_name.png b/OsmAnd/res/drawable-large/street_name.png
deleted file mode 100644
index 0c584efc9c..0000000000
Binary files a/OsmAnd/res/drawable-large/street_name.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/tab_search_address_icon.png b/OsmAnd/res/drawable-large/tab_search_address_icon.png
deleted file mode 100644
index 275cb91ddf..0000000000
Binary files a/OsmAnd/res/drawable-large/tab_search_address_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/tab_search_favorites_icon.png b/OsmAnd/res/drawable-large/tab_search_favorites_icon.png
deleted file mode 100644
index 6c8065ded2..0000000000
Binary files a/OsmAnd/res/drawable-large/tab_search_favorites_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/tab_search_history_icon.png b/OsmAnd/res/drawable-large/tab_search_history_icon.png
deleted file mode 100644
index 532b639b37..0000000000
Binary files a/OsmAnd/res/drawable-large/tab_search_history_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/tab_search_location_icon.png b/OsmAnd/res/drawable-large/tab_search_location_icon.png
deleted file mode 100644
index b7ead813c6..0000000000
Binary files a/OsmAnd/res/drawable-large/tab_search_location_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/tab_search_poi_icon.png b/OsmAnd/res/drawable-large/tab_search_poi_icon.png
deleted file mode 100644
index 1f5827f42b..0000000000
Binary files a/OsmAnd/res/drawable-large/tab_search_poi_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/tab_search_transport_icon.png b/OsmAnd/res/drawable-large/tab_search_transport_icon.png
deleted file mode 100644
index 120fb2b305..0000000000
Binary files a/OsmAnd/res/drawable-large/tab_search_transport_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/tab_settings_screen_icon.png b/OsmAnd/res/drawable-large/tab_settings_screen_icon.png
deleted file mode 100644
index 6ab9ec80ce..0000000000
Binary files a/OsmAnd/res/drawable-large/tab_settings_screen_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/warnings_limit.png b/OsmAnd/res/drawable-large/warnings_limit.png
new file mode 100755
index 0000000000..c8db2c42f6
Binary files /dev/null and b/OsmAnd/res/drawable-large/warnings_limit.png differ
diff --git a/OsmAnd/res/drawable-large/widget_altitude.png b/OsmAnd/res/drawable-large/widget_altitude.png
index b0d4d2bb7b..43a9f8b8e6 100644
Binary files a/OsmAnd/res/drawable-large/widget_altitude.png and b/OsmAnd/res/drawable-large/widget_altitude.png differ
diff --git a/OsmAnd/res/drawable-large/widget_backtolocation.png b/OsmAnd/res/drawable-large/widget_backtolocation.png
deleted file mode 100644
index 9cab2f11b6..0000000000
Binary files a/OsmAnd/res/drawable-large/widget_backtolocation.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/widget_backtolocation_dark.png b/OsmAnd/res/drawable-large/widget_backtolocation_dark.png
new file mode 100644
index 0000000000..139e0958cd
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_backtolocation_dark.png differ
diff --git a/OsmAnd/res/drawable-large/widget_backtolocation_light.png b/OsmAnd/res/drawable-large/widget_backtolocation_light.png
new file mode 100644
index 0000000000..b28f78152c
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_backtolocation_light.png differ
diff --git a/OsmAnd/res/drawable-large/widget_compass.png b/OsmAnd/res/drawable-large/widget_compass.png
deleted file mode 100644
index facee08b84..0000000000
Binary files a/OsmAnd/res/drawable-large/widget_compass.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/widget_compass_dark.png b/OsmAnd/res/drawable-large/widget_compass_dark.png
new file mode 100644
index 0000000000..ebd82b8f00
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_compass_dark.png differ
diff --git a/OsmAnd/res/drawable-large/widget_compass_light.png b/OsmAnd/res/drawable-large/widget_compass_light.png
new file mode 100644
index 0000000000..7ec3a4f6f4
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_compass_light.png differ
diff --git a/OsmAnd/res/drawable-large/widget_config.png b/OsmAnd/res/drawable-large/widget_config.png
deleted file mode 100644
index c3454226ad..0000000000
Binary files a/OsmAnd/res/drawable-large/widget_config.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/widget_config_dark.png b/OsmAnd/res/drawable-large/widget_config_dark.png
new file mode 100644
index 0000000000..2ffe46589b
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_config_dark.png differ
diff --git a/OsmAnd/res/drawable-large/widget_config_light.png b/OsmAnd/res/drawable-large/widget_config_light.png
new file mode 100644
index 0000000000..5ca33b93d5
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_config_light.png differ
diff --git a/OsmAnd/res/drawable-large/widget_distance.png b/OsmAnd/res/drawable-large/widget_distance.png
index 1d75582902..39f6d1fdbb 100644
Binary files a/OsmAnd/res/drawable-large/widget_distance.png and b/OsmAnd/res/drawable-large/widget_distance.png differ
diff --git a/OsmAnd/res/drawable-large/widget_gps_info.png b/OsmAnd/res/drawable-large/widget_gps_info.png
index 1896388355..d1a0d21a8e 100644
Binary files a/OsmAnd/res/drawable-large/widget_gps_info.png and b/OsmAnd/res/drawable-large/widget_gps_info.png differ
diff --git a/OsmAnd/res/drawable-large/widget_layer.png b/OsmAnd/res/drawable-large/widget_layer.png
deleted file mode 100644
index d48dc73192..0000000000
Binary files a/OsmAnd/res/drawable-large/widget_layer.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/widget_layer_dark.png b/OsmAnd/res/drawable-large/widget_layer_dark.png
new file mode 100644
index 0000000000..5e29dd1fec
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_layer_dark.png differ
diff --git a/OsmAnd/res/drawable-large/widget_layer_light.png b/OsmAnd/res/drawable-large/widget_layer_light.png
new file mode 100644
index 0000000000..10a8e313ef
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_layer_light.png differ
diff --git a/OsmAnd/res/drawable-large/widget_lock_screen_dark.png b/OsmAnd/res/drawable-large/widget_lock_screen_dark.png
new file mode 100644
index 0000000000..a84f9a265a
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_lock_screen_dark.png differ
diff --git a/OsmAnd/res/drawable-large/widget_lock_screen_light.png b/OsmAnd/res/drawable-large/widget_lock_screen_light.png
new file mode 100644
index 0000000000..9b022d1453
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_lock_screen_light.png differ
diff --git a/OsmAnd/res/drawable-large/widget_reset_to_default.png b/OsmAnd/res/drawable-large/widget_reset_to_default.png
deleted file mode 100644
index df525fe5f7..0000000000
Binary files a/OsmAnd/res/drawable-large/widget_reset_to_default.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-large/widget_reset_to_default_dark.png b/OsmAnd/res/drawable-large/widget_reset_to_default_dark.png
new file mode 100644
index 0000000000..5061627c67
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_reset_to_default_dark.png differ
diff --git a/OsmAnd/res/drawable-large/widget_reset_to_default_light.png b/OsmAnd/res/drawable-large/widget_reset_to_default_light.png
new file mode 100644
index 0000000000..0974d04dc0
Binary files /dev/null and b/OsmAnd/res/drawable-large/widget_reset_to_default_light.png differ
diff --git a/OsmAnd/res/drawable-large/widget_speed.png b/OsmAnd/res/drawable-large/widget_speed.png
index f11c174b12..3d5efa1f9f 100644
Binary files a/OsmAnd/res/drawable-large/widget_speed.png and b/OsmAnd/res/drawable-large/widget_speed.png differ
diff --git a/OsmAnd/res/drawable-large/widget_target.png b/OsmAnd/res/drawable-large/widget_target.png
index 88a2a44be3..85b4f0212c 100644
Binary files a/OsmAnd/res/drawable-large/widget_target.png and b/OsmAnd/res/drawable-large/widget_target.png differ
diff --git a/OsmAnd/res/drawable-large/widget_time.png b/OsmAnd/res/drawable-large/widget_time.png
index e823a1be5c..7fe237faa1 100644
Binary files a/OsmAnd/res/drawable-large/widget_time.png and b/OsmAnd/res/drawable-large/widget_time.png differ
diff --git a/OsmAnd/res/drawable-large/widget_time_to_distance.png b/OsmAnd/res/drawable-large/widget_time_to_distance.png
index b70b8e468d..dd73ddcb00 100644
Binary files a/OsmAnd/res/drawable-large/widget_time_to_distance.png and b/OsmAnd/res/drawable-large/widget_time_to_distance.png differ
diff --git a/OsmAnd/res/drawable-mdpi/background.png b/OsmAnd/res/drawable-mdpi/background.png
deleted file mode 100644
index dd86341f69..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/background.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/closed_poi.png b/OsmAnd/res/drawable-mdpi/closed_poi.png
deleted file mode 100644
index e1819ca1c1..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/closed_poi.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/opened_poi.png b/OsmAnd/res/drawable-mdpi/opened_poi.png
deleted file mode 100644
index 75a7000231..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/opened_poi.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/poi.png b/OsmAnd/res/drawable-mdpi/poi.png
deleted file mode 100644
index c15526ca27..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/poi.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/tab_search_address_icon.png b/OsmAnd/res/drawable-mdpi/tab_search_address_icon.png
deleted file mode 100644
index 1f1cf444e5..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/tab_search_address_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/tab_search_favorites_icon.png b/OsmAnd/res/drawable-mdpi/tab_search_favorites_icon.png
deleted file mode 100644
index 90dde229a5..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/tab_search_favorites_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/tab_search_history_icon.png b/OsmAnd/res/drawable-mdpi/tab_search_history_icon.png
deleted file mode 100644
index c183e6cfd5..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/tab_search_history_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/tab_search_location_icon.png b/OsmAnd/res/drawable-mdpi/tab_search_location_icon.png
deleted file mode 100644
index 0d2de97f95..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/tab_search_location_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/tab_search_poi_icon.png b/OsmAnd/res/drawable-mdpi/tab_search_poi_icon.png
deleted file mode 100644
index 0cb37439bd..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/tab_search_poi_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-mdpi/tab_search_transport_icon.png b/OsmAnd/res/drawable-mdpi/tab_search_transport_icon.png
deleted file mode 100644
index a5617544d1..0000000000
Binary files a/OsmAnd/res/drawable-mdpi/tab_search_transport_icon.png and /dev/null differ
diff --git a/OsmAnd/res/drawable/btn_flat_trans.xml b/OsmAnd/res/drawable/btn_flat_transparent.xml
similarity index 89%
rename from OsmAnd/res/drawable/btn_flat_trans.xml
rename to OsmAnd/res/drawable/btn_flat_transparent.xml
index 331c6c033c..57c4324b76 100644
--- a/OsmAnd/res/drawable/btn_flat_trans.xml
+++ b/OsmAnd/res/drawable/btn_flat_transparent.xml
@@ -6,7 +6,6 @@
-
-
diff --git a/OsmAnd/res/drawable/btn_round_transparent.xml b/OsmAnd/res/drawable/btn_round_transparent.xml
new file mode 100644
index 0000000000..bfb9838ad4
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_round_transparent.xml
@@ -0,0 +1,14 @@
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout-land/menu.xml b/OsmAnd/res/layout-land/menu.xml
deleted file mode 100644
index 65d0fe9733..0000000000
--- a/OsmAnd/res/layout-land/menu.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OsmAnd/res/layout-large-land/dashboard.xml b/OsmAnd/res/layout-large-land/dashboard.xml
deleted file mode 100644
index 56a81a94ab..0000000000
--- a/OsmAnd/res/layout-large-land/dashboard.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OsmAnd/res/layout-large-land/menu.xml b/OsmAnd/res/layout-large-land/menu.xml
deleted file mode 100644
index 1566da1546..0000000000
--- a/OsmAnd/res/layout-large-land/menu.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OsmAnd/res/layout-large/menu.xml b/OsmAnd/res/layout-large/menu.xml
deleted file mode 100644
index 222830cc4d..0000000000
--- a/OsmAnd/res/layout-large/menu.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OsmAnd/res/layout/dash_map_fragment.xml b/OsmAnd/res/layout/dash_map_fragment.xml
deleted file mode 100644
index eb1178ef17..0000000000
--- a/OsmAnd/res/layout/dash_map_fragment.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OsmAnd/res/layout/dash_search_fragment.xml b/OsmAnd/res/layout/dash_search_fragment.xml
index 10f86ccd42..1fafca7c3f 100644
--- a/OsmAnd/res/layout/dash_search_fragment.xml
+++ b/OsmAnd/res/layout/dash_search_fragment.xml
@@ -1,15 +1,15 @@
-
+ android:orientation="vertical" >
+ android:layout_height="@dimen/dashHeaderHeight" >
-
+ android:text="@string/shared_string_history"
+ osmand:textAllCapsCompat="true"
+ osmand:typeface="@string/font_roboto_medium" />
+ android:background="?attr/dashboard_divider" />
+ android:orientation="horizontal" >
+ android:background="?attr/dashboard_divider" />
+ android:background="?attr/dashboard_divider" />
diff --git a/OsmAnd/res/layout/map_hud_widget.xml b/OsmAnd/res/layout/map_hud_widget.xml
index 61f71fefe6..7497e20b4e 100644
--- a/OsmAnd/res/layout/map_hud_widget.xml
+++ b/OsmAnd/res/layout/map_hud_widget.xml
@@ -1,19 +1,33 @@
+ android:minWidth="100dp"
+ android:orientation="vertical" >
-
+
+
+
+
+
+ android:gravity="center"
+ android:src="@drawable/ic_action_remove_light" />
-
+
+
+ android:text="km"
+ android:textColor="@color/color_black"
+ android:textSize="@dimen/map_widget_text_size_small" />
\ No newline at end of file
diff --git a/OsmAnd/res/layout/menu.xml b/OsmAnd/res/layout/menu.xml
deleted file mode 100644
index 36d3f9f8ee..0000000000
--- a/OsmAnd/res/layout/menu.xml
+++ /dev/null
@@ -1,244 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java b/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java
index dd698f23ed..4b675097bf 100644
--- a/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/EditPOIFilterActivity.java
@@ -72,7 +72,7 @@ public class EditPOIFilterActivity extends OsmandListActivity {
setContentView(R.layout.editing_poi_filter);
getSupportActionBar().setTitle(R.string.filterpoi_activity);
- getSupportActionBar().setIcon(R.drawable.tab_search_poi_icon);
+// getSupportActionBar().setIcon(R.drawable.tab_search_poi_icon);
if (filter != null) {
getSupportActionBar().setSubtitle(filter.getName());
diff --git a/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java b/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java
index 7073665962..f6265c8202 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java
@@ -51,35 +51,6 @@ public class MainMenuActivity extends BaseDownloadActivity implements OsmAndLoca
private Drawable actionBarBackground;
- private NotifyingScrollView.OnScrollChangedListener onScrollChangedListener = new NotifyingScrollView.OnScrollChangedListener() {
- public void onScrollChanged(ScrollView who, int l, int t, int oldl, int oldt) {
- //making background of actionbar transparent with scroll
- final int imageHeight = findViewById(R.id.map_image).getMeasuredHeight();
- final int headerHeight = imageHeight - getSupportActionBar().getHeight();
- final float ratio = (float) Math.min(Math.max(t, 0), headerHeight) / headerHeight;
- final int newAlpha = (int) (ratio * 255);
- int margintop = -(int)(ratio * 60);
- Resources r = getResources();
- int px = (int) TypedValue.applyDimension(
- TypedValue.COMPLEX_UNIT_DIP,
- margintop,
- r.getDisplayMetrics());
- int margin = px + defaultMargin;
- if (headerHeight >= t - margin){
- //makes other cards to move on top of the map card to make it look like android animations
- View fragments = findViewById(R.id.fragments);
- LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
-
- params.setMargins(0, margin, 0, 0);
- fragments.setLayoutParams(params);
- }
- if (newAlpha > START_ALPHA) {
- actionBarBackground.setAlpha(newAlpha);
- }
-
- }
- };
-
private Drawable.Callback mDrawableCallback = new Drawable.Callback() {
@Override
public void invalidateDrawable(Drawable who) {
@@ -133,7 +104,7 @@ public class MainMenuActivity extends BaseDownloadActivity implements OsmAndLoca
actionBarBackground = new ColorDrawable(Color.argb(180, 0, 0, 0));
actionBarBackground.setAlpha(START_ALPHA);
actionBar.setBackgroundDrawable(actionBarBackground);
- ((NotifyingScrollView)findViewById(R.id.main_scroll)).setOnScrollChangedListener(onScrollChangedListener);
+// ((NotifyingScrollView)findViewById(R.id.main_scroll)).setOnScrollChangedListener(onScrollChangedListener);
//setting up callback for drawable on actionbar for old android
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
actionBarBackground.setCallback(mDrawableCallback);
diff --git a/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java b/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java
index b02813d387..0d8bd57e91 100644
--- a/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java
+++ b/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java
@@ -14,7 +14,6 @@ import net.osmand.plus.helpers.ScreenOrientationHelper;
import net.osmand.util.MapUtils;
import android.app.Dialog;
import android.content.Intent;
-import android.content.pm.ActivityInfo;
import android.location.Location;
import android.os.Bundle;
import android.support.v4.app.Fragment;
@@ -110,9 +109,7 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
@Override
public void onCreateOptionsMenu(Menu onCreate, MenuInflater inflater) {
OsmandApplication app = (OsmandApplication) getActivity().getApplication();
- int orientation = ScreenOrientationHelper.getScreenOrientation(getActivity());
- boolean portrait = orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ||
- orientation == ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
+ boolean portrait = ScreenOrientationHelper.isOrientationPortrait(getActivity());
boolean light = app.getSettings().isLightActionBar();
Menu menu = onCreate;
if(getActivity() instanceof SearchActivity) {
diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java
index 89b6783775..763ea34fb3 100644
--- a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java
+++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java
@@ -83,9 +83,7 @@ public class SearchAddressFragment extends Fragment {
@Override
public void onCreateOptionsMenu(Menu onCreate, MenuInflater inflater) {
Menu menu = onCreate;
- int orientation = ScreenOrientationHelper.getScreenOrientation(getActivity());
- boolean portrait = orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ||
- orientation == ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
+ boolean portrait = ScreenOrientationHelper.isOrientationPortrait(getActivity());
if(getActivity() instanceof SearchActivity) {
if (portrait) {
menu = ((SearchActivity) getActivity()).getClearToolbar(true).getMenu();
diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java
index 8e4998561e..48572e3829 100644
--- a/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java
@@ -80,14 +80,6 @@ public abstract class SearchByNameAbstractActivity extends OsmandListActivity
private static final int ADD_TO_FAVORITE = 6;
- protected void setActionBarSettings() {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
- separateMethod();
- }
- getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
- getSupportActionBar().setIcon(R.drawable.tab_search_address_icon);
- }
-
private void separateMethod() {
getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java
index 59070bca5b..e9caa9c134 100644
--- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java
@@ -3,16 +3,52 @@
*/
package net.osmand.plus.activities.search;
+import gnu.trove.set.hash.TLongHashSet;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import net.osmand.ResultMatcher;
+import net.osmand.access.AccessibleToast;
+import net.osmand.access.NavigationInfo;
+import net.osmand.data.Amenity;
+import net.osmand.data.LatLon;
+import net.osmand.data.PointDescription;
+import net.osmand.osm.PoiCategory;
+import net.osmand.osm.PoiType;
+import net.osmand.plus.OsmAndConstants;
+import net.osmand.plus.OsmAndFormatter;
+import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
+import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
+import net.osmand.plus.OsmandApplication;
+import net.osmand.plus.OsmandSettings;
+import net.osmand.plus.R;
+import net.osmand.plus.activities.EditPOIFilterActivity;
+import net.osmand.plus.activities.MapActivity;
+import net.osmand.plus.activities.OsmandListActivity;
+import net.osmand.plus.dashboard.DashLocationFragment;
+import net.osmand.plus.dialogs.DirectionsDialogs;
+import net.osmand.plus.poi.NameFinderPoiFilter;
+import net.osmand.plus.poi.PoiLegacyFilter;
+import net.osmand.plus.poi.SearchByNameFilter;
+import net.osmand.plus.render.RenderingIcons;
+import net.osmand.plus.views.DirectionDrawable;
+import net.osmand.util.Algorithms;
+import net.osmand.util.MapUtils;
+import net.osmand.util.OpeningHoursParser;
+import net.osmand.util.OpeningHoursParser.OpeningHours;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
-import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
-import android.hardware.Sensor;
-import android.hardware.SensorManager;
import android.os.AsyncTask;
import android.os.AsyncTask.Status;
import android.os.Bundle;
@@ -44,47 +80,6 @@ import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
-import net.osmand.ResultMatcher;
-import net.osmand.access.AccessibleToast;
-import net.osmand.access.NavigationInfo;
-import net.osmand.data.Amenity;
-import net.osmand.data.LatLon;
-import net.osmand.data.PointDescription;
-import net.osmand.osm.PoiCategory;
-import net.osmand.osm.PoiType;
-import net.osmand.plus.OsmAndConstants;
-import net.osmand.plus.OsmAndFormatter;
-import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
-import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
-import net.osmand.plus.OsmandApplication;
-import net.osmand.plus.OsmandSettings;
-import net.osmand.plus.R;
-import net.osmand.plus.activities.EditPOIFilterActivity;
-import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.activities.OsmandListActivity;
-import net.osmand.plus.dialogs.DirectionsDialogs;
-import net.osmand.plus.poi.NameFinderPoiFilter;
-import net.osmand.plus.poi.PoiLegacyFilter;
-import net.osmand.plus.poi.SearchByNameFilter;
-import net.osmand.plus.render.RenderingIcons;
-import net.osmand.plus.views.DirectionDrawable;
-import net.osmand.util.Algorithms;
-import net.osmand.util.MapUtils;
-import net.osmand.util.OpeningHoursParser;
-import net.osmand.util.OpeningHoursParser.OpeningHours;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import gnu.trove.set.hash.TLongHashSet;
-
-
/**
* Search poi activity
*/
@@ -109,17 +104,17 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
private AmenityAdapter amenityAdapter;
private EditText searchFilter;
private View searchFilterLayout;
-
+
private boolean searchNearBy = false;
- private net.osmand.Location location = null;
+ private net.osmand.Location location = null;
private Float heading = null;
-
+
private Handler uiHandler;
private OsmandSettings settings;
private float width = 24;
private float height = 24;
-
+
// never null represents current running task or last finished
private SearchAmenityTask currentSearchTask = new SearchAmenityTask(null);
private OsmandApplication app;
@@ -127,14 +122,13 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
private MenuItem showOnMapItem;
private MenuItem searchPOILevel;
private Button searchFooterButton;
-
+
@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu = getClearToolbar(true).getMenu();
boolean light = getMyApplication().getSettings().isLightActionBar();
searchPOILevel = menu.add(0, SEARCH_MORE, 0, R.string.search_POI_level_btn);
- MenuItemCompat.setShowAsAction(searchPOILevel,
- MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
+ MenuItemCompat.setShowAsAction(searchPOILevel, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
searchPOILevel.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@@ -144,18 +138,18 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
});
updateSearchPoiTextButton(false);
-
+
showFilterItem = menu.add(0, FILTER, 0, R.string.search_poi_filter);
- MenuItemCompat.setShowAsAction(showFilterItem,
- MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
- showFilterItem = showFilterItem.setIcon(getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_filter_dark));
+ MenuItemCompat.setShowAsAction(showFilterItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
+ showFilterItem = showFilterItem.setIcon(getMyApplication().getIconsCache().getContentIcon(
+ R.drawable.ic_action_filter_dark));
showFilterItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
- if(isSearchByNameFilter()){
+ if (isSearchByNameFilter()) {
Intent newIntent = new Intent(SearchPOIActivity.this, EditPOIFilterActivity.class);
newIntent.putExtra(EditPOIFilterActivity.AMENITY_FILTER, PoiLegacyFilter.CUSTOM_FILTER_ID);
- if(location != null) {
+ if (location != null) {
newIntent.putExtra(EditPOIFilterActivity.SEARCH_LAT, location.getLatitude());
newIntent.putExtra(EditPOIFilterActivity.SEARCH_LON, location.getLongitude());
}
@@ -172,14 +166,12 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
});
updateShowFilterItem();
- if(isSearchByNameFilter() || isNameFinderFilter()) {
+ if (isSearchByNameFilter() || isNameFinderFilter()) {
showFilterItem.setVisible(false);
}
-
showOnMapItem = menu.add(0, SHOW_ON_MAP, 0, R.string.shared_string_show_on_map);
- MenuItemCompat.setShowAsAction(showOnMapItem,
- MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
+ MenuItemCompat.setShowAsAction(showOnMapItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
showOnMapItem = showOnMapItem.setIcon(R.drawable.ic_action_map_marker_dark);
showOnMapItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@@ -204,14 +196,15 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
final Toolbar tb = (Toolbar) findViewById(R.id.bottomControls);
tb.setTitle(null);
tb.getMenu().clear();
- tb.setVisibility(visible? View.VISIBLE : View.GONE);
+ tb.setVisibility(visible ? View.VISIBLE : View.GONE);
return tb;
}
-
+
private boolean searchMore() {
String query = searchFilter.getText().toString().trim();
if (query.length() < 2 && (isNameFinderFilter() || isSearchByNameFilter())) {
- AccessibleToast.makeText(SearchPOIActivity.this, R.string.poi_namefinder_query_empty, Toast.LENGTH_LONG).show();
+ AccessibleToast.makeText(SearchPOIActivity.this, R.string.poi_namefinder_query_empty, Toast.LENGTH_LONG)
+ .show();
return true;
}
if (isNameFinderFilter() && !Algorithms.objectEquals(((NameFinderPoiFilter) filter).getQuery(), query)) {
@@ -230,31 +223,30 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
return true;
}
-
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.searchpoi);
-
+
getSupportActionBar().setTitle(R.string.searchpoi_activity);
- getSupportActionBar().setIcon(R.drawable.tab_search_poi_icon);
+ // getSupportActionBar().setIcon(R.drawable.tab_search_poi_icon);
setSupportProgressBarIndeterminateVisibility(false);
-
- app = (OsmandApplication)getApplication();
-
+
+ app = (OsmandApplication) getApplication();
+
uiHandler = new Handler();
searchFilter = (EditText) findViewById(R.id.SearchFilter);
searchFilterLayout = findViewById(R.id.SearchFilterLayout);
settings = ((OsmandApplication) getApplication()).getSettings();
-
- searchFilter.addTextChangedListener(new TextWatcher(){
+
+ searchFilter.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable s) {
- if(!isNameFinderFilter() && !isSearchByNameFilter()){
+ if (!isNameFinderFilter() && !isSearchByNameFilter()) {
amenityAdapter.getFilter().filter(s);
} else {
- if(searchPOILevel != null) {
+ if (searchPOILevel != null) {
searchPOILevel.setEnabled(true);
searchPOILevel.setTitle(R.string.search_button);
}
@@ -263,6 +255,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
// Cancel current search request here?
}
}
+
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@@ -294,7 +287,8 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
private void addFooterView() {
final FrameLayout ll = new FrameLayout(this);
- android.widget.FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
+ android.widget.FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.WRAP_CONTENT);
lp.gravity = Gravity.CENTER_HORIZONTAL;
searchFooterButton = new Button(this);
searchFooterButton.setText(R.string.search_POI_level_btn);
@@ -306,15 +300,15 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
});
searchFooterButton.setLayoutParams(lp);
ll.addView(searchFooterButton);
-
+
getListView().addFooterView(ll);
}
-
+
@Override
protected void onResume() {
super.onResume();
Bundle bundle = this.getIntent().getExtras();
- if(bundle.containsKey(SEARCH_LAT) && bundle.containsKey(SEARCH_LON)){
+ if (bundle.containsKey(SEARCH_LAT) && bundle.containsKey(SEARCH_LON)) {
location = new net.osmand.Location("internal"); //$NON-NLS-1$
location.setLatitude(bundle.getDouble(SEARCH_LAT));
location.setLongitude(bundle.getDouble(SEARCH_LON));
@@ -323,8 +317,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
location = null;
searchNearBy = true;
}
-
-
+
String filterId = bundle.getString(AMENITY_FILTER);
PoiLegacyFilter filter = app.getPoiFilters().getFilterById(filterId);
if (filter != this.filter) {
@@ -337,11 +330,10 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
// run query again
clearSearchQuery();
}
- if(filter != null) {
+ if (filter != null) {
filter.clearNameFilter();
}
-
-
+
updateSubtitle();
updateSearchPoiTextButton(false);
updateShowFilterItem();
@@ -353,68 +345,71 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
updateLocation(location);
}
- if(isNameFinderFilter()){
+ if (isNameFinderFilter()) {
searchFilterLayout.setVisibility(View.VISIBLE);
- } else if(isSearchByNameFilter() ){
+ } else if (isSearchByNameFilter()) {
searchFilterLayout.setVisibility(View.VISIBLE);
}
- //Freeze the direction arrows (reference is constant north) when Accessibility mode = ON, so screen can be read aloud without continuous updates
- if(!app.accessibilityEnabled()) {
+ // Freeze the direction arrows (reference is constant north) when Accessibility mode = ON, so screen can be read
+ // aloud without continuous updates
+ if (!app.accessibilityEnabled()) {
app.getLocationProvider().addCompassListener(this);
app.getLocationProvider().registerOrUnregisterCompassListener(true);
}
searchFilter.requestFocus();
}
-
private void updateShowFilterItem() {
- if(showFilterItem != null) {
+ if (showFilterItem != null) {
showFilterItem.setVisible(filter != null);
}
}
private void updateSubtitle() {
- if(filter != null) {
+ if (filter != null) {
getSupportActionBar().setSubtitle(filter.getName() + " " + filter.getSearchArea());
}
}
-
- private void showPoiCategoriesByNameFilter(String query, net.osmand.Location loc){
+
+ private void showPoiCategoriesByNameFilter(String query, net.osmand.Location loc) {
OsmandApplication app = (OsmandApplication) getApplication();
- if(loc != null){
- Map> map = app.getResourceManager().searchAmenityCategoriesByName(query, loc.getLatitude(), loc.getLongitude());
- if(!map.isEmpty()){
- PoiLegacyFilter filter = ((OsmandApplication)getApplication()).getPoiFilters().getFilterById(PoiLegacyFilter.CUSTOM_FILTER_ID);
- if(filter != null){
+ if (loc != null) {
+ Map> map = app.getResourceManager().searchAmenityCategoriesByName(query,
+ loc.getLatitude(), loc.getLongitude());
+ if (!map.isEmpty()) {
+ PoiLegacyFilter filter = ((OsmandApplication) getApplication()).getPoiFilters().getFilterById(
+ PoiLegacyFilter.CUSTOM_FILTER_ID);
+ if (filter != null) {
showFilterItem.setVisible(true);
filter.setMapToAccept(map);
}
-
+
String s = typesToString(map);
- AccessibleToast.makeText(this, getString(R.string.poi_query_by_name_matches_categories) + s, Toast.LENGTH_LONG).show();
+ AccessibleToast.makeText(this, getString(R.string.poi_query_by_name_matches_categories) + s,
+ Toast.LENGTH_LONG).show();
}
}
}
-
+
private String typesToString(Map> map) {
StringBuilder b = new StringBuilder();
int count = 0;
Iterator>> iterator = map.entrySet().iterator();
- while(iterator.hasNext() && count < 4){
+ while (iterator.hasNext() && count < 4) {
Entry> e = iterator.next();
b.append("\n").append(e.getKey().getTranslation()).append(" - ");
- if(e.getValue() == null){
+ if (e.getValue() == null) {
b.append("...");
} else {
- for(int j=0; j 0){
+ for (int j = 0; j < e.getValue().size() && j < 3; j++) {
+ if (j > 0) {
b.append(", ");
}
b.append(e.getValue().get(j));
}
}
}
- if(iterator.hasNext()){
+ if (iterator.hasNext()) {
b.append("\n...");
}
return b.toString();
@@ -429,20 +424,23 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
enabled = false;
} else if (filter != null && !isNameFinderFilter() && !isSearchByNameFilter()) {
title = R.string.search_POI_level_btn;
- enabled = (taskAlreadyFinished || currentSearchTask.getStatus() != Status.RUNNING) && filter.isSearchFurtherAvailable();
+ enabled = (taskAlreadyFinished || currentSearchTask.getStatus() != Status.RUNNING)
+ && filter.isSearchFurtherAvailable();
} else if (filter != null) {
- // TODO: for search-by-name case, as long as filter text field is empty, we could disable the search button (with title search_button) until at least 2 characters are typed
- //title = R.string.search_button;
+ // TODO: for search-by-name case, as long as filter text field is empty, we could disable the search button
+ // (with title search_button) until at least 2 characters are typed
+ // title = R.string.search_button;
// The following is needed as it indicates that search radius can be extended in search-by-name case
title = R.string.search_POI_level_btn;
- enabled = (taskAlreadyFinished || currentSearchTask.getStatus() != Status.RUNNING) && filter.isSearchFurtherAvailable();
+ enabled = (taskAlreadyFinished || currentSearchTask.getStatus() != Status.RUNNING)
+ && filter.isSearchFurtherAvailable();
}
if (searchPOILevel != null) {
searchPOILevel.setEnabled(enabled);
searchPOILevel.setTitle(title);
}
- //if(ResourcesCompat.getResources_getBoolean(this, R.bool.abs__split_action_bar_is_narrow)) {
- if(true) {
+ // if(ResourcesCompat.getResources_getBoolean(this, R.bool.abs__split_action_bar_is_narrow)) {
+ if (true) {
searchFooterButton.setVisibility(View.GONE);
} else {
searchFooterButton.setVisibility(View.VISIBLE);
@@ -450,36 +448,31 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
searchFooterButton.setText(title);
}
}
-
-
- private net.osmand.Location getSearchedLocation(){
+
+ private net.osmand.Location getSearchedLocation() {
return currentSearchTask.getSearchedLocation();
}
-
- private synchronized void runNewSearchQuery(SearchAmenityRequest request){
- if(currentSearchTask.getStatus() == Status.FINISHED ||
- currentSearchTask.getSearchedLocation() == null){
+
+ private synchronized void runNewSearchQuery(SearchAmenityRequest request) {
+ if (currentSearchTask.getStatus() == Status.FINISHED || currentSearchTask.getSearchedLocation() == null) {
currentSearchTask = new SearchAmenityTask(request);
currentSearchTask.execute();
}
}
-
- private synchronized void clearSearchQuery(){
- if(currentSearchTask.getStatus() == Status.FINISHED ||
- currentSearchTask.getSearchedLocation() == null){
+
+ private synchronized void clearSearchQuery() {
+ if (currentSearchTask.getStatus() == Status.FINISHED || currentSearchTask.getSearchedLocation() == null) {
currentSearchTask = new SearchAmenityTask(null);
}
}
-
-
- public boolean isNameFinderFilter(){
- return filter instanceof NameFinderPoiFilter;
+
+ public boolean isNameFinderFilter() {
+ return filter instanceof NameFinderPoiFilter;
}
-
- public boolean isSearchByNameFilter(){
- return filter != null && PoiLegacyFilter.BY_NAME_FILTER_ID.equals(filter.getFilterId());
+
+ public boolean isSearchByNameFilter() {
+ return filter != null && PoiLegacyFilter.BY_NAME_FILTER_ID.equals(filter.getFilterId());
}
-
@Override
public void updateLocation(net.osmand.Location location) {
@@ -487,7 +480,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
if (location != null && filter != null) {
net.osmand.Location searchedLocation = getSearchedLocation();
if (searchedLocation == null) {
- searchedLocation = location;
+ searchedLocation = location;
if (!isNameFinderFilter() && !isSearchByNameFilter()) {
runNewSearchQuery(SearchAmenityRequest.buildRequest(location, SearchAmenityRequest.NEW_SEARCH_INIT));
}
@@ -496,11 +489,11 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
searchedLocation = location;
runNewSearchQuery(SearchAmenityRequest.buildRequest(location, SearchAmenityRequest.SEARCH_AGAIN));
handled = true;
- } else if (location.distanceTo(searchedLocation) > MIN_DISTANCE_TO_REFRESH){
+ } else if (location.distanceTo(searchedLocation) > MIN_DISTANCE_TO_REFRESH) {
handled = true;
}
} else {
- if(location != null){
+ if (location != null) {
handled = true;
}
}
@@ -516,13 +509,14 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
amenityAdapter.notifyDataSetInvalidated();
// Restore the position
getListView().setSelectionFromTop(idx, pos);
- }
-
+ }
+
}
@Override
public void updateCompassValue(float value) {
- //99 in next line used to one-time initalize arrows (with reference vs. fixed-north direction) on non-compass devices
+ // 99 in next line used to one-time initalize arrows (with reference vs. fixed-north direction) on non-compass
+ // devices
float lastHeading = heading != null ? heading : 99;
heading = value;
if (heading != null && Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
@@ -530,47 +524,49 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
} else {
heading = lastHeading;
}
- //Comment out and use lastHeading above to see if this fixes issues seen on some devices
- //if(!uiHandler.hasMessages(COMPASS_REFRESH_MSG_ID)){
- // Message msg = Message.obtain(uiHandler, new Runnable(){
- // @Override
- // public void run() {
- // amenityAdapter.notifyDataSetChanged();
- // }
- // });
- // msg.what = COMPASS_REFRESH_MSG_ID;
- // uiHandler.sendMessageDelayed(msg, 100);
- //}
+ // Comment out and use lastHeading above to see if this fixes issues seen on some devices
+ // if(!uiHandler.hasMessages(COMPASS_REFRESH_MSG_ID)){
+ // Message msg = Message.obtain(uiHandler, new Runnable(){
+ // @Override
+ // public void run() {
+ // amenityAdapter.notifyDataSetChanged();
+ // }
+ // });
+ // msg.what = COMPASS_REFRESH_MSG_ID;
+ // uiHandler.sendMessageDelayed(msg, 100);
+ // }
}
-
-
+
@Override
protected void onPause() {
super.onPause();
if (searchNearBy) {
app.getLocationProvider().pauseAllUpdates();
- if(!app.accessibilityEnabled()) {
+ if (!app.accessibilityEnabled()) {
app.getLocationProvider().removeCompassListener(this);
}
app.getLocationProvider().removeLocationListener(this);
}
}
-
-
@Override
- public void onItemClick(AdapterView> parent,final View view, int position, long id) {
+ public void onItemClick(AdapterView> parent, final View view, int position, long id) {
final Amenity amenity = ((AmenityAdapter) getListAdapter()).getItem(position);
- String poiSimpleFormat = OsmAndFormatter.getPoiSimpleFormat(amenity, getMyApplication(), settings.usingEnglishNames());
+ String poiSimpleFormat = OsmAndFormatter.getPoiSimpleFormat(amenity, getMyApplication(),
+ settings.usingEnglishNames());
PointDescription name = new PointDescription(PointDescription.POINT_TYPE_POI, poiSimpleFormat);
int z = Math.max(16, settings.getLastKnownMapZoom());
final PopupMenu optionsMenu = new PopupMenu(this, view);
- DirectionsDialogs.createDirectionsActionsPopUpMenu(optionsMenu, amenity.getLocation(), amenity, name, z, this, true);
+ DirectionsDialogs.createDirectionsActionsPopUpMenu(optionsMenu, amenity.getLocation(), amenity, name, z, this,
+ true);
final String d = OsmAndFormatter.getAmenityDescriptionContent(getMyApplication(), amenity, false);
- if(d.toString().trim().length() > 0) {
- MenuItem item = optionsMenu.getMenu().add(R.string.poi_context_menu_showdescription).
- setIcon(getMyApplication().getSettings().isLightContent() ?
- R.drawable.ic_action_note_light : R.drawable.ic_action_note_dark);
+ if (d.toString().trim().length() > 0) {
+ MenuItem item = optionsMenu
+ .getMenu()
+ .add(R.string.poi_context_menu_showdescription)
+ .setIcon(
+ getMyApplication().getSettings().isLightContent() ? R.drawable.ic_action_note_light
+ : R.drawable.ic_action_note_dark);
item.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@@ -595,7 +591,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
});
}
- if (((OsmandApplication)getApplication()).accessibilityEnabled()) {
+ if (((OsmandApplication) getApplication()).accessibilityEnabled()) {
MenuItem item = optionsMenu.getMenu().add(R.string.show_details);
item.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@@ -608,48 +604,47 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
optionsMenu.show();
}
-
static class SearchAmenityRequest {
private static final int SEARCH_AGAIN = 1;
private static final int NEW_SEARCH_INIT = 2;
private static final int SEARCH_FURTHER = 3;
private int type;
private net.osmand.Location location;
-
- public static SearchAmenityRequest buildRequest(net.osmand.Location l, int type){
+
+ public static SearchAmenityRequest buildRequest(net.osmand.Location l, int type) {
SearchAmenityRequest req = new SearchAmenityRequest();
req.type = type;
req.location = l;
return req;
-
+
}
}
-
+
class SearchAmenityTask extends AsyncTask> implements ResultMatcher {
-
+
private SearchAmenityRequest request;
private TLongHashSet existingObjects = null;
private TLongHashSet updateExisting;
-
- public SearchAmenityTask(SearchAmenityRequest request){
+
+ public SearchAmenityTask(SearchAmenityRequest request) {
this.request = request;
-
+
}
-
- net.osmand.Location getSearchedLocation(){
- return request != null ? request.location : null;
+
+ net.osmand.Location getSearchedLocation() {
+ return request != null ? request.location : null;
}
@Override
protected void onPreExecute() {
- //getSherlock().setProgressBarIndeterminateVisibility(true);
- if(searchPOILevel != null) {
+ // getSherlock().setProgressBarIndeterminateVisibility(true);
+ if (searchPOILevel != null) {
searchPOILevel.setEnabled(false);
}
searchFooterButton.setEnabled(false);
existingObjects = new TLongHashSet();
updateExisting = new TLongHashSet();
- if(request.type == SearchAmenityRequest.NEW_SEARCH_INIT){
+ if (request.type == SearchAmenityRequest.NEW_SEARCH_INIT) {
amenityAdapter.clear();
} else if (request.type == SearchAmenityRequest.SEARCH_FURTHER) {
List list = amenityAdapter.getOriginalAmenityList();
@@ -658,17 +653,19 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
}
}
- private long getAmenityId(Amenity a){
+
+ private long getAmenityId(Amenity a) {
return (a.getId() << 8) + a.getType().ordinal();
}
-
+
@Override
protected void onPostExecute(List result) {
- //getSherlock().setProgressBarIndeterminateVisibility(false);
+ // getSherlock().setProgressBarIndeterminateVisibility(false);
updateSearchPoiTextButton(true);
if (isNameFinderFilter()) {
if (!Algorithms.isEmpty(((NameFinderPoiFilter) filter).getLastError())) {
- AccessibleToast.makeText(SearchPOIActivity.this, ((NameFinderPoiFilter) filter).getLastError(), Toast.LENGTH_LONG).show();
+ AccessibleToast.makeText(SearchPOIActivity.this, ((NameFinderPoiFilter) filter).getLastError(),
+ Toast.LENGTH_LONG).show();
}
amenityAdapter.setNewModel(result, "");
showOnMapItem.setEnabled(amenityAdapter.getCount() > 0);
@@ -680,20 +677,20 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
updateSubtitle();
}
-
+
@Override
protected void onProgressUpdate(Amenity... values) {
- for(Amenity a : values){
+ for (Amenity a : values) {
amenityAdapter.add(a);
}
}
-
@Override
protected List doInBackground(Void... params) {
if (request.location != null) {
if (request.type == SearchAmenityRequest.NEW_SEARCH_INIT) {
- return filter.initializeNewSearch(request.location.getLatitude(), request.location.getLongitude(), -1, this);
+ return filter.initializeNewSearch(request.location.getLatitude(), request.location.getLongitude(),
+ -1, this);
} else if (request.type == SearchAmenityRequest.SEARCH_FURTHER) {
return filter.searchFurther(request.location.getLatitude(), request.location.getLongitude(), this);
} else if (request.type == SearchAmenityRequest.SEARCH_AGAIN) {
@@ -711,7 +708,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
if (request.type == SearchAmenityRequest.NEW_SEARCH_INIT) {
publishProgress(object);
} else if (request.type == SearchAmenityRequest.SEARCH_FURTHER) {
- if(!updateExisting.contains(id)){
+ if (!updateExisting.contains(id)) {
publishProgress(object);
}
}
@@ -719,25 +716,23 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
return false;
}
-
+
}
-
-
+
class AmenityAdapter extends ArrayAdapter {
private AmenityFilter listFilter;
private List originalAmenityList;
+
AmenityAdapter(List list) {
super(SearchPOIActivity.this, R.layout.searchpoi_list, list);
originalAmenityList = new ArrayList(list);
this.setNotifyOnChange(false);
}
-
public List getOriginalAmenityList() {
return originalAmenityList;
}
-
public void setNewModel(List amenityList, String filter) {
setNotifyOnChange(false);
originalAmenityList = new ArrayList(amenityList);
@@ -748,7 +743,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
getFilter().filter(filter);
setNotifyOnChange(true);
this.notifyDataSetChanged();
-
+
}
@Override
@@ -765,10 +760,11 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
ImageView icon = (ImageView) row.findViewById(R.id.poi_icon);
Amenity amenity = getItem(position);
net.osmand.Location loc = location;
- if(loc != null){
+ if (loc != null) {
mes = new float[2];
LatLon l = amenity.getLocation();
- net.osmand.Location.distanceBetween(l.getLatitude(), l.getLongitude(), loc.getLatitude(), loc.getLongitude(), mes);
+ net.osmand.Location.distanceBetween(l.getLatitude(), l.getLongitude(), loc.getLatitude(),
+ loc.getLongitude(), mes);
}
int opened = -1;
if (amenity.getOpeningHours() != null) {
@@ -785,50 +781,18 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
}
}
- if(loc != null){
- DirectionDrawable draw = new DirectionDrawable(SearchPOIActivity.this, width, height,
- R.drawable.ic_destination_arrow_white, R.color.color_distance);
- Float h = heading;
- float a = h != null ? h : 0;
-
- //Hardy: getRotation() is the correction if device's screen orientation != the default display's standard orientation
- int screenOrientation = 0;
- screenOrientation = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
- switch (screenOrientation)
- {
- case ORIENTATION_0: // Device default (normally portrait)
- screenOrientation = 0;
- break;
- case ORIENTATION_90: // Landscape right
- screenOrientation = 90;
- break;
- case ORIENTATION_270: // Landscape left
- screenOrientation = 270;
- break;
- case ORIENTATION_180: // Upside down
- screenOrientation = 180;
- break;
- }
-
- //Looks like screenOrientation correction must not be applied for devices without compass?
- Sensor compass = ((SensorManager) getSystemService(Context.SENSOR_SERVICE)).getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
- if (compass == null) {
- screenOrientation = 0;
- }
-
+ DirectionDrawable draw = new DirectionDrawable(SearchPOIActivity.this, width, height,
+ R.drawable.ic_destination_arrow_white, R.color.color_distance);
+ int screenOrientation = DashLocationFragment.getScreenOrientation(SearchPOIActivity.this);
+ if (loc != null) {
+ float a = heading != null ? heading : 0;
draw.setAngle(mes[1] - a + 180 + screenOrientation);
-
- draw.setOpenedColor(opened);
- direction.setImageDrawable(draw);
} else {
- if(opened == -1){
- direction.setImageResource(R.drawable.poi);
- } else if(opened == 0){
- direction.setImageResource(R.drawable.opened_poi);
- } else {
- direction.setImageResource(R.drawable.closed_poi);
- }
+ draw.setAngle(0);
}
+
+ draw.setOpenedColor(opened);
+ direction.setImageDrawable(draw);
PoiType st = amenity.getType().getPoiTypeByKeyName(amenity.getSubType());
if (st != null) {
if (RenderingIcons.containsBigIcon(st.getKeyName())) {
@@ -845,7 +809,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
String distance = " ";
- if(mes != null){
+ if (mes != null) {
distance = " " + OsmAndFormatter.getFormattedDistance((int) mes[0], getMyApplication()) + " "; //$NON-NLS-1$
}
String poiType = OsmAndFormatter.getPoiStringWithoutType(amenity, settings.usingEnglishNames());
@@ -853,7 +817,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
distanceText.setText(distance);
return (row);
}
-
+
@Override
public Filter getFilter() {
if (listFilter == null) {
@@ -861,9 +825,9 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
return listFilter;
}
-
+
private final class AmenityFilter extends Filter {
-
+
@Override
protected FilterResults performFiltering(CharSequence constraint) {
FilterResults results = new FilterResults();
@@ -872,12 +836,12 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
results.values = listToFilter;
results.count = listToFilter.size();
} else {
- String lowerCase = constraint.toString()
- .toLowerCase();
+ String lowerCase = constraint.toString().toLowerCase();
List filter = new ArrayList();
for (Amenity item : listToFilter) {
- String lower = OsmAndFormatter.getPoiStringWithoutType(item, settings.usingEnglishNames()).toLowerCase();
- if(lower.indexOf(lowerCase) != -1){
+ String lower = OsmAndFormatter.getPoiStringWithoutType(item, settings.usingEnglishNames())
+ .toLowerCase();
+ if (lower.indexOf(lowerCase) != -1) {
filter.add(item);
}
}
@@ -913,17 +877,18 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
if (direction != null)
attributes.add(direction);
String[] as = OsmAndFormatter.getAmenityDescriptionContent(getMyApplication(), amenity, false).split("\n");
- for(String s: as) {
+ for (String s : as) {
attributes.add(s.replace(':', ' '));
}
- attributes.add(getString(R.string.navigate_point_latitude) + " " + Double.toString(amenity.getLocation().getLatitude()));
- attributes.add(getString(R.string.navigate_point_longitude) + " " + Double.toString(amenity.getLocation().getLongitude()));
- b.setItems(attributes.toArray(new String[attributes.size()]),
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- }
- });
+ attributes.add(getString(R.string.navigate_point_latitude) + " "
+ + Double.toString(amenity.getLocation().getLatitude()));
+ attributes.add(getString(R.string.navigate_point_longitude) + " "
+ + Double.toString(amenity.getLocation().getLongitude()));
+ b.setItems(attributes.toArray(new String[attributes.size()]), new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ }
+ });
b.show();
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchTransportFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchTransportFragment.java
index 3bcf1d7936..4290c152ad 100644
--- a/OsmAnd/src/net/osmand/plus/activities/search/SearchTransportFragment.java
+++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchTransportFragment.java
@@ -504,9 +504,9 @@ public class SearchTransportFragment extends Fragment implements SearchActivityC
}
labelW.append("]\n").append(route.getName(settings.usingEnglishNames())); //$NON-NLS-1$
if (locationToGo != null && stop.getDistToLocation() < 400) {
- icon.setImageResource(R.drawable.opened_poi);
+// icon.setImageResource(R.drawable.opened_poi);
} else {
- icon.setImageResource(R.drawable.poi);
+// icon.setImageResource(R.drawable.poi);
}
int dist = locationToStart == null ? 0 : (int) (MapUtils.getDistance(stop.getStart().getLocation(), locationToStart));
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashMapFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashMapFragment.java
deleted file mode 100644
index 15b0077c62..0000000000
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashMapFragment.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package net.osmand.plus.dashboard;
-
-import net.osmand.data.LatLon;
-import net.osmand.data.RotatedTileBox;
-import net.osmand.map.MapTileDownloader.DownloadRequest;
-import net.osmand.map.MapTileDownloader.IMapDownloaderCallback;
-import net.osmand.plus.AppInitializer;
-import net.osmand.plus.AppInitializer.AppInitializeListener;
-import net.osmand.plus.AppInitializer.InitEvents;
-import net.osmand.plus.R;
-import net.osmand.plus.activities.MainMenuActivity;
-import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.render.MapRenderRepositories;
-import net.osmand.plus.resources.ResourceManager;
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.ColorFilter;
-import android.graphics.Paint;
-import android.graphics.drawable.Drawable;
-import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.util.DisplayMetrics;
-import android.view.Display;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.WindowManager;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-/**
- * Created by Denis on
- * 24.11.2014.
- */
-public class DashMapFragment extends DashBaseFragment implements IMapDownloaderCallback {
-
- private static final int CARD_INTERVAL_UPDATE = 60*1000;//4*60*60*1000;
-
- public static final String TAG = "DASH_MAP_FRAGMENT";
-
- private Paint paintBmp;
-
- @Override
- public void onDestroy() {
- super.onDestroy();
- getMyApplication().getResourceManager().getMapTileDownloader().removeDownloaderCallback(this);
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- getMyApplication().getResourceManager().getMapTileDownloader().addDownloaderCallback(this);
- paintBmp = new Paint();
- paintBmp.setAntiAlias(true);
- paintBmp.setFilterBitmap(true);
- paintBmp.setDither(true);
- }
-
- protected void startMapActivity() {
- MapActivity.launchMapActivityMoveToTop(getActivity());
- }
-
- @Override
- public void onOpenDash() {
- if (!getMyApplication().isApplicationInitializing()) {
- updateMapImage();
- }
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View view = getActivity().getLayoutInflater().inflate(R.layout.dash_map_fragment, container, false);
-
- view.findViewById(R.id.map_image).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- startMapActivity();
- }
- });
-
- return view;
- }
-
- private void setMapImage(final Bitmap image) {
- final View view = getView();
- if (view != null && image != null) {
- getActivity().runOnUiThread(new Runnable() {
- @Override
- public void run() {
- final ImageView mapView = (ImageView) view.findViewById(R.id.map_image);
- mapView.setImageDrawable(new Drawable(){
-
- @Override
- public void draw(Canvas canvas) {
-// int h = mapView.getHeight();
-// int w = mapView.getWidth();
- canvas.drawBitmap(image, 0, 0, paintBmp);
- }
-
- @Override
- public void setAlpha(int alpha) {
- }
-
- @Override
- public void setColorFilter(ColorFilter cf) {
- }
-
- @Override
- public int getOpacity() {
- return 0;
- }
-
- });
- }
- });
-
- }
- }
-
-
- @Override
- public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) {
- super.onViewCreated(view, savedInstanceState);
- view.findViewById(R.id.map_image).setVisibility(View.GONE);
-
- getMyApplication().checkApplicationIsBeingInitialized(getActivity(), new AppInitializeListener() {
-
- @Override
- public void onProgress(AppInitializer init, InitEvents event) {
- String tn = init.getCurrentInitTaskName();
- if(tn != null) {
- ((TextView) view.findViewById(R.id.ProgressMessage)).setText(tn);
- }
- }
-
- @Override
- public void onFinish(AppInitializer init) {
- applicationInitialized(view);
- }
- });
- }
-
- private void applicationInitialized(View view) {
- updateMapImage();
- view.findViewById(R.id.loading).setVisibility(View.GONE);
- MainMenuActivity mainMenuActivity = ((MainMenuActivity) getActivity());
- if (mainMenuActivity != null) {
- if (System.currentTimeMillis() - getMyApplication().getSettings().LAST_UPDATES_CARD_REFRESH.get()
- > CARD_INTERVAL_UPDATE && getMyApplication().getSettings().isInternetConnectionAvailable(true)) {
- getMyApplication().getSettings().LAST_UPDATES_CARD_REFRESH.set(System.currentTimeMillis());
- mainMenuActivity.updateDownloads();
- }
- view.findViewById(R.id.map_image).setVisibility(View.VISIBLE);
- }
- }
-
- @Override
- public void tileDownloaded(DownloadRequest request) {
- if (request != null && !request.error && request.fileToSave != null) {
- ResourceManager mgr = getMyApplication().getResourceManager();
- mgr.tileDownloaded(request);
- }
- setMapImage(getMyApplication().getResourceManager().getRenderer().getBitmap());
- }
-
- @SuppressWarnings("deprecation")
- private void updateMapImage() {
- MapRenderRepositories repositories = getMyApplication().getResourceManager().getRenderer();
- if(repositories.getBitmap() != null) {
- setMapImage(repositories.getBitmap());
- } else {
-
- LatLon lm = getMyApplication().getSettings().getLastKnownMapLocation();
- int zm = getMyApplication().getSettings().getLastKnownMapZoom();
-
- WindowManager wm = (WindowManager) getActivity().getSystemService(Context.WINDOW_SERVICE);
- Display display = wm.getDefaultDisplay();
- int height = display.getHeight(); // (int) getActivity().getResources().getDimension(R.dimen.dashMapHeight);
- int width = display.getWidth();
-
- WindowManager mgr = (WindowManager) getActivity().getSystemService(Context.WINDOW_SERVICE);
- DisplayMetrics dm = new DisplayMetrics();
- mgr.getDefaultDisplay().getMetrics(dm);
- RotatedTileBox currentViewport = new RotatedTileBox.RotatedTileBoxBuilder().setZoom(zm)
- .setLocation(lm.getLatitude(), lm.getLongitude()).setPixelDimensions(width, height).build();
- currentViewport.setDensity(dm.density);
- currentViewport.setMapDensity(getSettingsMapDensity(dm.density));
- repositories.loadMap(currentViewport, getMyApplication().getResourceManager().getMapTileDownloader()
- .getDownloaderCallbacks());
- }
- }
-
- public double getSettingsMapDensity(double density) {
- return (getMyApplication().getSettings().MAP_DENSITY.get()) * Math.max(1, density);
- }
-}
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java
index d86f5e4608..45e64bf811 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java
@@ -139,8 +139,8 @@ public class DashWaypointsFragment extends DashLocationFragment {
DirectionsDialogs.setupPopUpMenuIcon(optionsMenu);
MenuItem
item = optionsMenu.getMenu().add(
- R.string.shared_string_add_to_favorites).setIcon(light ?
- R.drawable.ic_action_fav_light : R.drawable.ic_action_fav_dark);
+ R.string.shared_string_add_to_favorites).setIcon(getMyApplication().getIconsCache().
+ getContentIcon(R.drawable.ic_action_fav_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@@ -158,7 +158,8 @@ public class DashWaypointsFragment extends DashLocationFragment {
if (model.index > 0 || target) {
final int ind = target ? allTargets.size() - 1 : model.index;
item = optionsMenu.getMenu().add(R.string.waypoint_visit_before)
- .setIcon(light ? R.drawable.ic_action_up_light : R.drawable.ic_action_up_dark);
+ .setIcon(getMyApplication().getIconsCache().
+ getContentIcon(R.drawable.ic_action_up_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@@ -172,7 +173,8 @@ public class DashWaypointsFragment extends DashLocationFragment {
}
if (!target) {
item = optionsMenu.getMenu().add(R.string.waypoint_visit_after)
- .setIcon(light ? R.drawable.ic_action_down_light : R.drawable.ic_action_down_dark);
+ .setIcon(getMyApplication().getIconsCache().
+ getContentIcon(R.drawable.ic_action_down_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@@ -186,8 +188,8 @@ public class DashWaypointsFragment extends DashLocationFragment {
}
}
item = optionsMenu.getMenu().add(
- R.string.shared_string_delete).setIcon(light ?
- R.drawable.ic_action_gdiscard_light: R.drawable.ic_action_gdiscard_dark);
+ R.string.shared_string_delete).setIcon(getMyApplication().getIconsCache().
+ getContentIcon(R.drawable.ic_action_delete_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
diff --git a/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java b/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java
index 12e4461c44..d0c98f6b33 100644
--- a/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java
+++ b/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java
@@ -19,18 +19,19 @@ import android.widget.TextView;
/**
*/
-public class DashSimulateFragment extends DashBaseFragment {
+public class DashSimulateFragment extends DashBaseFragment {
public static final String TAG = "DASH_SIMULATE_FRAGMENT";
-
+
@Override
public void onOpenDash() {
OsmAndLocationProvider loc = getMyApplication().getLocationProvider();
boolean routeAnimating = loc.getLocationSimulation().isRouteAnimating();
((TextView) getView().findViewById(R.id.name)).setText(routeAnimating ? R.string.animate_route_off
: R.string.animate_route);
- ((ImageButton) getView().findViewById(R.id.stop)).setImageDrawable(getActivity().getResources().getDrawable(
- !routeAnimating ? R.drawable.ic_action_play_dark : R.drawable.ic_action_rec_stop));
+ ((ImageButton) getView().findViewById(R.id.stop)).setImageDrawable(
+ !routeAnimating ? getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_play_dark)
+ : getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_rec_stop));
}
@@ -45,10 +46,10 @@ public class DashSimulateFragment extends DashBaseFragment {
tracks.addView(item);
final OsmAndLocationProvider loc = getMyApplication().getLocationProvider();
OnClickListener listener = new View.OnClickListener() {
-
+
@Override
public void onClick(View v) {
- if(getActivity() instanceof MapActivity) {
+ if (getActivity() instanceof MapActivity) {
loc.getLocationSimulation().startStopRouteAnimation((MapActivity) getActivity());
dashboard.setDashboardVisibility(false);
}
@@ -62,7 +63,4 @@ public class DashSimulateFragment extends DashBaseFragment {
return view;
}
-
-
-
}
diff --git a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java
index 58158780a5..db3d82cd62 100644
--- a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java
@@ -220,11 +220,11 @@ public class MapInfoLayer extends OsmandMapLayer {
}
ts.textShadowRadius = ts.textShadowColor == 0 ? 0 : 15;
if (transparent) {
- ts.boxTop = R.drawable.btn_flat_trans;
+ ts.boxTop = R.drawable.btn_flat_transparent;
ts.rightRes = R.drawable.btn_left_round_transparent;
ts.leftRes = R.drawable.btn_right_round_transparent;
ts.expand = R.drawable.btn_inset_circle_transparent;
- ts.boxFree = R.drawable.btn_round_trans;
+ ts.boxFree = R.drawable.btn_round_transparent;
} else if (nightMode) {
ts.boxTop = R.drawable.btn_flat_night;
ts.rightRes = R.drawable.btn_left_round_night;
diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java
index 0d94feeab5..91ce80cb69 100644
--- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java
+++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java
@@ -38,10 +38,10 @@ public class NextTurnInfoWidget extends TextInfoWidget {
turnDrawable = new TurnDrawable(activity);
if(horisontalMini) {
setImageDrawable(turnDrawable, false);
- setTopImageDrawable(null, true);
+ setTopImageDrawable(null, null);
} else {
setImageDrawable(null, false);
- setTopImageDrawable(turnDrawable, true);
+ setTopImageDrawable(turnDrawable, "");
}
}
@@ -55,7 +55,8 @@ public class NextTurnInfoWidget extends TextInfoWidget {
if(horisontalMini) {
setImageDrawable(turnDrawable, false);
} else {
- setTopImageDrawable(turnDrawable, true);
+ setTopImageDrawable(turnDrawable, turnType.getExitOut() == 0 ? "" :
+ turnType.getExitOut() + "");
}
}
}
diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java
index fed6db6269..a719b0aaad 100644
--- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java
+++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java
@@ -20,16 +20,19 @@ public class TextInfoWidget {
private TextView textView;
private TextView smallTextView;
private ImageView topImageView;
+ private TextView topTextView;
private boolean explicitlyVisible;
private OsmandApplication app;
+
public TextInfoWidget(Activity activity) {
app = (OsmandApplication) activity.getApplication();
view = activity.getLayoutInflater().inflate(R.layout.map_hud_widget, null);
topImageView = (ImageView) view.findViewById(R.id.widget_top_icon);
+ topTextView = (TextView) view.findViewById(R.id.widget_top_icon_text);
imageView = (ImageView) view.findViewById(R.id.widget_icon);
textView = (TextView) view.findViewById(R.id.widget_text);
smallTextView = (TextView) view.findViewById(R.id.widget_text_small);
@@ -58,13 +61,16 @@ public class TextInfoWidget {
imageView.invalidate();
}
- public void setTopImageDrawable(Drawable imageDrawable, boolean gone) {
+ public void setTopImageDrawable(Drawable imageDrawable, String topText) {
if(imageDrawable != null) {
topImageView.setImageDrawable(imageDrawable);
topImageView.setVisibility(View.VISIBLE);
+ topTextView.setText(topText == null ? "" : topText);
} else {
- topImageView.setVisibility(gone ? View.GONE : View.INVISIBLE);
+ topImageView.setVisibility(View.GONE );
+ topTextView.setVisibility(View.GONE );
}
+ topTextView.invalidate();
topImageView.invalidate();
}
@@ -154,6 +160,7 @@ public class TextInfoWidget {
public void updateTextColor(int textColor, int textShadowColor, boolean bold, int rad) {
updateTextColor(smallTextView, textColor, textShadowColor, bold, rad);
updateTextColor(textView, textColor, textShadowColor, bold, rad);
+ updateTextColor(topTextView, textColor, textShadowColor, bold, rad);
}
private void updateTextColor(TextView tv, int textColor, int textShadowColor, boolean textBold, int rad) {