Merge branch 'master' of ssh://github.com/osmandapp/Osmand into markers_empty_states

This commit is contained in:
PavelRatushny 2017-11-21 18:28:39 +02:00
commit ab15941917
43 changed files with 702 additions and 483 deletions

View file

@ -7,9 +7,12 @@
android:descendantFocusability="blocksDescendants"
android:orientation="vertical">
<include layout="@layout/list_item_divider"/>
<include
android:id="@+id/top_divider"
layout="@layout/list_item_divider"/>
<FrameLayout
android:id="@+id/background_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color">

View file

@ -2971,4 +2971,11 @@
<string name="shared_string_left">Налева</string>
<string name="shared_string_more_without_dots">Больш</string>
<string name="looking_for_tracks_with_waypoints">Пошук слядоў з шляхавымі кропкамі</string>
<string name="empty_state_osm_edits">Стварыць або зьмяніць OSM аб’екты</string>
<string name="shared_string_deleted">Выдалены</string>
<string name="shared_string_edited">Адрэдагаваны</string>
<string name="marker_activated">Маркер %s актываваны.</string>
<string name="notes_by_date">Нататкі па даце</string>
<string name="by_date">Па даце</string>
<string name="by_type">Па тыпу</string>
</resources>

View file

@ -2724,4 +2724,6 @@ Abasta l\'àrea: %1$s x %2$s</string>
<string name="active_markers_descr">Trieu quants indicadors de direcció es mostren.</string>
<string name="shared_string_more_without_dots">Més</string>
<string name="looking_for_tracks_with_waypoints">Recerca de traces amb fites</string>
<string name="empty_state_osm_edits">Crea o modifica objectes OSM</string>
<string name="empty_state_osm_edits_descr">Crea o modifica PDIs OSM, inicia o comenta Notes OSM i aporta traces GPX enregistrades.</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -2971,4 +2971,17 @@ Repræsenterer område: %1$s x %2$s</string>
<string name="appearance_on_the_map">Udseende på kortet</string>
<string name="looking_for_tracks_with_waypoints">Find spor med rutepunkter</string>
<string name="shared_string_more_without_dots">Mere</string>
<string name="empty_state_osm_edits">Opret eller rediger OSM objekter</string>
<string name="empty_state_osm_edits_descr">Opret eller ændre OSM interessepunkter, åbne eller kommentere OSM noter, og bidrag med GPX-filer.</string>
<string name="shared_string_deleted">Slettet</string>
<string name="shared_string_edited">Redigeret</string>
<string name="shared_string_added">Tilføjet</string>
<string name="marker_activated">Markør %s er aktiveret.</string>
<string name="one_tap_active_descr">Tryk på markør på kortet, flyt den til det første sted i aktive markører, uden at åbne kontekstmenuen.</string>
<string name="one_tap_active">Et tryk aktiv</string>
<string name="empty_state_av_notes">Tag noter!</string>
<string name="empty_state_av_notes_desc">Tilføj lyd-, video- eller fotobesked til hvert punkt på kortet ved hjælp af modul- eller kontekstmenu.</string>
<string name="notes_by_date">Noter efter dato</string>
<string name="by_date">Efter dato</string>
<string name="by_type">Efter type</string>
</resources>

View file

@ -2787,7 +2787,7 @@
\nراهبر دیداری و شنیداری، مشاهدهٔ مکان‌های محبوب (POIها یا Points of interest)، ایجاد و مدیریت ردهای GPX، استفاده از تصویرسازی منحنی‌های تراز و اطلاعات ارتفاع (با استفاده از افزونه)، انتخاب حالت‌های پیاده، دوچرخه، خودرو، امکان ویرایش مکان‌ها و... چیزهایی هستند که تجربهٔ مؤثر و لذت‌بخشی در کار با نقشه را برایتان به ارمغان می‌آورند.</string>
<string name="osmand_extended_description_part2">راهبری با GPS • امکان انتخاب بین حالت آنلاین و آفلاین دارید؛ در حالت آفلاین هزینهٔ دیگری بابت اینترنت نمی‌پردازید و در حالت آنلاین عملکرد سریع‌تری را تجربه می‌کنید • راهنمای گام‌به‌گام صوتی که در پیمودن مسیر راهنمایی‌تان می‌کند (با پیام‌های صوتی انسانی و ماشینی) • اگر از مسیر منحرف شوید، مسیر جدیدی برایتان پیدا می‌کند • راهنمای خطوط عبوری، نام خیابان‌ها و زمان تخمینی رسیدن را دریافت می‌کنید که در طول مسیر راهنمای شماست • برای داشتن سفری ایمن‌تر، حالات شب/روز به‌صورت خودکار انتخاب می‌شود • اعلام محدودیت‌های سرعت را فعال کنید تا در صورت تجاوز از سرعت مجاز به شما هشدار دهد • بزرگ‌نمایی نقشه متناسب با سرعتتان تنظیم می‌شود • با استفاده از نشانی، نوع مکان (مثلاً پارکینگ، رستوران، هتل، پمپ گاز، موزه) یا مختصات جغرافیایی به جست‌وجو بپردازید • نقاط بین‌راهی مسیرتان را مشخص کنید • رد خودتان را ثبت کنید یا یک رد GPX را بارگیری و آن را دنبال کنید</string>
<string name="distance_moving">مسافت اصلاح‌شده</string>
<string name="legacy_search">جست‌وجوی موروثی</string>
<string name="legacy_search">جستجو دنباله</string>
<string name="show_legacy_search">نمایش جست‌وجوی موروثی</string>
<string name="show_legacy_search_desc">جست‌وجوی موروثی را به منو اضافه می‌کند.</string>
<string name="osmand_extended_description_part3">نقشه • نقاط محبوب (POI یا Points of interest) اطرافتان را نشان می‌دهد • نقشه را در راستای حرکتتان (یا قطب‌نما) تنظیم می‌کند • موقعیتتان یا جایی را که جست‌وجو کرده‌اید، نشانتان می‌دهد • موقعیتتان را با دوستانتان به‌اشتراک بگذارید تا شما را پیدا کنند • جاهایی را که دوست دارید در قسمت نقاط برگزیده ذخیره کنید • شیوهٔ نمایش نام‌های روی نقشه را انتخاب کنید: انگلیسی، محلی یا نویسه‌گردانی‌شده • نمایش نقشه‌های تخصصی آنلاین، تصاویر ماهواره‌ای (بینگ) و رولایه‌های مختلف مانند مسیرهای گردشگردی یا راهبری GPX با امکان تنظیم شفافیت</string>

View file

@ -3022,4 +3022,17 @@ représentant la zone : %1$s x %2$s</string>
<string name="active_markers_descr">Indiquez le nombre d\'indicateurs de direction à afficher.</string>
<string name="shared_string_more_without_dots">Plus</string>
<string name="looking_for_tracks_with_waypoints">Rechercher des traces avec points de passage</string>
<string name="empty_state_osm_edits">Créer et modifier des éléments OSM</string>
<string name="empty_state_osm_edits_descr">Créer ou modifier les PI OSM, ouvrir ou commenter des Notes OSM et contribuer aux traces GPX enregistrées.</string>
<string name="shared_string_deleted">Supprimé</string>
<string name="shared_string_edited">Modifié</string>
<string name="shared_string_added">Ajouté</string>
<string name="marker_activated">Marque %s activée.</string>
<string name="one_tap_active_descr">Appuyez sur une marque présente sur la carte, déplacez-la en première position des marques actives sans ouvrir le menu contextuel.</string>
<string name="one_tap_active">Un appui activé</string>
<string name="empty_state_av_notes">Prenez des notes !</string>
<string name="empty_state_av_notes_desc">Ajoutez des notes sonores, vidéos ou photo à tout point de la carte en utilisant le gadget ou le menu contextuel.</string>
<string name="notes_by_date">Notes par date</string>
<string name="by_date">Par date</string>
<string name="by_type">Par type</string>
</resources>

View file

@ -2177,4 +2177,7 @@
<string name="arrival_distance">הכרזת הגעה</string>
<string name="index_name_netherlands">אירופה - הולנד</string>
<string name="keep_informing_never">ידני בלבד (נגיעה בחץ)</string>
<string name="empty_state_osm_edits">יצירה או שינוי של עצמים ב־OSM</string>
<string name="shared_string_deleted">נמחקה</string>
<string name="shared_string_edited">נערכה</string>
</resources>

View file

@ -3036,7 +3036,7 @@
<string name="poi_deadlock">Zastój</string>
<string name="poi_fuel_type">Rodzaj</string>
<string name="poi_fuel_type">Rodzaj paliwa</string>
<string name="poi_payment_type">Metoda płatności</string>
<string name="poi_additional_type">Dodatkowy</string>
<string name="poi_shop_craft">Sklep z materiałami dla rzemieślników</string>
@ -3044,7 +3044,7 @@
<string name="poi_service_bicycle_charging_yes">Ładowanie: tak</string>
<string name="poi_service_bicycle_charging_no">Ładowanie: nie</string>
<string name="poi_fuel_avia_type">Rodzaj</string>
<string name="poi_fuel_avia_type">Rodzaj paliwa (avia)</string>
<string name="poi_payment_fuel_type">Karty paliwowe</string>
<string name="poi_internet_access_type">Dostęp do Internetu</string>
<string name="poi_vending_type">Sprzedaż</string>

View file

@ -122,10 +122,10 @@
<string name="quick_action_showhide_favorites_title">Показать/скрыть избранные</string>
<string name="quick_action_add_category">Добавить категорию</string>
<string name="quick_action_add_create_items">Действия</string>
<string name="quick_action_fav_name_descr">Если оставить это поле пустым, то оно будет автоматически заполнено адресом или названием места</string>
<string name="quick_action_fav_name_descr">Если оставить это поле пустым, то оно будет автоматически заполнено адресом или названием места.</string>
<string name="quick_action_bug_descr">Это сообщение будет отправлено как комментарий.</string>
<string name="quick_action_category_descr">Выберите категорию для сохранения точки избранного</string>
<string name="quick_action_gpx_category_descr">Выберите категорию (опционально)</string>
<string name="quick_action_category_descr">Выберите категорию для сохранения в ней точки избранного.</string>
<string name="quick_action_gpx_category_descr">Выберите категорию (опционально).</string>
<string name="quick_action_poi_list">Список категорий</string>
<string name="quick_action_sh_poi_descr">Вы можете добавить одну или несколько категорий POI для отображения на карте.</string>
<string name="quick_action_page_list_descr">Нажатие на кнопку быстрого действия позволит циклически переключать элементы данного списка.</string>
@ -142,7 +142,7 @@
<string name="quick_action_map_source_title">Источники карты</string>
<string name="quick_action_map_source_action">Добавить источник карты</string>
<string name="quick_action_map_source_switch">Источник карты изменён на \"%s\".</string>
<string name="quick_action_btn_tutorial_descr">Долгое нажатие и перетаскивание позволит переместить кнопку</string>
<string name="quick_action_btn_tutorial_descr">Долгое нажатие и перетаскивание позволит переместить кнопку.</string>
<string name="rendering_attr_depthContours_description">Показывать контуры и точки глубины.</string>
<string name="rendering_attr_depthContours_name">Контуры морских глубин</string>
@ -633,7 +633,7 @@
<string name="general_settings">Общие</string>
<string name="index_settings">Управление картами</string>
<string name="osmand_service">Фоновый режим</string>
<string name="osmand_service_descr">Запустить OsmAnd в фоновом режиме для записи трека и навигации</string>
<string name="osmand_service_descr">Оставить OsmAnd работать в фоновом режиме при выключении экрана.</string>
<string name="fast_route_mode">Скоростной маршрут</string>
<string name="fast_route_mode_descr">Расчёт скоростного маршрута вместо кратчайшего.</string>
<string name="tiles_to_download_estimated_size">На масштабе {0} загрузить {1} тайлов ({2} Mb )</string>
@ -698,18 +698,18 @@
<string name="context_menu_item_search_poi">Искать POI</string>
<string name="use_trackball_descr">Использовать трекбол, чтобы перемещать карту.</string>
<string name="use_trackball">Использовать трекбол</string>
<string name="background_service_wait_int_descr">Выберите максимальное время поиска позиции сервиса</string>
<string name="background_service_wait_int_descr">Задать максимальное время ожидания для каждого фонового определения позиции.</string>
<string name="background_service_wait_int">Время ожидания</string>
<string name="where_am_i">Где я?</string>
<string name="network_provider">Сеть</string>
<string name="gps_provider">GPS</string>
<string name="int_seconds">секунд</string>
<string name="int_min">мин.</string>
<string name="background_service_int_descr">Выберите интервал пробуждения для фоновой службы</string>
<string name="background_service_int_descr">Выберите интервал пробуждения для фоновой службы.</string>
<string name="background_service_int">Интервал пробуждения GPS</string>
<string name="background_service_provider_descr">Выберите источник позиционирования для фоновой службы</string>
<string name="background_service_provider_descr">Выберите источник позиционирования для фоновой службы.</string>
<string name="background_service_provider">Источник позиционирования</string>
<string name="background_router_service_descr">Запускает OsmAnd в фоновом режиме для отслеживания местоположения при выключенном экране</string>
<string name="background_router_service_descr">Запускает OsmAnd в фоновом режиме для отслеживания вашей позиции при выключенном экране.</string>
<string name="background_router_service">Запуск приложения в фоновом режиме</string>
<string name="off_router_service_no_gps_available">Сервис маршрутизации OsmAnd включён, если отключить позиционирование, он перестанет вести по маршруту.</string>
<string name="routing_settings_descr">Укажите настройки для навигации.</string>
@ -747,7 +747,7 @@
<string name="map_orientation_portrait">Портрет</string>
<string name="map_orientation_landscape">Ландшафт</string>
<string name="map_screen_orientation">Ориентация экрана</string>
<string name="map_screen_orientation_descr">Выберите ориентацию экрана</string>
<string name="map_screen_orientation_descr">Выберите ориентацию экрана.</string>
<string name="opening_hours_not_supported">Формат времени работы не поддерживается для редактирования</string>
<string name="add_new_rule">Новое правило</string>
<string name="transport_Routes">Маршруты</string>
@ -763,7 +763,7 @@
<string name="transport_route_distance">Длина пути</string>
<string name="transport">Транспорт</string>
<string name="shared_string_ok">ОК</string>
<string name="show_transport_over_map_description">Показывать остановки общественного транспорта на карте</string>
<string name="show_transport_over_map_description">Показывать остановки общественного транспорта на карте.</string>
<string name="show_transport_over_map">Показать остановки транспорта</string>
<string name="hello">Навигационное приложение OsmAnd</string>
<string name="update_poi_success">Данные POI были успешно обновлены ({0} объектов загружено)</string>
@ -788,9 +788,9 @@
<string name="search_offline_address">Офлайн поиск</string>
<string name="search_online_address">Онлайн поиск</string>
<string name="max_level_download_tile">Уровень детализации</string>
<string name="max_level_download_tile_descr">Выберите максимальный уровень для загрузки из Интернета</string>
<string name="max_level_download_tile_descr">Выберите максимальный масштаб для загрузки тайлов карт из интеренета.</string>
<string name="route_general_information">Общая протяженность = %1$s, время в пути = %2$d ч %3$d мин.</string>
<string name="router_service_descr">Выберите онлайн или оффлайн сервис для прокладки маршрута</string>
<string name="router_service_descr">Выберите онлайн или оффлайн сервис для прокладки маршрута.</string>
<string name="router_service">Прокладка маршрута</string>
<string name="sd_dir_not_accessible">Каталог для хранения данных на SD-карте не доступна!</string>
<string name="download_question">Вы хотите загрузить {0} - {1} ?</string>
@ -834,11 +834,11 @@
<string name="previous_run_crashed">Приложение завершилось некорректно. Лог-файл в {0}. Сообщите разработчику об ошибке и приложите лог-файл.</string>
<string name="saving_gpx_tracks">Сохранение треков GPX на SD-карту…</string>
<string name="finished_task">Окончен</string>
<string name="use_online_routing_descr">Использовать Интернет-сервис для прокладки маршрута</string>
<string name="use_online_routing_descr">Использовать Интернет-сервис для прокладки маршрута.</string>
<string name="use_online_routing">Онлайн маршрутизация</string>
<string name="user_password">Пароль</string>
<string name="osm_settings_descr">Установка логина/пароля OpenStreetMap</string>
<string name="osm_settings_descr">Укажите настройки для загрузки данных в Openstreetmap.org (OSM).</string>
<string name="data_settings_descr">Настройка данных: язык, обновление данных</string>
<string name="data_settings">Данные</string>
<string name="osm_settings">Редактирование OSM</string>
@ -865,11 +865,11 @@
<string name="choose_city">Выберите город или почтовый индекс</string>
<string name="ChooseCountry">Выберите регион</string>
<string name="show_view_angle">Угол обзора</string>
<string name="map_view_3d_descr">Включить 3D вид для карты</string>
<string name="map_view_3d_descr">Включить 3D вид для карты.</string>
<string name="map_view_3d">3D вид</string>
<string name="show_poi_over_map_description">Показывать слой POI</string>
<string name="show_poi_over_map">Отображать POI</string>
<string name="map_tile_source_descr">Выберите источник онлайн карт или кэшированных частей карты</string>
<string name="map_tile_source_descr">Выберите источник онлайн или кэшированных тайлов карты.</string>
<string name="map_tile_source">Растровые карты</string>
<string name="map_source">Источник карты</string>
<string name="use_internet">Использовать Интернет</string>
@ -936,7 +936,7 @@
<string name="osb_comment_dialog_author">Автор</string>
<string name="poi_edit_title">Редактирование POI</string>
<string name="poi_create_title">Добавление POI</string>
<string name="poi_error_poi_not_found">POI не является точкой или не найдена</string>
<string name="poi_error_poi_not_found">Узел не найден или удобство (amenity) состоит из нескольких узлов, что не поддерживается.</string>
<string name="poi_remove_confirm_template">Вы действительно хотите удалить {0}?</string>
<string name="poi_remove_title">Удаление POI</string>
<string name="poi_remove_success">POI успешно удалена</string>
@ -1039,7 +1039,7 @@
<string name="rendering_attr_appMode_description">Оптимизация карты для соответствующего профиля</string>
<string name="rendering_attr_contourLines_description">Выберите минимальный уровень масштаба для отображения горизонталей (необходимо предварительно загрузить соответствующий SRTM-файл):</string>
<string name="rendering_attr_contourLines_name">Показывать горизонтали</string>
<string name="rendering_attr_hmRendered_description">На карте отображается больше подробностей</string>
<string name="rendering_attr_hmRendered_description">Отображать больше деталей на карте.</string>
<string name="rendering_attr_hmRendered_name">Больше деталей</string>
<string name="route_roundabout">Круговое движение, %1$d съезд</string>
<string name="route_kl">Держитесь левее</string>
@ -1183,7 +1183,7 @@
<string name="download_srtm_maps">Карты SRTM</string>
<string name="av_settings">Настройки аудио и видео </string>
<string name="intermediate_points_change_order">Изменить порядок</string>
<string name="recording_context_menu_show">Отобразить</string>
<string name="recording_context_menu_show">Просмотр</string>
<string name="av_def_action_picture">Сделать фото</string>
<string name="recording_context_menu_precord">Сделать фото</string>
<string name="dropbox_plugin_description">Плагин Dropbox позволяет синхронизировать треки и видео/аудио заметки с вашим аккаунтом Dropbox.</string>
@ -1215,7 +1215,7 @@
<string name="hno">Номер дома</string>
<string name="download_using_mobile_internet">В настоящее время нет соединения по Wi-Fi. Хотите использовать текущее интернет-соединение для загрузки?</string>
<string name="monitoring_settings">Запись поездок</string>
<string name="monitoring_settings_descr">Настройки записи поездок</string>
<string name="monitoring_settings_descr">Настройки записи поездок.</string>
<string name="choose_osmand_theme_descr">Выбор темы приложения.</string>
<string name="choose_osmand_theme">Тема приложения</string>
<string name="accessibility_options">Настройка специальных возможностей</string>
@ -1268,7 +1268,7 @@
<string name="please_select_address">Сначала выберите город или улицу</string>
<string name="destination_point">Пункт назначения %1$s</string>
<string name="av_camera_focus">Режим фокусировки камеры</string>
<string name="av_camera_focus_descr">Режим фокусировки для встроенного приложения фотографирования</string>
<string name="av_camera_focus_descr">Выберите режим фокусировки встроенной камеры.</string>
<string name="av_camera_focus_auto">Автоматический фокус</string>
<string name="av_camera_focus_hiperfocal">Гиперфокальная фокусировка</string>
<string name="av_camera_focus_edof">Увеличенная глубина резкозти (EDOF)</string>
@ -1276,9 +1276,9 @@
<string name="av_camera_focus_macro">Макро-режим</string>
<string name="av_camera_focus_continuous">Постоянная фокусировка</string>
<string name="av_photo_play_sound">Звук затвора</string>
<string name="av_photo_play_sound_descr">Проигрывать звук при фотографировании</string>
<string name="av_photo_play_sound_descr">Воспроизводить звук при фотографировании.</string>
<string name="av_camera_pic_size">Размер фото</string>
<string name="av_camera_pic_size_descr">Размер изображения для встроенного приложения фотографирования</string>
<string name="av_camera_pic_size_descr">Выберите размер фотографии со встроенной камеры.</string>
<string name="speak_speed_limit">Ограничение скорости</string>
<string name="speak_cameras">Камеры контроля скорости</string>
<string name="speak_traffic_warnings">Дорожные предупреждения</string>
@ -1915,7 +1915,7 @@
<string name="routing_attr_height_name">Ограничение высоты</string>
<string name="routing_attr_height_description">Укажите высоту автомобиля для учёта при построении маршрута.</string>
<string name="use_fast_recalculation">Умный перерасчет маршрута</string>
<string name="use_fast_recalculation_desc">Перерасчет только начальной части маршрута для длительных поездок</string>
<string name="use_fast_recalculation_desc">Перерасчет только начальной части маршрута для длительных поездок.</string>
<string name="osm_edit_context_menu_delete">Удалить правки OSM</string>
<string name="rendering_value_disabled_name">Отключено</string>
<string name="rendering_value_walkingRoutesScopeOSMC_name">Раскраска по сетевой принадлежности</string>
@ -2072,13 +2072,13 @@
<string name="get_full_version">Полная версия</string>
<string name="downloads">Загрузки</string>
<string name="show_free_version_banner">Показывать баннер бесплатной версии</string>
<string name="show_free_version_banner_description">Даже если у вас купленная версия вы также можете видеть баннер для бесплатной версии</string>
<string name="show_free_version_banner_description">Показывать баннер бесплатной версии даже в платной версии.</string>
<string name="confirm_download_roadmaps">Вы уверены, что хотите скачать карту автодорог, хотя у вас уже есть стандартная (полная) карта?</string>
<string name="value_downloaded_of_max">%1$.1f из %2$.1f Мб</string>
<string name="file_size_in_mb">%.1f МБ</string>
<string name="update_all">Обновить все (%1$s МБ)</string>
<string name="free_downloads_used">Использовано бесплатных загрузок</string>
<string name="free_downloads_used_description">Отображать сколько бесплатных загрузок использовано</string>
<string name="free_downloads_used_description">Отображать сколько бесплатных загрузок использовано.</string>
<string name="share_geo">гео:</string>
<string name="share_menu_location">Поделиться местоположением</string>
<string name="shared_string_send">Отправить</string>
@ -2101,8 +2101,8 @@
<string name="faq_item_description">Часто задаваемые вопросы</string>
<string name="faq_item">Вопросы и ответы</string>
<string name="first_usage_item">Первый запуск</string>
<string name="first_usage_item_description">Как загрузить карты, установить основные настройки</string>
<string name="navigation_item_description">Настройка навигации</string>
<string name="first_usage_item_description">Как загрузить карты, установить основные настройки.</string>
<string name="navigation_item_description">Настройка навигации.</string>
<string name="planning_trip_item">Планирование поездки</string>
<string name="enter_country_name">Введите название страны</string>
<string name="new_version">Новая версия</string>
@ -2601,7 +2601,7 @@
<string name="quick_action_navigation_voice_descr">Нажатие на кнопку действия выключит или включит голосовые подсказки во время навигации.</string>
<string name="quick_action_add_parking_descr">Нажатие на кнопку действия добавит место парковки по центру экрана.</string>
<string name="quick_action_interim_dialog">Показывать промежуточный диалог</string>
<string name="mappilary_no_internet_desc">Вам нужен Интернет для просмотра фотографий с Mapillary</string>
<string name="mappilary_no_internet_desc">Вам нужен Интернет для просмотра фотографий с Mapillary.</string>
<string name="wrong_format">Неправильный формат</string>
<string name="enter_new_name">Введите новое имя</string>
<string name="shared_string_back">Назад</string>
@ -2764,4 +2764,17 @@
\n• Добавление точек интереса (POI) и непосредственная загрузка их в OSM (или позже, если в автономном режиме)
\n• Возможность записи путешествие в фоновом режиме (в то время, как устройство находится в спящем режиме)
\nOsmAnd - открытое программное обеспечение в активной разработке. Каждый может внести вклад сообщая об ошибках, улучшая перевод или разрабатывая новые возможности. Проект находится в состоянии постоянного совершенствования форм взаимодействия разработчиков и пользователей. Ход проекта зависит также от финансовых взносов для обеспечения продолжения кодирования и тестирования новой функциональности.</string>
<string name="empty_state_osm_edits">Создать или изменить OSM объекты</string>
<string name="empty_state_osm_edits_descr">Создавайте или изменяйте OSM POI, открывайте или комментируйте заметки OSM и вносите записанные файлы GPX.</string>
<string name="shared_string_deleted">Удалено</string>
<string name="shared_string_edited">Отредактировано</string>
<string name="shared_string_added">Добавлено</string>
<string name="marker_activated">Маркер %s активирован.</string>
<string name="one_tap_active_descr">Нажатие на маркер на карте переместит его на первое место в списке активных маркерах, не открывая контекстное меню.</string>
<string name="one_tap_active">Активация одним нажатием</string>
<string name="empty_state_av_notes">Делайте заметки!</string>
<string name="empty_state_av_notes_desc">Добавьте аудио, видео или фото заметку в любую точку на карте, используя виджет или контекстное меню.</string>
<string name="notes_by_date">Заметки по дате</string>
<string name="by_date">По дате</string>
<string name="by_type">По типу</string>
</resources>

View file

@ -284,6 +284,12 @@ public class AndroidUtils {
decorView.setSystemUiVisibility(uiOptions);
}
public static int[] getViewLocation(View view) {
int[] coordinates = new int[2];
view.getLocationOnScreen(coordinates);
return coordinates;
}
public static void enterToFullScreen(Activity activity) {
if (Build.VERSION.SDK_INT >= 21) {
activity.getWindow().getDecorView()

View file

@ -252,7 +252,7 @@ public class ContextMenuAdapter {
ItemClickListener ca = item.getItemClickListener();
item.setSelected(isChecked);
if (ca != null) {
ca.onContextMenuClick(la, item.getTitleId(), position, isChecked);
ca.onContextMenuClick(la, item.getTitleId(), position, isChecked, null);
}
}
};
@ -348,7 +348,8 @@ public class ContextMenuAdapter {
boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter,
int itemId,
int position,
boolean isChecked);
boolean isChecked,
int[] viewCoordinates);
}
public interface ProgressListener {
@ -372,7 +373,7 @@ public class ContextMenuAdapter {
btn.setChecked(!btn.isChecked());
return false;
} else {
return onContextMenuClick(adapter, itemId, position, false);
return onContextMenuClick(adapter, itemId, position, false, null);
}
}
}

View file

@ -74,7 +74,7 @@ public class HelpActivity extends OsmandActionBarActivity implements AdapterView
ContextMenuAdapter.ItemClickListener listener =
mAdapter.getItem(position).getItemClickListener();
if (listener != null) {
listener.onContextMenuClick(mAdapter, position, position, false);
listener.onContextMenuClick(mAdapter, position, position, false, null);
}
}
@ -200,7 +200,8 @@ public class HelpActivity extends OsmandActionBarActivity implements AdapterView
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter,
int itemId,
int position,
boolean isChecked) {
boolean isChecked,
int[] viewCoordinates) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(intent);
return false;
@ -227,7 +228,7 @@ public class HelpActivity extends OsmandActionBarActivity implements AdapterView
}
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked, int[] viewCoordinates) {
String title = mTitle == null ? adapter.getItem(position).getTitle() : mTitle;
HelpArticleDialogFragment.instantiateWithAsset(filename, title)
.show(ctx.getSupportFragmentManager(), "DIALOG_HELP_ARTICLE");

View file

@ -18,6 +18,7 @@ import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import net.osmand.AndroidUtils;
import net.osmand.IndexConstants;
import net.osmand.Location;
import net.osmand.PlatformUtil;
@ -282,7 +283,7 @@ public class MapActivityActions implements DialogProvider {
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked, int[] viewCoordinates) {
if (resId == R.string.context_menu_item_add_waypoint) {
mapActivity.getContextMenu().addWptPt();
} else if (resId == R.string.context_menu_item_edit_waypoint) {
@ -322,7 +323,7 @@ public class MapActivityActions implements DialogProvider {
int standardId = item.getTitleId();
ItemClickListener click = item.getItemClickListener();
if (click != null) {
click.onContextMenuClick(listAdapter, standardId, which, false);
click.onContextMenuClick(listAdapter, standardId, which, false, null);
} else if (standardId == R.string.context_menu_item_last_intermediate_point) {
mapActivity.getContextMenu().addAsLastIntermediate();
} else if (standardId == R.string.context_menu_item_search) {
@ -612,11 +613,11 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.map_dashboard)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_dashboard_open");
MapActivity.clearPrevActivityIntent();
mapActivity.closeDrawer();
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.DASHBOARD);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.DASHBOARD, viewCoordinates);
return true;
}
}).createItem());
@ -625,7 +626,7 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_flag_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_markers_open");
MapActivity.clearPrevActivityIntent();
MapMarkersDialogFragment.showInstance(mapActivity);
@ -637,10 +638,10 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_intermediate)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_waypoints_open");
MapActivity.clearPrevActivityIntent();
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS, viewCoordinates);
return false;
}
}).createItem());
@ -650,7 +651,7 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_fav_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_myplaces_open");
Intent newIntent = new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization()
.getFavoritesActivity());
@ -664,7 +665,7 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_search_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_search_open");
mapActivity.showQuickSearch(MapActivity.ShowQuickSearchMode.NEW_IF_EXPIRED, false);
return true;
@ -676,7 +677,7 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_search_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_legacy_search_open");
Intent newIntent = new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization()
.getSearchActivity());
@ -697,7 +698,7 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_gdirections_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_directions_open");
MapControlsLayer mapControlsLayer = mapActivity.getMapLayers().getMapControlsLayer();
if (mapControlsLayer != null) {
@ -724,10 +725,10 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_layers_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_config_map_open");
MapActivity.clearPrevActivityIntent();
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_MAP);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_MAP, viewCoordinates);
return false;
}
}).createItem());
@ -743,7 +744,7 @@ public class MapActivityActions implements DialogProvider {
.setTitle(d).setIcon(R.drawable.ic_type_archive)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_download_maps_open");
Intent newIntent = new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization()
.getDownloadActivity());
@ -758,7 +759,7 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_osm_live)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_osm_live_open");
Intent intent = new Intent(mapActivity, OsmLiveActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
@ -772,7 +773,7 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_ruler)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked, int[] viewCoordinates) {
MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager());
return true;
}
@ -782,10 +783,10 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_configure_screen_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_config_screen_open");
MapActivity.clearPrevActivityIntent();
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_SCREEN);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_SCREEN, viewCoordinates);
return false;
}
}).createItem());
@ -794,7 +795,7 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_extension_dark)
.setListener(new ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_plugins_open");
Intent newIntent = new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization()
.getPluginsActivity());
@ -808,7 +809,7 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_settings)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_settings_open");
final Intent settings = new Intent(mapActivity, getMyApplication().getAppCustomization()
.getSettingsActivity());
@ -835,7 +836,7 @@ public class MapActivityActions implements DialogProvider {
.setIcon(R.drawable.ic_action_help)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
app.logEvent(mapActivity, "drawer_help_open");
Intent intent = new Intent(mapActivity, HelpActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
@ -946,7 +947,7 @@ public class MapActivityActions implements DialogProvider {
ContextMenuItem item = contextMenuAdapter.getItem(position);
ContextMenuAdapter.ItemClickListener click = item.getItemClickListener();
if (click != null && click.onContextMenuClick(simpleListAdapter, item.getTitleId(),
position, false)) {
position, false, AndroidUtils.getViewLocation(view))) {
mapActivity.closeDrawer();
}
}

View file

@ -293,7 +293,7 @@ public class MapActivityLayers {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
ContextMenuItem item = listAdapter.getItem(position);
item.setSelected(!item.getSelected());
item.getItemClickListener().onContextMenuClick(listAdapter, position, position, item.getSelected());
item.getItemClickListener().onContextMenuClick(listAdapter, position, position, item.getSelected(), null);
listAdapter.notifyDataSetChanged();
}
});
@ -416,7 +416,7 @@ public class MapActivityLayers {
builder.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter,
int itemId, int position, boolean isChecked) {
int itemId, int position, boolean isChecked, int[] viewCoordinates) {
ContextMenuItem item = adapter.getItem(position);
item.setSelected(isChecked);
return false;

View file

@ -444,7 +444,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
return ctx.getString(R.string.recording_photo_description, "", time).trim();
}
updateInternalDescription();
return ctx.getString(R.string.recording_description, "", getDuration(ctx), time)
return ctx.getString(R.string.recording_description, "", getDuration(ctx, true), time)
.trim();
}
@ -454,11 +454,11 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
return time;
}
updateInternalDescription();
return time + " " + getDuration(ctx);
return time + " " + getDuration(ctx, true);
}
public String getNewSmallDescription(Context ctx) {
public String getExtendedDescription(Context ctx) {
DateFormat dateFormat = android.text.format.DateFormat.getMediumDateFormat(ctx);
String date = dateFormat.format(file.lastModified());
int size = (int) ((file.length() + 512) >> 10);
@ -478,7 +478,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
return date + "" + sz;
}
updateInternalDescription();
return date + "" + sz + "" + getDuration(ctx);
return date + "" + sz + "" + getDuration(ctx, false);
}
public String getPlainDuration(boolean accessibilityEnabled) {
@ -491,16 +491,18 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
}
}
private String getDuration(Context ctx) {
String additional = "";
private String getDuration(Context ctx, boolean addRoundBrackets) {
StringBuilder additional = new StringBuilder("");
if (duration > 0) {
int d = (int) (duration / 1000);
additional += "(" + Algorithms.formatDuration(d, ((OsmandApplication)ctx.getApplicationContext()).accessibilityEnabled()) + ")";
additional.append(addRoundBrackets ? "(" : "");
additional.append(Algorithms.formatDuration(d, ((OsmandApplication) ctx.getApplicationContext()).accessibilityEnabled()));
additional.append(addRoundBrackets ? ")" : "");
}
if (!available) {
additional += "[" + ctx.getString(R.string.recording_unavailable) + "]";
additional.append("[").append(ctx.getString(R.string.recording_unavailable)).append("]");
}
return additional;
return additional.toString();
}
}
@ -623,7 +625,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
public void registerLayerContextMenuActions(final OsmandMapTileView mapView, ContextMenuAdapter adapter, final MapActivity mapActivity) {
ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
if (itemId == R.string.layer_recordings) {
SHOW_RECORDINGS.set(!SHOW_RECORDINGS.get());
adapter.getItem(pos).setColorRes(SHOW_RECORDINGS.get() ?
@ -653,7 +655,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
recordAudio(latitude, longitude, mapActivity);
return true;
}
@ -664,7 +666,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
.setListener(new ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
recordVideo(latitude, longitude, mapActivity, false);
return true;
}
@ -674,7 +676,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
.setIcon(R.drawable.ic_action_photo_dark)
.setListener(new ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
takePhoto(latitude, longitude, mapActivity, false, false);
return true;
}

View file

@ -117,11 +117,12 @@ public class NotesFragment extends OsmAndListFragment {
@Override
public void onResume() {
super.onResume();
boolean portrait = AndroidUiHelper.isOrientationPortrait(getActivity());
List<Object> items = createItemsList();
ListView listView = getListView();
listView.setDivider(null);
listView.setEmptyView(emptyView);
if (items.size() > 0 && footerView == null) {
if (items.size() > 0 && footerView == null && portrait) {
footerView = getActivity().getLayoutInflater().inflate(R.layout.list_shadow_footer, null, false);
listView.addFooterView(footerView);
listView.setHeaderDividersEnabled(false);
@ -131,6 +132,7 @@ public class NotesFragment extends OsmAndListFragment {
listAdapter.setSelectionMode(selectionMode);
listAdapter.setSelected(selected);
listAdapter.setListener(createAdapterListener());
listAdapter.setPortrait(portrait);
listView.setAdapter(listAdapter);
}
@ -294,7 +296,7 @@ public class NotesFragment extends OsmAndListFragment {
private void selectAll(int type) {
if (type == NotesAdapter.TYPE_DATE_HEADER) {
for (int i = 0; i < listAdapter.getCount(); i++) {
for (int i = 0; i < listAdapter.getItemsCount(); i++) {
Object item = listAdapter.getItem(i);
if (item instanceof Recording) {
selected.add((Recording) item);
@ -354,7 +356,7 @@ public class NotesFragment extends OsmAndListFragment {
@Override
public boolean onCreateActionMode(final ActionMode mode, Menu menu) {
LOG.debug("onCreateActionMode");
if (type == MODE_SHARE) {
if (type == MODE_SHARE && AndroidUiHelper.isOrientationPortrait(getActivity())) {
listAdapter.insert(SHARE_LOCATION_FILE, 0);
}
switchSelectionMode(true);

View file

@ -2,13 +2,16 @@ package net.osmand.plus.audionotes.adapters;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import net.osmand.plus.OsmandApplication;
@ -30,10 +33,13 @@ public class NotesAdapter extends ArrayAdapter<Object> {
private OsmandApplication app;
private NotesAdapterListener listener;
private List<Object> items;
private boolean selectionMode;
private Set<Recording> selected;
private boolean portrait;
public void setListener(NotesAdapterListener listener) {
this.listener = listener;
}
@ -46,127 +52,88 @@ public class NotesAdapter extends ArrayAdapter<Object> {
this.selected = selected;
}
public void setPortrait(boolean portrait) {
this.portrait = portrait;
}
public NotesAdapter(OsmandApplication app, List<Object> items) {
super(app, R.layout.note, items);
this.app = app;
this.items = items;
}
@NonNull
@Override
public View getView(final int position, View row, @NonNull ViewGroup parent) {
final int type = getItemViewType(position);
boolean header = type == TYPE_DATE_HEADER
|| type == TYPE_AUDIO_HEADER
|| type == TYPE_PHOTO_HEADER
|| type == TYPE_VIDEO_HEADER;
if (portrait) {
final int type = getItemViewType(position);
boolean header = type == TYPE_DATE_HEADER
|| type == TYPE_AUDIO_HEADER
|| type == TYPE_PHOTO_HEADER
|| type == TYPE_VIDEO_HEADER;
if (row == null) {
LayoutInflater inflater = (LayoutInflater) app.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if (header) {
row = inflater.inflate(R.layout.list_item_header, parent, false);
HeaderViewHolder hHolder = new HeaderViewHolder(row);
row.setTag(hHolder);
} else {
row = inflater.inflate(R.layout.note_list_item, parent, false);
ItemViewHolder iHolder = new ItemViewHolder(row);
row.setTag(iHolder);
}
}
if (row == null) {
LayoutInflater inflater = (LayoutInflater) app.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if (header) {
row = inflater.inflate(R.layout.list_item_header, parent, false);
HeaderViewHolder hHolder = new HeaderViewHolder(row);
row.setTag(hHolder);
setupHeader(type, (HeaderViewHolder) row.getTag());
} else {
row = inflater.inflate(R.layout.note_list_item, parent, false);
ItemViewHolder iHolder = new ItemViewHolder(row);
row.setTag(iHolder);
final Object item = getItem(position);
if (item instanceof Recording) {
setupItem(position, (Recording) item, (ItemViewHolder) row.getTag());
}
}
}
if (header) {
final HeaderViewHolder holder = (HeaderViewHolder) row.getTag();
holder.checkBox.setVisibility(selectionMode ? View.VISIBLE : View.GONE);
holder.headerRow.setEnabled(selectionMode);
if (selectionMode) {
holder.checkBox.setChecked(isSelectAllChecked(type));
holder.checkBox.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onHeaderClick(type, holder.checkBox.isChecked());
}
}
});
holder.headerRow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
holder.checkBox.performClick();
}
});
} else {
holder.view.setOnClickListener(null);
}
int titleId;
if (type == TYPE_DATE_HEADER) {
titleId = R.string.notes_by_date;
} else if (type == TYPE_AUDIO_HEADER) {
titleId = R.string.shared_string_audio;
} else if (type == TYPE_PHOTO_HEADER) {
titleId = R.string.shared_string_photo;
} else {
titleId = R.string.shared_string_video;
}
holder.title.setText(titleId);
return row;
} else {
final Object item = getItem(position);
if (item instanceof Recording) {
final Recording recording = (Recording) item;
final ItemViewHolder holder = (ItemViewHolder) row.getTag();
LayoutInflater inflater = (LayoutInflater) app.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
boolean lastCard = getHeadersCount() == position + 1;
int margin = app.getResources().getDimensionPixelSize(R.dimen.content_padding);
int sideMargin = app.getResources().getDisplayMetrics().widthPixels / 10;
if (recording == NotesFragment.SHARE_LOCATION_FILE) {
holder.title.setText(R.string.av_locations);
holder.description.setText(R.string.av_locations_descr);
FrameLayout fl = new FrameLayout(getContext());
LinearLayout ll = new LinearLayout(getContext());
fl.addView(ll);
ll.setOrientation(LinearLayout.VERTICAL);
ll.setBackgroundResource(app.getSettings().isLightContent() ? R.drawable.bg_card_light : R.drawable.bg_card_dark);
((FrameLayout.LayoutParams) ll.getLayoutParams()).setMargins(sideMargin, margin, sideMargin, lastCard ? margin : 0);
int headerInd = getHeaderIndex(position);
HeaderViewHolder headerVH = new HeaderViewHolder(inflater.inflate(R.layout.list_item_header, parent, false));
setupHeader((int) items.get(headerInd), headerVH);
ll.addView(headerVH.view);
for (int i = headerInd + 1; i < items.size(); i++) {
Object item = items.get(i);
if (item instanceof Recording) {
ItemViewHolder itemVH = new ItemViewHolder(inflater.inflate(R.layout.note_list_item, parent, false));
setupItem(i, (Recording) item, itemVH);
ll.addView(itemVH.view);
} else {
holder.title.setText(recording.getName(app, true));
holder.description.setText(recording.getNewSmallDescription(app));
int iconRes = recording.isAudio() ? R.drawable.ic_type_audio
: (recording.isVideo() ? R.drawable.ic_type_video : R.drawable.ic_type_img);
int colorRes = app.getSettings().isLightContent() ? R.color.icon_color : R.color.ctx_menu_info_text_dark;
holder.icon.setImageDrawable(app.getIconsCache().getIcon(iconRes, colorRes));
break;
}
holder.bottomDivider.setVisibility(hideBottomDivider(position) ? View.GONE : View.VISIBLE);
holder.icon.setVisibility(selectionMode ? View.GONE : View.VISIBLE);
holder.checkBox.setVisibility(selectionMode ? View.VISIBLE : View.GONE);
holder.options.setVisibility(selectionMode ? View.GONE : View.VISIBLE);
if (selectionMode) {
holder.checkBox.setChecked(selected.contains(recording));
holder.checkBox.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onCheckBoxClick(recording, holder.checkBox.isChecked());
}
}
});
} else {
holder.options.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white));
holder.options.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onOptionsClick(recording);
}
}
});
}
holder.view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (selectionMode) {
holder.checkBox.performClick();
} else {
if (listener != null) {
listener.onItemClick(recording);
}
}
}
});
}
}
return row;
return fl;
}
}
@Override
public int getCount() {
if (portrait) {
return super.getCount();
}
return getHeadersCount();
}
@Override
@ -183,13 +150,137 @@ public class NotesAdapter extends ArrayAdapter<Object> {
return TYPE_COUNT;
}
private void setupHeader(final int type, final HeaderViewHolder holder) {
setupBackground(holder.backgroundView);
holder.topDivider.setVisibility(portrait ? View.VISIBLE : View.GONE);
holder.checkBox.setVisibility(selectionMode ? View.VISIBLE : View.GONE);
holder.headerRow.setEnabled(selectionMode);
if (selectionMode) {
holder.checkBox.setChecked(isSelectAllChecked(type));
holder.checkBox.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onHeaderClick(type, holder.checkBox.isChecked());
}
}
});
holder.headerRow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
holder.checkBox.performClick();
}
});
} else {
holder.view.setOnClickListener(null);
}
holder.title.setText(getHeaderTitleRes(type));
}
private int getHeaderTitleRes(int type) {
if (type == TYPE_DATE_HEADER) {
return R.string.notes_by_date;
} else if (type == TYPE_AUDIO_HEADER) {
return R.string.shared_string_audio;
} else if (type == TYPE_PHOTO_HEADER) {
return R.string.shared_string_photo;
}
return R.string.shared_string_video;
}
private void setupItem(int position, final Recording recording, final ItemViewHolder holder) {
setupBackground(holder.view);
if (recording == NotesFragment.SHARE_LOCATION_FILE) {
holder.title.setText(R.string.av_locations);
holder.description.setText(R.string.av_locations_descr);
} else {
holder.title.setText(recording.getName(app, true));
holder.description.setText(recording.getExtendedDescription(app));
int iconRes = recording.isAudio() ? R.drawable.ic_type_audio
: (recording.isVideo() ? R.drawable.ic_type_video : R.drawable.ic_type_img);
int colorRes = app.getSettings().isLightContent() ? R.color.icon_color : R.color.ctx_menu_info_text_dark;
holder.icon.setImageDrawable(app.getIconsCache().getIcon(iconRes, colorRes));
}
holder.bottomDivider.setVisibility(hideBottomDivider(position) ? View.GONE : View.VISIBLE);
holder.icon.setVisibility(selectionMode ? View.GONE : View.VISIBLE);
holder.checkBox.setVisibility(selectionMode ? View.VISIBLE : View.GONE);
holder.options.setVisibility(selectionMode ? View.GONE : View.VISIBLE);
if (selectionMode) {
holder.checkBox.setChecked(selected.contains(recording));
holder.checkBox.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onCheckBoxClick(recording, holder.checkBox.isChecked());
}
}
});
} else {
holder.options.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white));
holder.options.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onOptionsClick(recording);
}
}
});
}
holder.view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (selectionMode) {
holder.checkBox.performClick();
} else {
if (listener != null) {
listener.onItemClick(recording);
}
}
}
});
}
private void setupBackground(View view) {
if (!portrait) {
view.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.color_transparent));
}
}
public int getItemsCount() {
return items.size();
}
private int getHeadersCount() {
int res = 0;
for (Object item : items) {
if (item instanceof Integer) {
res++;
}
}
return res;
}
private int getHeaderIndex(int position) {
int count = 0;
for (int i = 0; i < items.size(); i++) {
if (items.get(i) instanceof Integer) {
if (count == position) {
return i;
}
count++;
}
}
return -1;
}
private boolean hideBottomDivider(int pos) {
return pos == getCount() - 1 || !(getItem(pos + 1) instanceof Recording);
return pos == items.size() - 1 || !(getItem(pos + 1) instanceof Recording);
}
private boolean isSelectAllChecked(int type) {
for (int i = 0; i < getCount(); i++) {
Object item = getItem(i);
for (Object item : items) {
if (item instanceof Recording) {
if (type != TYPE_DATE_HEADER && !isAppropriate((Recording) item, type)) {
continue;
@ -214,12 +305,16 @@ public class NotesAdapter extends ArrayAdapter<Object> {
private class HeaderViewHolder {
final View view;
final View topDivider;
final View backgroundView;
final View headerRow;
final CheckBox checkBox;
final TextView title;
HeaderViewHolder(View view) {
this.view = view;
topDivider = view.findViewById(R.id.top_divider);
backgroundView = view.findViewById(R.id.background_view);
headerRow = view.findViewById(R.id.header_row);
checkBox = (CheckBox) view.findViewById(R.id.check_box);
title = (TextView) view.findViewById(R.id.title_text_view);

View file

@ -15,6 +15,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import net.osmand.AndroidUtils;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.plus.R;
@ -85,7 +86,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
@Override
public void onClick(View v) {
dashboard.setDashboardVisibility(true, DashboardType.WAYPOINTS);
dashboard.setDashboardVisibility(true, DashboardType.WAYPOINTS, AndroidUtils.getViewLocation(v));
}
});
LinearLayout favorites = (LinearLayout) mainView.findViewById(R.id.items);

View file

@ -1,5 +1,9 @@
package net.osmand.plus.dashboard;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
@ -19,9 +23,6 @@ import android.view.Gravity;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewTreeObserver;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.TranslateAnimation;
import android.view.inputmethod.InputMethodManager;
import android.widget.AbsListView;
import android.widget.AdapterView;
@ -510,7 +511,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
@Override
public void onClick(View v) {
setDashboardVisibility(true, flatNow ? DashboardType.WAYPOINTS : DashboardType.WAYPOINTS_FLAT,
previousVisibleType, false);
previousVisibleType, false, AndroidUtils.getViewLocation(v));
}
});
}
@ -661,7 +662,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
markersSelectionButton.onClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
setDashboardVisibility(true, DashboardType.MAP_MARKERS_SELECTION);
setDashboardVisibility(true, DashboardType.MAP_MARKERS_SELECTION, AndroidUtils.getViewLocation(v));
}
};
@ -759,12 +760,20 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
}
public void setDashboardVisibility(boolean visible, DashboardType type) {
setDashboardVisibility(visible, type, null);
}
public void setDashboardVisibility(boolean visible, DashboardType type, int[] animationCoordinates) {
boolean animate = !getMyApplication().getSettings().DO_NOT_USE_ANIMATIONS.get();
setDashboardVisibility(visible, type, this.visible ? visibleType : null, animate);
setDashboardVisibility(visible, type, this.visible ? visibleType : null, animate, animationCoordinates);
}
public void setDashboardVisibility(boolean visible, DashboardType type, boolean animation) {
setDashboardVisibility(visible, type, this.visible ? visibleType : null, animation);
setDashboardVisibility(visible, type, animation, null);
}
public void setDashboardVisibility(boolean visible, DashboardType type, boolean animation, int[] animationCoordinates) {
setDashboardVisibility(visible, type, this.visible ? visibleType : null, animation, animationCoordinates);
}
public void refreshDashboardFragments() {
@ -776,7 +785,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
return R.color.status_bar_transparent_gradient;
}
public void setDashboardVisibility(boolean visible, DashboardType type, DashboardType prevItem, boolean animation) {
public void setDashboardVisibility(boolean visible, DashboardType type, DashboardType prevItem, boolean animation, int[] animationCoordinates) {
if (visible == this.visible && type == visibleType) {
return;
}
@ -868,7 +877,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
updateToolbarActions();
//fabButton.showFloatingActionButton();
open(dashboardView.findViewById(R.id.animateContent), animation);
open(dashboardView.findViewById(R.id.animateContent), animation, animationCoordinates);
updateLocation(true, true, false);
// addOrUpdateDashboardFragments();
mapActivity.getRoutingHelper().addListener(this);
@ -1121,7 +1130,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
if (btn != null && btn.getVisibility() == View.VISIBLE) {
btn.setChecked(!btn.isChecked());
} else {
if (click.onContextMenuClick(listAdapter, item.getTitleId(), which, false)) {
if (click.onContextMenuClick(listAdapter, item.getTitleId(), which, false, null)) {
hideDashboard();
}
}
@ -1202,51 +1211,58 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
// To animate view slide out from right to left
private void open(View view, boolean animation) {
private void open(final View view, boolean animation, int[] animationCoordinates) {
if (animation) {
TranslateAnimation animate = new TranslateAnimation(-mapActivity.findViewById(R.id.MapHudButtonsOverlay)
.getWidth(), 0, 0, 0);
animate.setDuration(500);
animate.setFillAfter(true);
view.startAnimation(animate);
view.setVisibility(View.VISIBLE);
AnimatorSet set = new AnimatorSet();
List<Animator> animators = new ArrayList<>();
if (animationCoordinates != null) {
int screenHeight = mapActivity.getResources().getDisplayMetrics().heightPixels;
int screenWidth = mapActivity.getResources().getDisplayMetrics().widthPixels;
animators.add(ObjectAnimator.ofFloat(view, View.TRANSLATION_X, animationCoordinates[0] - screenWidth / 2, 0));
animators.add(ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, animationCoordinates[1] - screenHeight / 2, 0));
}
animators.add(ObjectAnimator.ofFloat(view, View.ALPHA, 0f, 1f));
animators.add(ObjectAnimator.ofFloat(view, View.SCALE_X, 0.2f, 1f));
animators.add(ObjectAnimator.ofFloat(view, View.SCALE_Y, 0.2f, 1f));
set.setDuration(300).playTogether(animators);
set.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
view.setVisibility(View.VISIBLE);
}
});
set.start();
} else {
view.setVisibility(View.VISIBLE);
}
}
private void hide(View view, boolean animation) {
private void hide(final View view, boolean animation) {
if (compassButton != null) {
mapActivity.getMapLayers().getMapControlsLayer().restoreCompassButton(nightMode);
compassButton = null;
}
if (!animation) {
dashboardView.setVisibility(View.GONE);
view.setVisibility(View.GONE);
} else {
TranslateAnimation animate = new TranslateAnimation(0, -mapActivity.findViewById(R.id.MapHudButtonsOverlay)
.getWidth(), 0, 0);
animate.setDuration(500);
animate.setFillAfter(true);
animate.setAnimationListener(new AnimationListener() {
AnimatorSet set = new AnimatorSet();
set.setDuration(300).playTogether(
ObjectAnimator.ofFloat(view, View.ALPHA, 1f, 0f),
ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, 0, view.getHeight())
);
set.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationRepeat(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
dashboardView.setVisibility(View.GONE);
view.setVisibility(View.GONE);
view.setTranslationY(0);
}
});
view.startAnimation(animate);
set.start();
}
view.setVisibility(View.GONE);
}

View file

@ -61,7 +61,7 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin {
.setIcon(R.drawable.ic_action_gabout_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
final Intent mapIntent = new Intent(mapActivity, ContributionVersionActivity.class);
mapActivity.startActivityForResult(mapIntent, 0);
return true;

View file

@ -157,13 +157,13 @@ public class ConfigureMapMenu {
adapter.notifyDataSetChanged();
return false;
} else {
return onContextMenuClick(adapter, itemId, pos, false);
return onContextMenuClick(adapter, itemId, pos, false, null);
}
}
}
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter, int itemId, final int pos, boolean isChecked) {
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter, int itemId, final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandSettings settings = ma.getMyApplication().getSettings();
final PoiFiltersHelper poiFiltersHelper = ma.getMyApplication().getPoiFilters();
final ContextMenuItem item = cm.getItem(pos);
@ -331,14 +331,14 @@ public class ConfigureMapMenu {
adapter.notifyDataSetChanged();
return false;
} else {
return onContextMenuClick(adapter, itemId, position, false);
return onContextMenuClick(adapter, itemId, position, false, null);
}
}
}
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> ad, int itemId,
final int pos, boolean isChecked) {
final int pos, boolean isChecked, int[] viewCoordinates) {
if (transportSelectedInner) {
for (int i = 0; i < transportPrefs.size(); i++) {
transportPrefs.get(i).set(false);
@ -499,7 +499,7 @@ public class ConfigureMapMenu {
.setIcon(R.drawable.ic_map).setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> ad, int itemId,
final int pos, boolean isChecked) {
final int pos, boolean isChecked, int[] viewCoordinates) {
AlertDialog.Builder bld = new AlertDialog.Builder(activity);
bld.setTitle(R.string.renderers);
final OsmandApplication app = activity.getMyApplication();
@ -552,7 +552,7 @@ public class ConfigureMapMenu {
.setIcon(getDayNightIcon(activity)).setListener(new ItemClickListener() {
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> ad, int itemId,
final int pos, boolean isChecked) {
final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandMapTileView view = activity.getMapView();
AlertDialog.Builder bld = new AlertDialog.Builder(view.getContext());
bld.setTitle(R.string.daynight);
@ -588,7 +588,7 @@ public class ConfigureMapMenu {
.setIcon(R.drawable.ic_action_map_magnifier).setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> ad, int itemId,
final int pos, boolean isChecked) {
final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandMapTileView view = activity.getMapView();
final OsmandSettings.OsmandPreference<Float> mapDensity = view.getSettings().MAP_DENSITY;
final AlertDialog.Builder bld = new AlertDialog.Builder(view.getContext());
@ -651,7 +651,7 @@ public class ConfigureMapMenu {
.setIcon(R.drawable.ic_action_map_text_size).setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> ad, int itemId,
final int pos, boolean isChecked) {
final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandMapTileView view = activity.getMapView();
AlertDialog.Builder b = new AlertDialog.Builder(view.getContext());
// test old descr as title
@ -690,7 +690,7 @@ public class ConfigureMapMenu {
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> ad, int itemId,
final int pos, boolean isChecked) {
final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandMapTileView view = activity.getMapView();
final AlertDialog.Builder b = new AlertDialog.Builder(view.getContext());
@ -889,7 +889,7 @@ public class ConfigureMapMenu {
final ItemClickListener clickListener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> a, int itemId, int pos,
boolean isChecked) {
boolean isChecked, int[] viewCoordinates) {
if (!isChecked && !useDescription) {
if (defaultSettings != null) {
defaultSettings.set("");
@ -939,8 +939,8 @@ public class ConfigureMapMenu {
} else {
builder.setListener(new OnRowItemClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> a, int itemId, int pos, boolean isChecked) {
return clickListener.onContextMenuClick(a, itemId, pos, isChecked);
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> a, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
return clickListener.onContextMenuClick(a, itemId, pos, isChecked, null);
}
@Override
@ -1210,7 +1210,7 @@ public class ConfigureMapMenu {
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
pref.set(!pref.get());
refreshMapComplete(activity);
return false;
@ -1233,7 +1233,7 @@ public class ConfigureMapMenu {
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> ad,
final int itemId, final int pos, boolean isChecked) {
final int itemId, final int pos, boolean isChecked, int[] viewCoordinates) {
AlertDialog.Builder b = new AlertDialog.Builder(view.getContext());
// test old descr as title
b.setTitle(propertyDescr);

View file

@ -99,7 +99,7 @@ public class RasterMapMenu {
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter,
final int itemId, final int pos, final boolean isChecked) {
final int itemId, final int pos, final boolean isChecked, int[] viewCoordinates) {
if (itemId == toggleActionStringId) {
app.runInUIThread(new Runnable() {
@Override

View file

@ -658,7 +658,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
if (itemId == R.string.delete_point) {
for (int i = 0; i < measurementPoints.size(); i++) {
Iterator<WptPt> it = measurementPoints.get(i).iterator();

View file

@ -166,7 +166,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
ContextMenuItem item = adapter.getItem(which);
if (item.getItemClickListener() != null) {
item.getItemClickListener().onContextMenuClick(null,
item.getTitleId(), which, false);
item.getTitleId(), which, false, null);
}
}
@ -178,7 +178,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
private void basicFileOperation(final LocalIndexInfo info, ContextMenuAdapter adapter) {
ItemClickListener listener = new ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked, int[] viewCoordinates) {
return performBasicOperation(resId, info);
}
};
@ -619,7 +619,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter,
int itemId, int pos, boolean isChecked) {
int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
localOptionsMenu(itemId);
return true;
}
@ -681,7 +681,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
for (int i = 0; i < optionsMenuAdapter.length(); i++) {
ContextMenuItem contextMenuItem = optionsMenuAdapter.getItem(i);
if (itemId == contextMenuItem.getTitleId()) {
contextMenuItem.getItemClickListener().onContextMenuClick(null, itemId, i, false);
contextMenuItem.getItemClickListener().onContextMenuClick(null, itemId, i, false, null);
return true;
}
}

View file

@ -14,6 +14,7 @@ import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.CompoundButton;
import net.osmand.AndroidUtils;
import net.osmand.map.ITileSource;
import net.osmand.map.TileSourceManager;
import net.osmand.plus.ApplicationMode;
@ -150,14 +151,14 @@ public class MapillaryPlugin extends OsmandPlugin {
@Override
public boolean onRowItemClick(ArrayAdapter<ContextMenuItem> adapter, View view, int itemId, int position) {
if (itemId == R.string.mapillary) {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.MAPILLARY);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.MAPILLARY, AndroidUtils.getViewLocation(view));
return false;
}
return true;
}
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter, int itemId, final int pos, boolean isChecked) {
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter, int itemId, final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandSettings settings = mapActivity.getMyApplication().getSettings();
if (itemId == R.string.mapillary) {
OsmandMapTileView mapView = mapActivity.getMapView();

View file

@ -15,7 +15,6 @@ import net.osmand.data.LatLon;
import net.osmand.plus.IconsCache;
import net.osmand.plus.MapMarkersHelper;
import net.osmand.plus.MapMarkersHelper.MapMarker;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dashboard.DashLocationFragment;
@ -46,7 +45,7 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
this.mapActivity = mapActivity;
markers = mapActivity.getMyApplication().getMapMarkersHelper().getMapMarkers();
night = !mapActivity.getMyApplication().getSettings().isLightContent();
showDirectionEnabled = mapActivity.getMyApplication().getSettings().MAP_MARKERS_MODE.get() != OsmandSettings.MapMarkersMode.NONE;
showDirectionEnabled = mapActivity.getMyApplication().getSettings().MARKERS_DISTANCE_INDICATION_ENABLED.get();
}
public void setShowDirectionEnabled(boolean showDirectionEnabled) {

View file

@ -17,7 +17,6 @@ import net.osmand.plus.MapMarkersHelper.MapMarker;
import net.osmand.plus.MapMarkersHelper.MapMarkersGroup;
import net.osmand.plus.MapMarkersHelper.ShowHideHistoryButton;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dashboard.DashLocationFragment;
@ -67,7 +66,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
}
public void updateShowDirectionMarkers() {
showDirectionEnabled = app.getSettings().MAP_MARKERS_MODE.get() != OsmandSettings.MapMarkersMode.NONE;
showDirectionEnabled = app.getSettings().MARKERS_DISTANCE_INDICATION_ENABLED.get();
List<MapMarker> mapMarkers = app.getMapMarkersHelper().getMapMarkers();
int markersCount = mapMarkers.size();
showDirectionMarkers = new ArrayList<>(mapMarkers.subList(0, getToIndex(markersCount)));

View file

@ -450,7 +450,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
optionsMenuAdapter = new ContextMenuAdapter();
ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, final int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, final int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
if (itemId == R.string.local_index_mi_reload) {
reloadTracks();
} else if (itemId == R.string.shared_string_show_on_map) {
@ -521,7 +521,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
for (int i = 0; i < optionsMenuAdapter.length(); i++) {
ContextMenuItem contextMenuItem = optionsMenuAdapter.getItem(i);
if (itemId == contextMenuItem.getTitleId()) {
contextMenuItem.getItemClickListener().onContextMenuClick(null, itemId, i, false);
contextMenuItem.getItemClickListener().onContextMenuClick(null, itemId, i, false, null);
return true;
}
}

View file

@ -173,7 +173,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
final Object selectedObj) {
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked, int[] viewCoordinates) {
if (resId == R.string.context_menu_item_create_poi) {
//getPoiActions(mapActivity).showCreateDialog(latitude, longitude);
EditPoiDialogFragment editPoiDialogFragment =
@ -273,7 +273,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
if (itemId == R.string.layer_osm_bugs) {
OsmandSettings.OsmandPreference<Boolean> showOsmBugs = settings.SHOW_OSM_BUGS;
showOsmBugs.set(isChecked);
@ -303,7 +303,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
sendGPXFiles(la, (AvailableGPXFragment) fragment, (GpxInfo) info);
return true;
}
@ -321,7 +321,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
.setListener(new ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
f.openSelectionMode(R.string.local_index_mi_upload_gpx, R.drawable.ic_action_export,
R.drawable.ic_action_export, new OnClickListener() {
@Override

View file

@ -315,7 +315,9 @@ public class OsmEditsFragment extends OsmAndListFragment implements SendPoiDialo
private void enableSelectionMode(boolean selectionMode) {
listAdapter.setSelectionMode(selectionMode);
//noinspection ConstantConditions
getView().findViewById(R.id.check_box).setVisibility(selectionMode ? View.VISIBLE : View.GONE);
if (headerView != null) {
headerView.findViewById(R.id.check_box).setVisibility(selectionMode ? View.VISIBLE : View.GONE);
}
((FavoritesActivity) getActivity()).setToolbarVisibility(!selectionMode && AndroidUiHelper.isOrientationPortrait(getActivity()));
((FavoritesActivity) getActivity()).updateListViewFooter(footerView);
}

View file

@ -282,7 +282,7 @@ public class OsMoPlugin extends OsmandPlugin implements OsMoReactor {
.setIcon(R.drawable.ic_osmo_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
Intent intent = new Intent(mapActivity, OsMoGroupsActivity.class);
mapActivity.startActivity(intent);
return true;

View file

@ -220,7 +220,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
ItemClickListener addListener = new ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId,
int pos, boolean isChecked) {
int pos, boolean isChecked, int[] viewCoordinates) {
if (resId == R.string.context_menu_item_add_parking_point) {
showAddParkingDialog(mapActivity, latitude, longitude);
}

View file

@ -15,6 +15,7 @@ import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;
import net.osmand.AndroidUtils;
import net.osmand.IndexConstants;
import net.osmand.ResultMatcher;
import net.osmand.StateChangedListener;
@ -241,18 +242,19 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.OnRowItemClick() {
@Override
public boolean onRowItemClick(ArrayAdapter<ContextMenuItem> adapter, View view, int itemId, int position) {
int[] viewCoordinates = AndroidUtils.getViewLocation(view);
if (itemId == R.string.layer_overlay) {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.OVERLAY_MAP);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.OVERLAY_MAP, viewCoordinates);
return false;
} else if (itemId == R.string.layer_underlay) {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.UNDERLAY_MAP);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.UNDERLAY_MAP, viewCoordinates);
return false;
}
return true;
}
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter, int itemId, final int pos, boolean isChecked) {
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter, int itemId, final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandSettings settings = mapActivity.getMyApplication().getSettings();
switch (itemId) {
case R.string.layer_overlay:
@ -346,7 +348,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
if (mapView.getMainLayer() instanceof MapTileLayer) {
ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked, int[] viewCoordinates) {
if (resId == R.string.context_menu_item_update_map) {
mapActivity.getMapActions().reloadTile(mapView.getZoom(), latitude, longitude);
} else if (resId == R.string.shared_string_download_map) {

View file

@ -88,7 +88,7 @@ public class RoutePointsLayer extends OsmandMapLayer implements ContextMenuLaye
final GPXUtilities.WptPt point = (GPXUtilities.WptPt) o;
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
if (itemId == R.string.mark_as_not_visited){
plugin.getCurrentRoute().markPoint(point,false);
plugin.saveCurrentRoute();

View file

@ -96,7 +96,7 @@ public class ContourLinesMenu {
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter,
final int itemId, final int pos, final boolean isChecked) {
final int itemId, final int pos, final boolean isChecked, int[] viewCoordinates) {
if (itemId == toggleActionStringId) {
app.runInUIThread(new Runnable() {
@Override
@ -268,7 +268,7 @@ public class ContourLinesMenu {
.setIcon(DownloadActivityType.SRTM_COUNTRY_FILE.getIconResource())
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked, int[] viewCoordinates) {
ContextMenuItem item = adapter.getItem(position);
if (downloadThread.isDownloading(indexItem)) {
downloadThread.cancelDownload(indexItem);

View file

@ -56,7 +56,7 @@ public class HillshadeMenu {
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter,
final int itemId, final int pos, final boolean isChecked) {
final int itemId, final int pos, final boolean isChecked, int[] viewCoordinates) {
if (itemId == toggleActionStringId) {
app.runInUIThread(new Runnable() {
@Override
@ -146,7 +146,7 @@ public class HillshadeMenu {
.setIcon(DownloadActivityType.HILLSHADE_FILE.getIconResource())
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked, int[] viewCoordinates) {
ContextMenuItem item = adapter.getItem(position);
if (downloadThread.isDownloading(indexItem)) {
downloadThread.cancelDownload(indexItem);

View file

@ -7,6 +7,7 @@ import android.support.v7.app.AlertDialog;
import android.view.View;
import android.widget.ArrayAdapter;
import net.osmand.AndroidUtils;
import net.osmand.plus.ApplicationMode;
import net.osmand.plus.ContextMenuAdapter;
import net.osmand.plus.ContextMenuItem;
@ -129,11 +130,12 @@ public class SRTMPlugin extends OsmandPlugin {
@Override
public boolean onRowItemClick(ArrayAdapter<ContextMenuItem> adapter, View view, int itemId, int position) {
int[] viewCoordinates = AndroidUtils.getViewLocation(view);
if (itemId == R.string.srtm_plugin_name) {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.CONTOUR_LINES);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.CONTOUR_LINES, viewCoordinates);
return false;
} else if (itemId == R.string.layer_hillshade) {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.HILLSHADE);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.HILLSHADE, viewCoordinates);
return false;
}
return true;
@ -143,7 +145,8 @@ public class SRTMPlugin extends OsmandPlugin {
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter,
final int itemId,
final int position,
final boolean isChecked) {
final boolean isChecked,
final int[] viewCoordinates) {
if (itemId == R.string.srtm_plugin_name) {
toggleContourLines(mapActivity, isChecked, new Runnable() {
@Override

View file

@ -242,7 +242,7 @@ public class ContextMenuLayer extends OsmandMapLayer {
if (menu.hasHiddenBottomInfo()) {
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
menu.openMenuFullScreen();
return true;
}
@ -256,7 +256,7 @@ public class ContextMenuLayer extends OsmandMapLayer {
if (isObjectMoveable(o)) {
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
RotatedTileBox tileBox = activity.getMapView().getCurrentRotatedTileBox();
enterMovingMode(tileBox);
return true;

View file

@ -218,7 +218,7 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
if (itemId == R.string.avoid_road) {
activity.getMyApplication().getAvoidSpecificRoads().addImpassableRoad(
activity, latLon, false, null, false);

View file

@ -249,7 +249,7 @@ public class MapControlsLayer extends OsmandMapLayer {
@Override
public void onClick(View v) {
MapActivity.clearPrevActivityIntent();
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_MAP);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_MAP, AndroidUtils.getViewLocation(v));
}
});
@ -410,7 +410,7 @@ public class MapControlsLayer extends OsmandMapLayer {
public void onClick(View v) {
MapActivity.clearPrevActivityIntent();
if (dash) {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.DASHBOARD);
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.DASHBOARD, AndroidUtils.getViewLocation(v));
} else {
mapActivity.openDrawer();
}

View file

@ -10,6 +10,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import net.osmand.AndroidUtils;
import net.osmand.Location;
import net.osmand.binary.RouteDataObject;
import net.osmand.data.LatLon;
@ -881,7 +882,7 @@ public class MapInfoWidgetsFactory {
all.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
map.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS);
map.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS, AndroidUtils.getViewLocation(view));
}
});
remove.setOnClickListener(new OnClickListener() {

View file

@ -326,7 +326,7 @@ public class MapWidgetRegistry {
.setDescription(settings.MAP_MARKERS_MODE.get().toHumanString(map))
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter, int itemId, final int position, boolean isChecked) {
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter, int itemId, final int position, boolean isChecked, int[] viewCoordinates) {
DirectionIndicationDialogFragment fragment = new DirectionIndicationDialogFragment();
fragment.setListener(new DirectionIndicationDialogFragment.DirectionIndicationFragmentListener() {
@Override
@ -418,7 +418,7 @@ public class MapWidgetRegistry {
.setSecondaryIcon( R.drawable.ic_action_additional_option)
.setListener(new ContextMenuAdapter.OnRowItemClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked) {
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked, int[] viewCoordinates) {
setVisibility(adapter, position, isChecked);
return false;
}
@ -557,7 +557,7 @@ public class MapWidgetRegistry {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> a,
int itemId, int pos, boolean isChecked) {
int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
setVisibility(a, pos, isChecked, false);
return false;
}
@ -780,7 +780,7 @@ public class MapWidgetRegistry {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> a,
int itemId, int pos, boolean isChecked) {
int itemId, int pos, boolean isChecked, int[] viewCoordinates) {
pref.set(!pref.get());
map.updateApplicationModeSettings();
a.notifyDataSetChanged();