mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-28 17:03:38 +00:00
Compare commits
50 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0eafe3482e | ||
|
|
e4275cdd3c | ||
|
|
4ef9395442 | ||
|
|
30cf2b5770 | ||
|
|
6aed26c48e | ||
|
|
dad91b82a6 | ||
|
|
7024aace6f | ||
|
|
6291133a69 | ||
|
|
1c5121d447 | ||
|
|
4398e492b8 | ||
|
|
1907e039e3 | ||
|
|
26bad5dffb | ||
|
|
4f2b479b2c | ||
|
|
a972552155 | ||
|
|
dc54c45482 | ||
|
|
1975b6a0f0 | ||
|
|
8683853f46 | ||
|
|
d7e34c2685 | ||
|
|
0028306b26 | ||
|
|
b5354fd1e3 | ||
|
|
964f82510a | ||
|
|
faf49fc574 | ||
|
|
60b1ad232a | ||
|
|
1bac0fd4fc | ||
|
|
ed6dcc5cb2 | ||
|
|
33b440dd71 | ||
|
|
6a20269819 | ||
|
|
8cd1b41cd2 | ||
|
|
2b630964d0 | ||
|
|
76ecd8209e | ||
|
|
82d2932ba0 | ||
|
|
85540133b3 | ||
|
|
6ded75de9c | ||
|
|
08e8ebd434 | ||
|
|
6c92264fb0 | ||
|
|
4ba0fc51a5 | ||
|
|
29c363a581 | ||
|
|
4973f4fed2 | ||
|
|
8cffa508f3 | ||
|
|
3511dbb692 | ||
|
|
e238a317f1 | ||
|
|
2e85899fcb | ||
|
|
ce978d8ede | ||
|
|
d56f9700f5 | ||
|
|
cc042c3d1c | ||
|
|
4f739d98b0 | ||
|
|
4691de7a66 | ||
|
|
3c082b0629 | ||
|
|
a468bd3fab | ||
|
|
fc87316184 |
@@ -1,69 +1,55 @@
|
|||||||
# All non-assigned.
|
|
||||||
* @organicmaps/mergers
|
|
||||||
# Visual design.
|
# Visual design.
|
||||||
/android/app/src/main/res/drawable*/ @organicmaps/design
|
/android/app/src/main/res/drawable*/ @comaps/design
|
||||||
/android/app/src/main/res/font/ @organicmaps/design
|
/android/app/src/main/res/font/ @comaps/design
|
||||||
/android/app/src/main/res/mipmap*/ @organicmaps/design
|
/android/app/src/main/res/mipmap*/ @comaps/design
|
||||||
/data/*.ttf @organicmaps/design
|
/data/*.ttf @comaps/design
|
||||||
/data/resources-svg/ @organicmaps/design
|
/data/resources-svg/ @comaps/design
|
||||||
/data/search-icons/ @organicmaps/design
|
/data/search-icons/ @comaps/design
|
||||||
/iphone/Maps/Images.xcassets/ @organicmaps/design
|
/iphone/Maps/Images.xcassets/ @comaps/design
|
||||||
# Android.
|
# Android.
|
||||||
/android/ @organicmaps/android
|
/android/ @comaps/android
|
||||||
/android/app/src/main/java/app/organicmaps/car/ @organicmaps/android-auto
|
/android/app/src/main/java/app/comaps/car/ @comaps/android-auto
|
||||||
/docs/ANDROID_LOCATION_TEST.md @organicmaps/android
|
/docs/ANDROID_LOCATION_TEST.md @comaps/android
|
||||||
/docs/JAVA_STYLE.md @organicmaps/android
|
/docs/JAVA_STYLE.md @comaps/android
|
||||||
# no owner for translation changes
|
# no owner for translation changes
|
||||||
/android/app/src/main/res/values*/strings.xml
|
/android/app/src/main/res/values*/strings.xml
|
||||||
# iOS.
|
# iOS.
|
||||||
/iphone/ @organicmaps/ios
|
/iphone/ @comaps/ios
|
||||||
/xcode/ @organicmaps/ios
|
/xcode/ @comaps/ios
|
||||||
/docs/OBJC_STYLE.md @organicmaps/ios
|
/docs/OBJC_STYLE.md @comaps/ios
|
||||||
# no owner for translation changes
|
# no owner for translation changes
|
||||||
/iphone/plist.txt
|
/iphone/plist.txt
|
||||||
/iphone/Maps/LocalizedStrings/
|
/iphone/Maps/LocalizedStrings/
|
||||||
# Qt
|
|
||||||
/qt/ @organicmaps/qt
|
|
||||||
# Rendering
|
|
||||||
/drape/ @organicmaps/rendering
|
|
||||||
/drape_frontend/ @organicmaps/rendering
|
|
||||||
# Map Data.
|
|
||||||
/tools/python/maps_generator/ @organicmaps/data
|
|
||||||
/generator/ @organicmaps/data
|
|
||||||
/topography_generator/ @organicmaps/data
|
|
||||||
/data/borders/ @organicmaps/data
|
|
||||||
/data/conf/isolines/ @organicmaps/data
|
|
||||||
/docs/SUBWAY_GENERATION.md @organicmaps/data
|
|
||||||
/docs/MAPS.md @organicmaps/data
|
|
||||||
/docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md @organicmaps/data
|
|
||||||
# no owner (changed often to add a new POI)
|
# no owner (changed often to add a new POI)
|
||||||
/generator/generator_tests/osm_type_test.cpp
|
/generator/generator_tests/osm_type_test.cpp
|
||||||
# Map Styles.
|
# Map Styles.
|
||||||
/data/styles/ @organicmaps/styles
|
/data/styles/ @comaps/styles
|
||||||
/data/types.txt @organicmaps/styles
|
/data/types.txt @comaps/styles
|
||||||
/data/visibility.txt @organicmaps/styles
|
/data/visibility.txt @comaps/styles
|
||||||
/data/mapcss-mapping.csv @organicmaps/styles
|
/data/mapcss-mapping.csv @comaps/styles
|
||||||
/data/replaced_tags.txt @organicmaps/styles
|
/data/replaced_tags.txt @comaps/styles
|
||||||
/data/classificator.txt @organicmaps/styles
|
/data/classificator.txt @comaps/styles
|
||||||
/data/drules_* @organicmaps/styles
|
/data/drules_* @comaps/styles
|
||||||
/docs/STYLES.md
|
/docs/STYLES.md
|
||||||
/tools/kothic/ @organicmaps/styles
|
/tools/kothic/ @comaps/styles
|
||||||
# DevOps.
|
# DevOps.
|
||||||
/.forgejo/workflows @organicmaps/devops
|
/.forgejo/workflows @comaps/devops
|
||||||
/android/*gradle* @organicmaps/devops
|
/android/*gradle* @comaps/devops
|
||||||
/docs/RELEASE_MANAGEMENT.md @organicmaps/devops
|
/docs/RELEASE_MANAGEMENT.md @comaps/devops
|
||||||
/xcode/fastlane/ @organicmaps/devops
|
/xcode/fastlane/ @comaps/devops
|
||||||
# Growth.
|
/tools/python/maps_generator/ @comaps/devops
|
||||||
README.md @organicmaps/growth
|
/generator/ @comaps/devops
|
||||||
/.forgejo/FUNDING.yml @organicmaps/growth
|
/topography_generator/ @comaps/devops
|
||||||
/android/app/src/fdroid/play/ @organicmaps/growth
|
/data/borders/ @comaps/devops
|
||||||
/android/app/src/google/play/ @organicmaps/growth
|
/data/conf/isolines/ @comaps/devops
|
||||||
/iphone/metadata/ @organicmaps/growth
|
/docs/SUBWAY_GENERATION.md @comaps/devops
|
||||||
|
/docs/MAPS.md @comaps/devops
|
||||||
|
/docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md @comaps/devops
|
||||||
# Legal.
|
# Legal.
|
||||||
LEGAL @organicmaps/legal
|
LEGAL @comaps/admins
|
||||||
LICENSE @organicmaps/legal
|
LICENSE @comaps/admins
|
||||||
NOTICE @organicmaps/legal
|
NOTICE @comaps/admins
|
||||||
CONTRIBUTORS @organicmaps/legal
|
CONTRIBUTORS @comaps/admins
|
||||||
/docs/CODE_OF_CONDUCT.md @organicmaps/legal
|
/docs/CODE_OF_CONDUCT.md @comaps/admins
|
||||||
/docs/DCO.md @organicmaps/legal
|
/docs/DCO.md @comaps/admins
|
||||||
/docs/GOVERNANCE.md @organicmaps/legal
|
/docs/GOVERNANCE.md @comaps/admins
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
open_collective: comaps
|
open_collective: comaps
|
||||||
|
liberapay: comaps
|
||||||
|
custom: ["https://comaps.app/donate/"]
|
||||||
|
|||||||
@@ -2,5 +2,3 @@
|
|||||||
480fa6c2fcf53be296504ac6ba8e6b3d70f92b42
|
480fa6c2fcf53be296504ac6ba8e6b3d70f92b42
|
||||||
a6ede2b1466f0c9d8a443600ef337ba6b5832e58
|
a6ede2b1466f0c9d8a443600ef337ba6b5832e58
|
||||||
1377b81bf1cac72bb6da192da7fed6696d5d5281
|
1377b81bf1cac72bb6da192da7fed6696d5d5281
|
||||||
0288b97b1367bb971eded1018f560598ea274e6c
|
|
||||||
bf30165b5f5de0907c3c64524a3bf8121624b0b7
|
|
||||||
|
|||||||
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
open_collective: comaps
|
||||||
|
liberapay: comaps
|
||||||
|
custom: ["https://comaps.app/donate/"]
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -155,6 +155,8 @@ android/huawei-appgallery.json
|
|||||||
android/res/xml/network_security_config.xml
|
android/res/xml/network_security_config.xml
|
||||||
./server/
|
./server/
|
||||||
iphone/Maps/app.omaps/
|
iphone/Maps/app.omaps/
|
||||||
|
# Generated file
|
||||||
|
libs/indexer/localized_types_map.cpp
|
||||||
|
|
||||||
*.li
|
*.li
|
||||||
|
|
||||||
|
|||||||
@@ -1,83 +0,0 @@
|
|||||||
///////////////////////// ankerl::unordered_dense::{map, set} /////////////////////////
|
|
||||||
|
|
||||||
// A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion.
|
|
||||||
// Version 4.8.1
|
|
||||||
// https://github.com/martinus/unordered_dense
|
|
||||||
//
|
|
||||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
// Copyright (c) 2022 Martin Leitner-Ankerl <martin.ankerl@gmail.com>
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
|
||||||
// in the Software without restriction, including without limitation the rights
|
|
||||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
// copies of the Software, and to permit persons to whom the Software is
|
|
||||||
// furnished to do so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
// SOFTWARE.
|
|
||||||
|
|
||||||
#ifndef ANKERL_STL_H
|
|
||||||
#define ANKERL_STL_H
|
|
||||||
|
|
||||||
#include <array> // for array
|
|
||||||
#include <cstdint> // for uint64_t, uint32_t, std::uint8_t, UINT64_C
|
|
||||||
#include <cstring> // for size_t, memcpy, memset
|
|
||||||
#include <functional> // for equal_to, hash
|
|
||||||
#include <initializer_list> // for initializer_list
|
|
||||||
#include <iterator> // for pair, distance
|
|
||||||
#include <limits> // for numeric_limits
|
|
||||||
#include <memory> // for allocator, allocator_traits, shared_ptr
|
|
||||||
#include <optional> // for optional
|
|
||||||
#include <stdexcept> // for out_of_range
|
|
||||||
#include <string> // for basic_string
|
|
||||||
#include <string_view> // for basic_string_view, hash
|
|
||||||
#include <tuple> // for forward_as_tuple
|
|
||||||
#include <type_traits> // for enable_if_t, declval, conditional_t, ena...
|
|
||||||
#include <utility> // for forward, exchange, pair, as_const, piece...
|
|
||||||
#include <vector> // for vector
|
|
||||||
|
|
||||||
// <memory_resource> includes <mutex>, which fails to compile if
|
|
||||||
// targeting GCC >= 13 with the (rewritten) win32 thread model, and
|
|
||||||
// targeting Windows earlier than Vista (0x600). GCC predefines
|
|
||||||
// _REENTRANT when using the 'posix' model, and doesn't when using the
|
|
||||||
// 'win32' model.
|
|
||||||
#if defined __MINGW64__ && defined __GNUC__ && __GNUC__ >= 13 && !defined _REENTRANT
|
|
||||||
// _WIN32_WINNT is guaranteed to be defined here because of the
|
|
||||||
// <cstdint> inclusion above.
|
|
||||||
# ifndef _WIN32_WINNT
|
|
||||||
# error "_WIN32_WINNT not defined"
|
|
||||||
# endif
|
|
||||||
# if _WIN32_WINNT < 0x600
|
|
||||||
# define ANKERL_MEMORY_RESOURCE_IS_BAD() 1 // NOLINT(cppcoreguidelines-macro-usage)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#ifndef ANKERL_MEMORY_RESOURCE_IS_BAD
|
|
||||||
# define ANKERL_MEMORY_RESOURCE_IS_BAD() 0 // NOLINT(cppcoreguidelines-macro-usage)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__has_include) && !defined(ANKERL_UNORDERED_DENSE_DISABLE_PMR)
|
|
||||||
# if __has_include(<memory_resource>) && !ANKERL_MEMORY_RESOURCE_IS_BAD()
|
|
||||||
# define ANKERL_UNORDERED_DENSE_PMR std::pmr // NOLINT(cppcoreguidelines-macro-usage)
|
|
||||||
# include <memory_resource> // for polymorphic_allocator
|
|
||||||
# elif __has_include(<experimental/memory_resource>)
|
|
||||||
# define ANKERL_UNORDERED_DENSE_PMR std::experimental::pmr // NOLINT(cppcoreguidelines-macro-usage)
|
|
||||||
# include <experimental/memory_resource> // for polymorphic_allocator
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(_M_X64)
|
|
||||||
# include <intrin.h>
|
|
||||||
# pragma intrinsic(_umul128)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@ CoMaps contributors:
|
|||||||
Bastian Greshake Tzovaras
|
Bastian Greshake Tzovaras
|
||||||
clover sage
|
clover sage
|
||||||
Harry Bond <me@hbond.xyz>
|
Harry Bond <me@hbond.xyz>
|
||||||
|
NoelClick
|
||||||
thesupertechie
|
thesupertechie
|
||||||
vikiawv
|
vikiawv
|
||||||
Yannik Bloscheck
|
Yannik Bloscheck
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
• OpenStreetMap-Daten vom 9. Dezember
|
• OpenStreetMap Daten vom 17. Dezember
|
||||||
• Material 3 Design
|
• Map download server nun wählbar
|
||||||
• Im OSM-Editor können nun Ladestationen hinzugefügt werden
|
• Warnung über veraltete Karten hinzugefügt + Knopf zum updaten
|
||||||
• Schuko und Typ E Ladestationen hinzugefügt
|
• Vermeidung von Parkplatzwegen im Routing
|
||||||
• Verbesserte Suchvorschläge
|
• Neuer Zoombutton
|
||||||
• Litauische und lettische Sprachankündigungen
|
• Verbesserte Französchische Suchsynonme
|
||||||
• Die Fahranweisungen wurden vergrößert
|
• OSM editor: Maximale Länge für OSM-Tags werden nun geprüft
|
||||||
• Der Zoomlevel passt sich an die Distanz zur nächsten Abbiegung an
|
Mehr auf codeberg.org/comaps/comaps/releases
|
||||||
• Neue Anordnung der Einstellungen
|
|
||||||
Weitere Einzelheiten auf codeberg.org/comaps/comaps/releases
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
• OpenStreetMap data as of December 9
|
• OpenStreetMap data as of December 17
|
||||||
• Use Material 3 themes
|
• Make map download server configurable
|
||||||
• Support charging sockets in OSM Editor
|
• Added info about outdated maps and an update button to the selected place info card
|
||||||
• Added schuko/type-E charge sockets
|
• Avoid using parking aisles for routing
|
||||||
• Improved search results ranking
|
• Changed shape of zoom buttons
|
||||||
• Enabled Lithuanian and Latvian in voice announcements
|
• Improved French search synonyms
|
||||||
• Improved size of driving indications
|
• OSM editor: check length limit for OSM tags in value validation
|
||||||
• Base zoom level on distance to next turn
|
|
||||||
• Reordered settings
|
|
||||||
More details on codeberg.org/comaps/comaps/releases
|
More details on codeberg.org/comaps/comaps/releases
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
• Datos de OpenStreetMap a fecha 9/12.
|
|
||||||
• Uso de temas Material 3.
|
|
||||||
• Compatibilidad con enchufes de recarga en Editor.
|
|
||||||
• Se añaden enchufes de recarga schuko/tipo E.
|
|
||||||
• Se mejora la búsqueda.
|
|
||||||
• Se habilitan el lituano y el letón en las indicaciones de voz.
|
|
||||||
• Se aumenta el tamaño de las indicaciones de conducción.
|
|
||||||
• Nivel de zoom base según la distancia al siguiente giro.
|
|
||||||
• Se han reordenado los ajustes.
|
|
||||||
|
|
||||||
Más detalles en codeberg.org/comaps/comaps/releases
|
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
• Données OpenStreetMap du 9 Décembre
|
• Données OpenStreetMap du 17 décembre
|
||||||
• Utilisation de Material 3
|
• Serveur de téléchargement de cartes configurable
|
||||||
• Support de l'édition des bornes de recharge dans l'éditeur OSM
|
• Ajout d'un message d'avertissement pour les cartes trop anciennes
|
||||||
• Ajout du type de prise schuko/type-E
|
• Évitement des allées de parking dans les itinéraires
|
||||||
• Amélioration de l'ordre des résultats de recherche
|
• Mise à jour de l'apparence des boutons de zooms
|
||||||
• Ajout du lituanien et du letton dans le guidage vocal
|
• Amélioration des synonymes de recherche en français
|
||||||
• Amélioration de la taille des instructions dans la navigation
|
• Editeur OSM: vérification de la taille limite des tags OSM
|
||||||
• Niveau de zoom basé sur la distance jusqu’au prochain virage
|
Plus d'informations sur codeberg.org/comaps/comaps/releases
|
||||||
• Réorganisation des paramètres
|
|
||||||
Plus de détails sur codeberg.org/comaps/comaps/releases
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
• Podaci OpenStreetMap karte od 9. prosinca
|
|
||||||
• Korištenje Material 3 tema
|
|
||||||
• Podrška za utičnice za punjenje u OSM Editoru
|
|
||||||
• Dodane šuko/tip-E utičnice
|
|
||||||
• Poboljšano rangiranje rezultata pretraživanja
|
|
||||||
• Omogućeni litvanski i latvijski jezici u glasovnim najavama
|
|
||||||
• Povećana veličina indikatora vožnje
|
|
||||||
• Razina zumiranja se mijenja ovisno o udaljenosti do sljedećeg skretanja
|
|
||||||
• Promijenjen redoslijed postavki
|
|
||||||
Više detalja na codeberg.org/comaps/comaps/releases
|
|
||||||
@@ -1 +1 @@
|
|||||||
Paprasta ir patogi navigacija – Turiningos kelionės – Vystoma bendruomenės
|
Paprasta ir patogi navigacija – Turiningesnės kelionės – Vystoma bendruomenės
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
• Dane OpenStreetMap z 9 grudnia
|
|
||||||
• Użycie motywów Material 3
|
|
||||||
• Obsługa gniazd ładowania w Edytorze OSM
|
|
||||||
• Dodane gniazda ładowania schuko/type-E
|
|
||||||
• Poprawiony ranking wyników wyszukiwania
|
|
||||||
• Dodane litewskie i łotewskie komunikaty głosowe
|
|
||||||
• Poprawiony rozmiar znaków drogowych
|
|
||||||
• Poziom powiększenia oparty na odległości do następnego manewru
|
|
||||||
• Zmieniona kolejność ustawień
|
|
||||||
Więcej szczegółów na codeberg.org/comaps/comaps/releases
|
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
• Dados OpenStreetMap atualizados em 9 de dezembro
|
• Dados OSM de 17/12
|
||||||
• Uso do estilo Material 3
|
• Servidor de download de mapas configurável
|
||||||
• Suporte para tomadas de carregamento no Editor OSM
|
• Adição de informações sobre mapas desatualizados e um botão de atualização ao cartão de informações do local selecionado
|
||||||
• Adição de tomadas de carregamento Schuko/Tipo E
|
• Evita o uso de corredores de estacionamento para roteamento
|
||||||
• Melhoria na classificação dos resultados de busca
|
• Formato dos botões de zoom alterado
|
||||||
• Adição dos idiomas letão e lituano nas orientações por voz
|
• Sinônimos de busca em francês aprimorados
|
||||||
• Melhoria no tamanho das indicações de direção
|
• Editor OSM: verificação do limite de comprimento das tags do OSM na validação de valores
|
||||||
• Nível de zoom baseado em distância até a próxima curva
|
|
||||||
• Configurações reordenadas
|
|
||||||
Mais detalhes em codeberg.org/comaps/comaps/releases
|
Mais detalhes em codeberg.org/comaps/comaps/releases
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
• Карты OpenStreetMap от 17 декабря
|
||||||
|
• Возможность настройки сервера для скачивания карт
|
||||||
|
• Добавлена информация об устаревании карт и кнопка обновления (при выборе места на карте)
|
||||||
|
• Парковочные проезды больше не используются для транзитной маршрутизации
|
||||||
|
• Изменены кнопки масштабирования карты
|
||||||
|
• На карту добавлены ирригационные гидранты
|
||||||
|
• Редактор OSM: проверка максимальной длины OSM тегов
|
||||||
|
Подробнее на codeberg.org/comaps/comaps/releases
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
Brezplačno in odprtokodno zemljevidno orodje, ki ga vodi skupnost, temelji na podatkih OpenStreetMap in je okrepljena s predanostjo transparentnosti, zasebnosti in nedobičkonosnosti. CoMaps je izpeljanka OrganicMaps, ta pa je izpeljanka Maps.ME.
|
Brezplačno in odprtokodno zemljevidno orodje, ki ga vodi skupnost, temelji na podatkih OpenStreetMap in je okrepljena s predanostjo transparentnosti, zasebnosti in nepridobitnosti. CoMaps je izpeljanka OrganicMaps, ta pa je izpeljanka Maps.ME.
|
||||||
|
|
||||||
Preverite si o razlogih za ta projekt in njegovi usmerjenosti na <b><i>codeberg.org/comaps</i></b>.
|
Preberite si o razlogih za ta projekt in njegovi usmerjenosti na <b><i>codeberg.org/comaps</i></b>.
|
||||||
Pridružite se skupnosti in pomagajte narediti najboljše zemljevidno orodje
|
Pridružite se skupnosti in pomagajte narediti najboljše zemljevidno orodje
|
||||||
• Uporabljajte orodje in širite glas o njem
|
• Uporabljajte orodje in širite glas o njem
|
||||||
• Dajajte povratne informacije in poročajte o napakah
|
• Dajajte povratne informacije in poročajte o napakah
|
||||||
• Posodabljajte podatke zemljevida v tem orodju ali na spletni strani OpenStreetMap
|
• Posodabljajte podatke zemljevida v tem orodju ali na spletni strani OpenStreetMap
|
||||||
|
|
||||||
‣ <b>Osredotočeno na uporabo brez povezave</b>: Načrtujte in se usmerjajte na vašem potovanju v tujini vrez potrebe po mobilnih podatkih, iščite vmesne točke potocanja ko ste na daljšem pohodu ipd. Vse zmogljivosti orodja so zasnovane za delo brez povezave.
|
‣ <b>Osredotočeno na uporabo brez povezave</b>: Načrtujte in se usmerjajte na vašem potovanju v tujini vrez potrebe po mobilnih podatkih, iščite vmesne točke potovanja ko ste na daljšem pohodu ipd. Vse zmogljivosti orodja so zasnovane za delo brez povezave.
|
||||||
‣ <b>Spoštovanje zasebnosti</b>: orodje je zasnovano z mislijo na zasebnost – ne prepoznava oseb, ne sledi in ne zbira osebnih podatkov. Brez oglasov.
|
‣ <b>Spoštovanje zasebnosti</b>: orodje je zasnovano z mislijo na zasebnost – ne prepoznava oseb, ne sledi in ne zbira osebnih podatkov. Brez oglasov.
|
||||||
‣ <b>Preprosto in dodelano</b>: nujne zmogljivosti, enostavne za uporabo, ki preprosto delujejo.
|
‣ <b>Preprosto in dodelano</b>: nujne zmogljivosti, enostavne za uporabo, ki preprosto delujejo.
|
||||||
‣ <b>Prihrani vašo baterijo in prostor.</b>: ne izčrpava vaše baterije kakor druga usmerjevalna orodja. Strnjeni zemljevidi prihranijo dragocen prostor na vašem telefonu.
|
‣ <b>Prihrani vašo baterijo in prostor.</b>: ne izčrpava vaše baterije kakor druga usmerjevalna orodja. Strnjeni zemljevidi prihranijo dragocen prostor na vašem telefonu.
|
||||||
‣ <b>Brezplačno in ustvarjeno v skupnosti</b>: ljudje kot ste vi pomagajo ustvarjati to orodje, tako da dodajajo kraje na OpenStreetMap, preizkušajo in dajejo povratne informacije o zmogljivostih in prispevajo svoje razvijalske sposobnosti in sredstva.
|
‣ <b>Brezplačno in ustvarjeno v skupnosti</b>: ljudje kot ste vi pomagajo ustvarjati to orodje, tako da dodajajo kraje na OpenStreetMap, preizkušajo in dajejo povratne informacije o zmogljivostih in prispevajo svoje razvijalske sposobnosti in sredstva.
|
||||||
‣ <b>Odprto in transparentno odločanje in finance, nedobičkonosno in popolnoma odprtokodno.</b>
|
‣ <b>Odprto in transparentno odločanje in finance, nepridobitno in popolnoma odprtokodno.</b>
|
||||||
|
|
||||||
<b>Glavne zmogljivosti</b>:
|
<b>Glavne zmogljivosti</b>:
|
||||||
• Prenosljivi podrobni zemljevidi s kraji, ki na Googlovoh zemljevidih niso na voljo.
|
• Prenosljivi podrobni zemljevidi s kraji, ki na Googlovih zemljevidih niso na voljo.
|
||||||
• Prikaz za dejavnosti na prostem s poudarjenimi pohodniškimi potmi, tabornimi prostori, vodnimi viri, vrhovi, plastnicami itd.
|
• Prikaz za dejavnosti na prostem s poudarjenimi pohodniškimi potmi, tabornimi prostori, vodnimi viri, vrhovi, plastnicami itd.
|
||||||
• Pešpoti in kolesarke poti
|
• Pešpoti in kolesarke poti
|
||||||
• Kraji zanimanja, npr. restavracije, bencinske črpalke, hoteli, trgovine, znamenitosti in mnogo več
|
• Kraji zanimanja, npr. restavracije, bencinske črpalke, hoteli, trgovine, znamenitosti in mnogo več
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Paprasta ir patogi navigacija – Turiningos kelionės – Vystoma bendruomenės
|
Paprasta ir patogi navigacija – Turiningesnės kelionės – Vystoma bendruomenės
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
CoMaps - Usmerjajte zasebno
|
CoMaps - Usmerjajte se zasebno
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.github.mikephil.charting.formatter.IAxisValueFormatter;
|
|||||||
import com.github.mikephil.charting.highlight.Highlight;
|
import com.github.mikephil.charting.highlight.Highlight;
|
||||||
import com.github.mikephil.charting.listener.OnChartValueSelectedListener;
|
import com.github.mikephil.charting.listener.OnChartValueSelectedListener;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import android.location.Location;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.activity.result.ActivityResultLauncher;
|
import androidx.activity.result.ActivityResultLauncher;
|
||||||
import androidx.activity.result.contract.ActivityResultContracts;
|
import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
import androidx.annotation.CallSuper;
|
import androidx.annotation.CallSuper;
|
||||||
@@ -25,7 +26,15 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
|
|
||||||
|
import com.google.android.material.button.MaterialButton;
|
||||||
|
import com.google.android.material.checkbox.MaterialCheckBox;
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
import com.google.android.material.progressindicator.LinearProgressIndicator;
|
||||||
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import app.organicmaps.base.BaseMwmFragmentActivity;
|
import app.organicmaps.base.BaseMwmFragmentActivity;
|
||||||
|
import app.organicmaps.dialog.CustomMapServerDialog;
|
||||||
import app.organicmaps.downloader.MapManagerHelper;
|
import app.organicmaps.downloader.MapManagerHelper;
|
||||||
import app.organicmaps.intent.Factory;
|
import app.organicmaps.intent.Factory;
|
||||||
import app.organicmaps.sdk.Framework;
|
import app.organicmaps.sdk.Framework;
|
||||||
@@ -38,11 +47,7 @@ import app.organicmaps.sdk.util.StringUtils;
|
|||||||
import app.organicmaps.util.UiUtils;
|
import app.organicmaps.util.UiUtils;
|
||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
|
import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
|
||||||
import com.google.android.material.button.MaterialButton;
|
|
||||||
import com.google.android.material.checkbox.MaterialCheckBox;
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
|
||||||
import com.google.android.material.progressindicator.LinearProgressIndicator;
|
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -54,6 +59,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
private MaterialTextView mTvMessage;
|
private MaterialTextView mTvMessage;
|
||||||
private LinearProgressIndicator mProgress;
|
private LinearProgressIndicator mProgress;
|
||||||
private MaterialButton mBtnDownload;
|
private MaterialButton mBtnDownload;
|
||||||
|
private MaterialButton mBtnAdvanced;
|
||||||
private MaterialCheckBox mChbDownloadCountry;
|
private MaterialCheckBox mChbDownloadCountry;
|
||||||
|
|
||||||
private String mCurrentCountry;
|
private String mCurrentCountry;
|
||||||
@@ -253,7 +259,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
mProgress.setMax(bytes);
|
mProgress.setMax(bytes);
|
||||||
// Start progress at 1% according to M3 guidelines
|
// Start progress at 1% according to M3 guidelines
|
||||||
mProgress.setProgressCompat(bytes / 100, true);
|
mProgress.setProgressCompat(bytes/100, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
finishFilesDownload(bytes);
|
finishFilesDownload(bytes);
|
||||||
@@ -267,6 +273,14 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
mProgress = findViewById(R.id.progressbar);
|
mProgress = findViewById(R.id.progressbar);
|
||||||
mBtnDownload = findViewById(R.id.btn_download_resources);
|
mBtnDownload = findViewById(R.id.btn_download_resources);
|
||||||
mChbDownloadCountry = findViewById(R.id.chb_download_country);
|
mChbDownloadCountry = findViewById(R.id.chb_download_country);
|
||||||
|
mBtnAdvanced = findViewById(R.id.btn_advanced);
|
||||||
|
|
||||||
|
mBtnAdvanced.setOnClickListener(v -> {
|
||||||
|
CustomMapServerDialog.show(this, url -> {
|
||||||
|
prepareFilesDownload(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
mBtnAdvanced.setEnabled(true);
|
||||||
|
|
||||||
mBtnListeners = new View.OnClickListener[BTN_COUNT];
|
mBtnListeners = new View.OnClickListener[BTN_COUNT];
|
||||||
mBtnNames = new String[BTN_COUNT];
|
mBtnNames = new String[BTN_COUNT];
|
||||||
@@ -291,6 +305,11 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
mBtnDownload.setOnClickListener(mBtnListeners[action]);
|
mBtnDownload.setOnClickListener(mBtnListeners[action]);
|
||||||
mBtnDownload.setText(mBtnNames[action]);
|
mBtnDownload.setText(mBtnNames[action]);
|
||||||
|
|
||||||
|
// Allow changing server only when idle or after an error.
|
||||||
|
boolean advancedEnabled = (action == DOWNLOAD || action == TRY_AGAIN || action == RESUME);
|
||||||
|
mBtnAdvanced.setEnabled(advancedEnabled);
|
||||||
|
mBtnAdvanced.setAlpha(advancedEnabled ? 1f : 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doDownload()
|
private void doDownload()
|
||||||
@@ -359,6 +378,9 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
private void finishFilesDownload(int result)
|
private void finishFilesDownload(int result)
|
||||||
{
|
{
|
||||||
|
mBtnAdvanced.setEnabled(true);
|
||||||
|
mBtnAdvanced.setAlpha(1f);
|
||||||
|
|
||||||
if (result == ERR_NO_MORE_FILES)
|
if (result == ERR_NO_MORE_FILES)
|
||||||
{
|
{
|
||||||
// World and WorldCoasts has been downloaded, we should register maps again to correctly add them to the model.
|
// World and WorldCoasts has been downloaded, we should register maps again to correctly add them to the model.
|
||||||
@@ -372,7 +394,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
mTvMessage.setText(getString(R.string.downloading_country_can_proceed, item.name, fileSizeString));
|
mTvMessage.setText(getString(R.string.downloading_country_can_proceed, item.name, fileSizeString));
|
||||||
mProgress.setMax((int) item.totalSize);
|
mProgress.setMax((int) item.totalSize);
|
||||||
// Start progress at 1% according to M3 guidelines
|
// Start progress at 1% according to M3 guidelines
|
||||||
mProgress.setProgressCompat((int) (item.totalSize / 100), true);
|
mProgress.setProgressCompat((int) (item.totalSize/100), true);
|
||||||
|
|
||||||
mCountryDownloadListenerSlot = MapManager.nativeSubscribe(mCountryDownloadListener);
|
mCountryDownloadListenerSlot = MapManager.nativeSubscribe(mCountryDownloadListener);
|
||||||
MapManagerHelper.startDownload(mCurrentCountry);
|
MapManagerHelper.startDownload(mCurrentCountry);
|
||||||
@@ -424,17 +446,21 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
default -> throw new AssertionError("Unexpected result code = " + result);
|
default -> throw new AssertionError("Unexpected result code = " + result);
|
||||||
};
|
};
|
||||||
|
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(titleId)
|
.setTitle(titleId)
|
||||||
.setMessage(messageId)
|
.setMessage(messageId)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setOnCancelListener((dialog) -> setAction(PAUSE))
|
.setOnCancelListener((dialog) -> setAction(RESUME))
|
||||||
.setPositiveButton(R.string.try_again,
|
.setPositiveButton(R.string.try_again,
|
||||||
(dialog, which) -> {
|
(dialog, which) -> {
|
||||||
setAction(TRY_AGAIN);
|
setAction(TRY_AGAIN);
|
||||||
onTryAgainClicked();
|
onTryAgainClicked();
|
||||||
})
|
})
|
||||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
.setNegativeButton(R.string.cancel,
|
||||||
.show();
|
(dialog, which) -> {
|
||||||
|
setAction(RESUME);
|
||||||
|
})
|
||||||
|
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||||
|
.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,9 +38,8 @@ public class OsmUploadWork extends Worker
|
|||||||
{
|
{
|
||||||
final Constraints c = new Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build();
|
final Constraints c = new Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build();
|
||||||
OneTimeWorkRequest.Builder builder = new OneTimeWorkRequest.Builder(OsmUploadWork.class).setConstraints(c);
|
OneTimeWorkRequest.Builder builder = new OneTimeWorkRequest.Builder(OsmUploadWork.class).setConstraints(c);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
{
|
builder.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST);
|
||||||
builder.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST);
|
|
||||||
}
|
}
|
||||||
final OneTimeWorkRequest wr = builder.build();
|
final OneTimeWorkRequest wr = builder.build();
|
||||||
WorkManager.getInstance(context).beginUniqueWork("UploadOsmChanges", ExistingWorkPolicy.KEEP, wr).enqueue();
|
WorkManager.getInstance(context).beginUniqueWork("UploadOsmChanges", ExistingWorkPolicy.KEEP, wr).enqueue();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.documentfile.provider.DocumentFile;
|
import androidx.documentfile.provider.DocumentFile;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.sdk.util.log.Logger;
|
import app.organicmaps.sdk.util.log.Logger;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import androidx.fragment.app.DialogFragment;
|
|||||||
|
|
||||||
public class BaseMwmDialogFragment extends DialogFragment
|
public class BaseMwmDialogFragment extends DialogFragment
|
||||||
{
|
{
|
||||||
|
|
||||||
protected int getStyle()
|
protected int getStyle()
|
||||||
{
|
{
|
||||||
return STYLE_NORMAL;
|
return STYLE_NORMAL;
|
||||||
|
|||||||
@@ -282,13 +282,11 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<ConcatAdapter
|
|||||||
{
|
{
|
||||||
if (isEmptySearchResults())
|
if (isEmptySearchResults())
|
||||||
{
|
{
|
||||||
requirePlaceholder().setContent(R.string.search_not_found, R.string.search_not_found_query,
|
requirePlaceholder().setContent(R.string.search_not_found, R.string.search_not_found_query, R.drawable.ic_search_fail);
|
||||||
R.drawable.ic_search_fail);
|
|
||||||
}
|
}
|
||||||
else if (isEmpty())
|
else if (isEmpty())
|
||||||
{
|
{
|
||||||
requirePlaceholder().setContent(R.string.bookmarks_empty_list_title, R.string.bookmarks_empty_list_message,
|
requirePlaceholder().setContent(R.string.bookmarks_empty_list_title, R.string.bookmarks_empty_list_message, R.drawable.ic_bookmarks);
|
||||||
R.drawable.ic_bookmarks);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isEmptyRecycler = isEmpty() || isEmptySearchResults();
|
boolean isEmptyRecycler = isEmpty() || isEmptySearchResults();
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import app.organicmaps.util.UiUtils;
|
|||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
import app.organicmaps.widget.recycler.RecyclerClickListener;
|
import app.organicmaps.widget.recycler.RecyclerClickListener;
|
||||||
import app.organicmaps.widget.recycler.RecyclerLongClickListener;
|
import app.organicmaps.widget.recycler.RecyclerLongClickListener;
|
||||||
|
|
||||||
import com.google.android.material.button.MaterialButton;
|
import com.google.android.material.button.MaterialButton;
|
||||||
import com.google.android.material.checkbox.MaterialCheckBox;
|
import com.google.android.material.checkbox.MaterialCheckBox;
|
||||||
import com.google.android.material.imageview.ShapeableImageView;
|
import com.google.android.material.imageview.ShapeableImageView;
|
||||||
@@ -457,12 +458,10 @@ public class Holders
|
|||||||
|
|
||||||
String formattedDesc = desc.replace("\n", "<br>");
|
String formattedDesc = desc.replace("\n", "<br>");
|
||||||
Spanned spannedDesc = Utils.fromHtml(formattedDesc);
|
Spanned spannedDesc = Utils.fromHtml(formattedDesc);
|
||||||
if (!TextUtils.isEmpty(spannedDesc))
|
if (!TextUtils.isEmpty(spannedDesc)) {
|
||||||
{
|
|
||||||
mDescText.setText(spannedDesc);
|
mDescText.setText(spannedDesc);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
mDescText.setText(R.string.list_description_empty);
|
mDescText.setText(R.string.list_description_empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ public final class IntentUtils
|
|||||||
}
|
}
|
||||||
|
|
||||||
// https://developer.android.com/reference/androidx/car/app/CarContext#startCarApp(android.content.Intent)
|
// https://developer.android.com/reference/androidx/car/app/CarContext#startCarApp(android.content.Intent)
|
||||||
private static void processNavigationIntent(@NonNull CarContext carContext, @NonNull Renderer surfaceRenderer,
|
private static void processNavigationIntent(@NonNull CarContext carContext,
|
||||||
@NonNull Intent intent)
|
@NonNull Renderer surfaceRenderer, @NonNull Intent intent)
|
||||||
{
|
{
|
||||||
// TODO (AndrewShkrob): This logic will need to be revised when we introduce support for adding stops during
|
// TODO (AndrewShkrob): This logic will need to be revised when we introduce support for adding stops during
|
||||||
// navigation or route planning. Skip navigation intents during navigation
|
// navigation or route planning. Skip navigation intents during navigation
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public final class RoutingHelpers
|
|||||||
default -> Distance.UNIT_METERS;
|
default -> Distance.UNIT_METERS;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Distance.create(distance.mDistance, displayUnit);
|
return Distance.create(distance.mDistance, displayUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@@ -52,7 +52,7 @@ public final class RoutingHelpers
|
|||||||
default -> LaneDirection.SHAPE_UNKNOWN;
|
default -> LaneDirection.SHAPE_UNKNOWN;
|
||||||
};
|
};
|
||||||
|
|
||||||
return LaneDirection.create(shape, isRecommended);
|
return LaneDirection.create(shape, isRecommended);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@@ -77,7 +77,7 @@ public final class RoutingHelpers
|
|||||||
case EXIT_HIGHWAY_TO_LEFT -> Maneuver.TYPE_OFF_RAMP_SLIGHT_LEFT;
|
case EXIT_HIGHWAY_TO_LEFT -> Maneuver.TYPE_OFF_RAMP_SLIGHT_LEFT;
|
||||||
case EXIT_HIGHWAY_TO_RIGHT -> Maneuver.TYPE_OFF_RAMP_SLIGHT_RIGHT;
|
case EXIT_HIGHWAY_TO_RIGHT -> Maneuver.TYPE_OFF_RAMP_SLIGHT_RIGHT;
|
||||||
};
|
};
|
||||||
final Maneuver.Builder builder = new Maneuver.Builder(maneuverType);
|
final Maneuver.Builder builder = new Maneuver.Builder(maneuverType);
|
||||||
if (maneuverType == Maneuver.TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW)
|
if (maneuverType == Maneuver.TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW)
|
||||||
builder.setRoundaboutExitNumber(roundaboutExitNum > 0 ? roundaboutExitNum : 1);
|
builder.setRoundaboutExitNumber(roundaboutExitNum > 0 ? roundaboutExitNum : 1);
|
||||||
builder.setIcon(new CarIcon.Builder(createManeuverIcon(context, carDirection, roundaboutExitNum)).build());
|
builder.setIcon(new CarIcon.Builder(createManeuverIcon(context, carDirection, roundaboutExitNum)).build());
|
||||||
@@ -85,8 +85,7 @@ public final class RoutingHelpers
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
private static IconCompat createManeuverIcon(@NonNull final CarContext context, @NonNull CarDirection carDirection,
|
private static IconCompat createManeuverIcon(@NonNull final CarContext context, @NonNull CarDirection carDirection, int roundaboutExitNum)
|
||||||
int roundaboutExitNum)
|
|
||||||
{
|
{
|
||||||
if (!CarDirection.isRoundAbout(carDirection) || roundaboutExitNum == 0)
|
if (!CarDirection.isRoundAbout(carDirection) || roundaboutExitNum == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ public final class UiHelpers
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public static ActionStrip createMapActionStrip(@NonNull CarContext context, @NonNull Renderer surfaceRenderer)
|
public static ActionStrip createMapActionStrip(@NonNull CarContext context,
|
||||||
|
@NonNull Renderer surfaceRenderer)
|
||||||
{
|
{
|
||||||
final CarIcon iconPlus = new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_plus)).build();
|
final CarIcon iconPlus = new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_plus)).build();
|
||||||
final CarIcon iconMinus = new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_minus)).build();
|
final CarIcon iconMinus = new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_minus)).build();
|
||||||
@@ -58,13 +59,15 @@ public final class UiHelpers
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public static MapController createMapController(@NonNull CarContext context, @NonNull Renderer surfaceRenderer)
|
public static MapController createMapController(@NonNull CarContext context,
|
||||||
|
@NonNull Renderer surfaceRenderer)
|
||||||
{
|
{
|
||||||
return new MapController.Builder().setMapActionStrip(createMapActionStrip(context, surfaceRenderer)).build();
|
return new MapController.Builder().setMapActionStrip(createMapActionStrip(context, surfaceRenderer)).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public static Action createSettingsAction(@NonNull BaseMapScreen mapScreen, @NonNull Renderer surfaceRenderer)
|
public static Action createSettingsAction(@NonNull BaseMapScreen mapScreen,
|
||||||
|
@NonNull Renderer surfaceRenderer)
|
||||||
{
|
{
|
||||||
return createSettingsAction(mapScreen, surfaceRenderer, null);
|
return createSettingsAction(mapScreen, surfaceRenderer, null);
|
||||||
}
|
}
|
||||||
@@ -78,7 +81,8 @@ public final class UiHelpers
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
private static Action createSettingsAction(@NonNull BaseMapScreen mapScreen, @NonNull Renderer surfaceRenderer,
|
private static Action createSettingsAction(@NonNull BaseMapScreen mapScreen,
|
||||||
|
@NonNull Renderer surfaceRenderer,
|
||||||
@Nullable OnScreenResultListener onScreenResultListener)
|
@Nullable OnScreenResultListener onScreenResultListener)
|
||||||
{
|
{
|
||||||
final CarContext context = mapScreen.getCarContext();
|
final CarContext context = mapScreen.getCarContext();
|
||||||
@@ -119,7 +123,8 @@ public final class UiHelpers
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
final Row.Builder builder = new Row.Builder();
|
final Row.Builder builder = new Row.Builder();
|
||||||
builder.setImage(new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_opening_hours)).build());
|
builder.setImage(
|
||||||
|
new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_opening_hours)).build());
|
||||||
|
|
||||||
if (isEmptyTT)
|
if (isEmptyTT)
|
||||||
builder.setTitle(ohStr);
|
builder.setTitle(ohStr);
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package app.organicmaps.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
|
|
||||||
|
import app.organicmaps.R;
|
||||||
|
import app.organicmaps.sdk.Framework;
|
||||||
|
|
||||||
|
public final class CustomMapServerDialog
|
||||||
|
{
|
||||||
|
public interface OnUrlAppliedListener
|
||||||
|
{
|
||||||
|
void onUrlApplied(@NonNull String url);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CustomMapServerDialog() {}
|
||||||
|
|
||||||
|
public static void show(@NonNull Context context,
|
||||||
|
@Nullable OnUrlAppliedListener listener)
|
||||||
|
{
|
||||||
|
View dialogView = LayoutInflater.from(context)
|
||||||
|
.inflate(R.layout.dialog_custom_map_server, null);
|
||||||
|
TextInputLayout til = dialogView.findViewById(R.id.til_custom_map_server);
|
||||||
|
TextInputEditText edit = dialogView.findViewById(R.id.edit_custom_map_server);
|
||||||
|
|
||||||
|
SharedPreferences prefs =
|
||||||
|
PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
String current = prefs.getString(context.getString(R.string.pref_custom_map_download_url), "");
|
||||||
|
edit.setText(current);
|
||||||
|
|
||||||
|
MaterialAlertDialogBuilder builder =
|
||||||
|
new MaterialAlertDialogBuilder(context, R.style.MwmTheme_AlertDialog)
|
||||||
|
.setTitle(R.string.download_resources_custom_url_title)
|
||||||
|
.setMessage(R.string.download_resources_custom_url_message)
|
||||||
|
.setView(dialogView)
|
||||||
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
.setPositiveButton(R.string.save, null);
|
||||||
|
|
||||||
|
AlertDialog dialog = builder.create();
|
||||||
|
dialog.setOnShowListener(dlg -> {
|
||||||
|
Button ok = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
|
||||||
|
ok.setOnClickListener(v -> {
|
||||||
|
String url = edit.getText() != null ? edit.getText().toString().trim() : "";
|
||||||
|
|
||||||
|
if (!url.isEmpty()
|
||||||
|
&& !url.startsWith("http://")
|
||||||
|
&& !url.startsWith("https://"))
|
||||||
|
{
|
||||||
|
til.setError(context.getString(R.string.download_resources_custom_url_error_scheme));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
til.setError(null);
|
||||||
|
|
||||||
|
String normalizedUrl = Framework.normalizeServerUrl(url);
|
||||||
|
|
||||||
|
prefs.edit()
|
||||||
|
.putString(context.getString(R.string.pref_custom_map_download_url), normalizedUrl)
|
||||||
|
.apply();
|
||||||
|
|
||||||
|
// Apply to native
|
||||||
|
Framework.applyCustomMapDownloadUrl(context, normalizedUrl);
|
||||||
|
|
||||||
|
if (listener != null)
|
||||||
|
listener.onUrlApplied(normalizedUrl);
|
||||||
|
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -125,8 +125,7 @@ public class EditTextDialogFragment extends BaseMwmDialogFragment
|
|||||||
|
|
||||||
positiveButton.setOnClickListener(view -> {
|
positiveButton.setOnClickListener(view -> {
|
||||||
final String result = mEtInput.getText().toString();
|
final String result = mEtInput.getText().toString();
|
||||||
if (validateInput(requireActivity(), result))
|
if (validateInput(requireActivity(), result)) {
|
||||||
{
|
|
||||||
processInput(result);
|
processInput(result);
|
||||||
editTextDialog.dismiss();
|
editTextDialog.dismiss();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.location.Location;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import app.organicmaps.MwmActivity;
|
import app.organicmaps.MwmActivity;
|
||||||
@@ -48,8 +49,7 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
|
|||||||
@Override
|
@Override
|
||||||
public void onStatusChanged(List<MapManager.StorageCallbackData> data)
|
public void onStatusChanged(List<MapManager.StorageCallbackData> data)
|
||||||
{
|
{
|
||||||
if (mCurrentCountry == null)
|
if (mCurrentCountry == null) {
|
||||||
{
|
|
||||||
updateOfflineExplanationVisibility();
|
updateOfflineExplanationVisibility();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -109,13 +109,10 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
|
|||||||
return enqueued || progress || applying;
|
return enqueued || progress || applying;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateOfflineExplanationVisibility()
|
private void updateOfflineExplanationVisibility() {
|
||||||
{
|
if (mOfflineExplanation == null) return;
|
||||||
if (mOfflineExplanation == null)
|
|
||||||
return;
|
|
||||||
// hide once threshold reached; safe to call repeatedly.
|
// hide once threshold reached; safe to call repeatedly.
|
||||||
app.organicmaps.util.UiUtils.showIf(MapManager.nativeGetDownloadedCount() < (DEFAULT_MAP_BASELINE + HIDE_THRESHOLD),
|
app.organicmaps.util.UiUtils.showIf(MapManager.nativeGetDownloadedCount() < (DEFAULT_MAP_BASELINE + HIDE_THRESHOLD), mOfflineExplanation);
|
||||||
mOfflineExplanation);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateProgressState(boolean shouldAutoDownload)
|
private void updateProgressState(boolean shouldAutoDownload)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.AutoCompleteTextView;
|
import android.widget.AutoCompleteTextView;
|
||||||
import android.widget.GridLayout;
|
import android.widget.GridLayout;
|
||||||
|
|
||||||
import androidx.annotation.CallSuper;
|
import androidx.annotation.CallSuper;
|
||||||
import androidx.annotation.DrawableRes;
|
import androidx.annotation.DrawableRes;
|
||||||
import androidx.annotation.IdRes;
|
import androidx.annotation.IdRes;
|
||||||
@@ -397,7 +398,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
List<String> SOCKET_TYPES = Arrays.stream(getResources().getStringArray(R.array.charge_socket_types)).toList();
|
List<String> SOCKET_TYPES = Arrays.stream(getResources().getStringArray(R.array.charge_socket_types)).toList();
|
||||||
for (String socketType : SOCKET_TYPES)
|
for (String socketType : SOCKET_TYPES)
|
||||||
{
|
{
|
||||||
ChargeSocketDescriptor socket = new ChargeSocketDescriptor(socketType, 0, 0);
|
ChargeSocketDescriptor socket = new ChargeSocketDescriptor(socketType,0,0);
|
||||||
|
|
||||||
MaterialButton btn = (MaterialButton) inflater.inflate(R.layout.button_socket_type, typeBtns, false);
|
MaterialButton btn = (MaterialButton) inflater.inflate(R.layout.button_socket_type, typeBtns, false);
|
||||||
|
|
||||||
@@ -405,16 +406,16 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
|
|
||||||
// load SVG icon converted into VectorDrawable in res/drawable
|
// load SVG icon converted into VectorDrawable in res/drawable
|
||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable",
|
int resIconId =
|
||||||
requireContext().getPackageName());
|
getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable", requireContext().getPackageName());
|
||||||
if (resIconId != 0)
|
if (resIconId != 0)
|
||||||
{
|
{
|
||||||
btn.setIcon(getResources().getDrawable(resIconId));
|
btn.setIcon(getResources().getDrawable(resIconId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
int resTypeId = getResources().getIdentifier("charge_socket_" + socket.visualType(), "string",
|
int resTypeId =
|
||||||
requireContext().getPackageName());
|
getResources().getIdentifier("charge_socket_" + socket.visualType(), "string", requireContext().getPackageName());
|
||||||
if (resTypeId != 0)
|
if (resTypeId != 0)
|
||||||
{
|
{
|
||||||
btn.setText(getResources().getString(resTypeId));
|
btn.setText(getResources().getString(resTypeId));
|
||||||
@@ -462,16 +463,13 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
// Add a TextWatcher to validate on text change
|
// Add a TextWatcher to validate on text change
|
||||||
countView.addTextChangedListener(new TextWatcher() {
|
countView.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after)
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||||
{}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count)
|
public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
||||||
{}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s)
|
public void afterTextChanged(Editable s) {
|
||||||
{
|
|
||||||
validatePositiveField(s.toString(), countInputLayout);
|
validatePositiveField(s.toString(), countInputLayout);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -486,16 +484,13 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
// Add a TextWatcher to validate on text change
|
// Add a TextWatcher to validate on text change
|
||||||
powerView.addTextChangedListener(new TextWatcher() {
|
powerView.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after)
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||||
{}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count)
|
public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
||||||
{}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s)
|
public void afterTextChanged(Editable s) {
|
||||||
{
|
|
||||||
validatePositiveField(s.toString(), powerInputLayout);
|
validatePositiveField(s.toString(), powerInputLayout);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -503,82 +498,74 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
return new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
return new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.editor_socket)
|
.setTitle(R.string.editor_socket)
|
||||||
.setView(dialogView)
|
.setView(dialogView)
|
||||||
.setPositiveButton(
|
.setPositiveButton(R.string.save,
|
||||||
R.string.save,
|
(dialog, which) -> {
|
||||||
(dialog, which) -> {
|
String socketType = "";
|
||||||
String socketType = "";
|
for (MaterialButton b : buttonList)
|
||||||
for (MaterialButton b : buttonList)
|
{
|
||||||
{
|
if (b.isChecked())
|
||||||
if (b.isChecked())
|
{
|
||||||
{
|
socketType = b.getTag(R.id.socket_type).toString();
|
||||||
socketType = b.getTag(R.id.socket_type).toString();
|
break;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
int countValue = 0; // 0 means 'unknown count'
|
int countValue = 0; // 0 means 'unknown count'
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
countValue = Integer.parseInt(countView.getText().toString());
|
countValue = Integer.parseInt(countView.getText().toString());
|
||||||
}
|
}
|
||||||
catch (NumberFormatException ignored)
|
catch (NumberFormatException ignored)
|
||||||
{
|
{
|
||||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
|
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (countValue < 0)
|
if (countValue < 0)
|
||||||
{
|
{
|
||||||
countValue = 0;
|
countValue = 0;
|
||||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
|
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
double powerValue = 0; // 0 means 'unknown power'
|
double powerValue = 0; // 0 means 'unknown power'
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
powerValue = Double.parseDouble(powerView.getText().toString());
|
powerValue = Double.parseDouble(powerView.getText().toString());
|
||||||
}
|
}
|
||||||
catch (NumberFormatException ignored)
|
catch (NumberFormatException ignored)
|
||||||
{
|
{
|
||||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
|
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (powerValue < 0)
|
if (powerValue < 0)
|
||||||
{
|
{
|
||||||
powerValue = 0;
|
powerValue = 0;
|
||||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
|
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
ChargeSocketDescriptor socket = new ChargeSocketDescriptor(socketType, countValue, powerValue);
|
ChargeSocketDescriptor socket =
|
||||||
|
new ChargeSocketDescriptor(socketType, countValue, powerValue);
|
||||||
|
|
||||||
updateChargeSockets(socketIndex, socket);
|
updateChargeSockets(socketIndex, socket);
|
||||||
})
|
})
|
||||||
.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper method for validation logic
|
// Helper method for validation logic
|
||||||
private boolean validatePositiveField(String text, TextInputLayout layout)
|
private boolean validatePositiveField(String text, TextInputLayout layout) {
|
||||||
{
|
if (text.isEmpty()) {
|
||||||
if (text.isEmpty())
|
|
||||||
{
|
|
||||||
layout.setError(null); // No error if empty (assuming 0 is the default)
|
layout.setError(null); // No error if empty (assuming 0 is the default)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
double value = Double.parseDouble(text);
|
double value = Double.parseDouble(text);
|
||||||
if (value < 0)
|
if (value < 0) {
|
||||||
{
|
|
||||||
layout.setError(getString(R.string.error_value_must_be_positive));
|
layout.setError(getString(R.string.error_value_must_be_positive));
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
layout.setError(null);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
} catch (NumberFormatException e) {
|
||||||
{
|
|
||||||
layout.setError(null);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (NumberFormatException e)
|
|
||||||
{
|
|
||||||
layout.setError(getString(R.string.error_invalid_number));
|
layout.setError(getString(R.string.error_invalid_number));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -598,8 +585,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
{
|
{
|
||||||
sockets[socketIndex] = socket;
|
sockets[socketIndex] = socket;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
List<ChargeSocketDescriptor> list = new ArrayList<>(Arrays.asList(sockets));
|
List<ChargeSocketDescriptor> list = new ArrayList<>(Arrays.asList(sockets));
|
||||||
list.add(socket);
|
list.add(socket);
|
||||||
sockets = list.toArray(new ChargeSocketDescriptor[0]);
|
sockets = list.toArray(new ChargeSocketDescriptor[0]);
|
||||||
@@ -617,8 +603,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
GridLayout socketsGrid = mChargeSockets.findViewById(R.id.socket_grid_editor);
|
GridLayout socketsGrid = mChargeSockets.findViewById(R.id.socket_grid_editor);
|
||||||
socketsGrid.removeAllViews();
|
socketsGrid.removeAllViews();
|
||||||
|
|
||||||
for (int i = 0; i < sockets.length; i++)
|
for (int i = 0; i < sockets.length; i++) {
|
||||||
{
|
|
||||||
final int currentIndex = i;
|
final int currentIndex = i;
|
||||||
ChargeSocketDescriptor socket = sockets[i];
|
ChargeSocketDescriptor socket = sockets[i];
|
||||||
|
|
||||||
@@ -629,30 +614,27 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
MaterialTextView power = itemView.findViewById(R.id.socket_power);
|
MaterialTextView power = itemView.findViewById(R.id.socket_power);
|
||||||
MaterialTextView count = itemView.findViewById(R.id.socket_count);
|
MaterialTextView count = itemView.findViewById(R.id.socket_count);
|
||||||
|
|
||||||
|
|
||||||
// load SVG icon converted into VectorDrawable in res/drawable
|
// load SVG icon converted into VectorDrawable in res/drawable
|
||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable",
|
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable",
|
||||||
requireContext().getPackageName());
|
requireContext().getPackageName());
|
||||||
if (resIconId != 0)
|
if (resIconId != 0) {
|
||||||
{
|
|
||||||
icon.setImageResource(resIconId);
|
icon.setImageResource(resIconId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
int resTypeId = getResources().getIdentifier("charge_socket_" + socket.visualType(), "string",
|
int resTypeId =
|
||||||
requireContext().getPackageName());
|
getResources().getIdentifier("charge_socket_" + socket.visualType(), "string", requireContext().getPackageName());
|
||||||
if (resTypeId != 0)
|
if (resTypeId != 0) {
|
||||||
{
|
|
||||||
type.setText(resTypeId);
|
type.setText(resTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (socket.power() != 0)
|
if (socket.power() != 0) {
|
||||||
{
|
|
||||||
DecimalFormat df = new DecimalFormat("#.##");
|
DecimalFormat df = new DecimalFormat("#.##");
|
||||||
power.setText(getString(R.string.kw_label, df.format(socket.power())));
|
power.setText(getString(R.string.kw_label, df.format(socket.power())));
|
||||||
}
|
}
|
||||||
else if (socket.ignorePower())
|
else if (socket.ignorePower()) {
|
||||||
{
|
|
||||||
power.setVisibility(INVISIBLE);
|
power.setVisibility(INVISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -661,8 +643,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
count.setText(getString(R.string.count_label, socket.count()));
|
count.setText(getString(R.string.count_label, socket.count()));
|
||||||
}
|
}
|
||||||
|
|
||||||
itemView.setOnClickListener(
|
itemView.setOnClickListener(v -> buildChargeSocketDialog(currentIndex, socket.type(), socket.count(), socket.power()).show());
|
||||||
v -> buildChargeSocketDialog(currentIndex, socket.type(), socket.count(), socket.power()).show());
|
|
||||||
socketsGrid.addView(itemView);
|
socketsGrid.addView(itemView);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -808,8 +789,9 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
View lineContactBlock =
|
View lineContactBlock =
|
||||||
initBlock(view, Metadata.MetadataType.FMD_CONTACT_LINE, R.id.block_line, R.drawable.ic_line_white,
|
initBlock(view, Metadata.MetadataType.FMD_CONTACT_LINE, R.id.block_line, R.drawable.ic_line_white,
|
||||||
R.string.editor_line_social_network, InputType.TYPE_TEXT_VARIATION_URI);
|
R.string.editor_line_social_network, InputType.TYPE_TEXT_VARIATION_URI);
|
||||||
View blueskyContactBlock = initBlock(view, Metadata.MetadataType.FMD_CONTACT_BLUESKY, R.id.block_bluesky,
|
View blueskyContactBlock =
|
||||||
R.drawable.ic_bluesky, R.string.bluesky, InputType.TYPE_TEXT_VARIATION_URI);
|
initBlock(view, Metadata.MetadataType.FMD_CONTACT_BLUESKY, R.id.block_bluesky, R.drawable.ic_bluesky,
|
||||||
|
R.string.bluesky, InputType.TYPE_TEXT_VARIATION_URI);
|
||||||
View operatorBlock = initBlock(view, Metadata.MetadataType.FMD_OPERATOR, R.id.block_operator,
|
View operatorBlock = initBlock(view, Metadata.MetadataType.FMD_OPERATOR, R.id.block_operator,
|
||||||
R.drawable.ic_operator, R.string.editor_operator, 0);
|
R.drawable.ic_operator, R.string.editor_operator, 0);
|
||||||
|
|
||||||
@@ -966,7 +948,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
|
|
||||||
mDisused.setVisibility(Editor.nativeCanMarkPlaceAsDisused() ? View.VISIBLE : View.GONE);
|
mDisused.setVisibility(Editor.nativeCanMarkPlaceAsDisused() ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
if (Editor.nativeIsMapObjectUploaded())
|
if (Editor.nativeAreSomeFeatureChangesUploaded())
|
||||||
{
|
{
|
||||||
mReset.setText(R.string.editor_place_doesnt_exist);
|
mReset.setText(R.string.editor_place_doesnt_exist);
|
||||||
return;
|
return;
|
||||||
@@ -984,7 +966,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
|
|
||||||
private void reset()
|
private void reset()
|
||||||
{
|
{
|
||||||
if (Editor.nativeIsMapObjectUploaded())
|
if (Editor.nativeAreSomeFeatureChangesUploaded())
|
||||||
{
|
{
|
||||||
placeDoesntExist();
|
placeDoesntExist();
|
||||||
return;
|
return;
|
||||||
@@ -1041,15 +1023,14 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
private void placeDisused()
|
private void placeDisused()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.editor_mark_business_vacant_title)
|
.setTitle(R.string.editor_mark_business_vacant_title)
|
||||||
.setMessage(R.string.editor_mark_business_vacant_description)
|
.setMessage(R.string.editor_mark_business_vacant_description)
|
||||||
.setPositiveButton(R.string.editor_submit,
|
.setPositiveButton(R.string.editor_submit, (dlg, which) -> {
|
||||||
(dlg, which) -> {
|
Editor.nativeMarkPlaceAsDisused();
|
||||||
Editor.nativeMarkPlaceAsDisused();
|
mParent.processEditedFeatures();
|
||||||
mParent.processEditedFeatures();
|
})
|
||||||
})
|
.setNegativeButton(android.R.string.cancel, null)
|
||||||
.setNegativeButton(android.R.string.cancel, null)
|
.show();
|
||||||
.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void commitPlaceDoesntExists(@NonNull String text)
|
private void commitPlaceDoesntExists(@NonNull String text)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import app.organicmaps.R;
|
|||||||
import app.organicmaps.sdk.editor.data.FeatureCategory;
|
import app.organicmaps.sdk.editor.data.FeatureCategory;
|
||||||
import app.organicmaps.sdk.util.StringUtils;
|
import app.organicmaps.sdk.util.StringUtils;
|
||||||
import app.organicmaps.util.UiUtils;
|
import app.organicmaps.util.UiUtils;
|
||||||
|
|
||||||
import com.google.android.material.button.MaterialButton;
|
import com.google.android.material.button.MaterialButton;
|
||||||
import com.google.android.material.textfield.TextInputEditText;
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
@@ -68,7 +69,8 @@ public class FeatureCategoryAdapter extends RecyclerView.Adapter<RecyclerView.Vi
|
|||||||
}
|
}
|
||||||
case TYPE_FOOTER ->
|
case TYPE_FOOTER ->
|
||||||
{
|
{
|
||||||
return new FooterViewHolder(inflater.inflate(R.layout.item_feature_category_footer, parent, false), mFragment);
|
return new FooterViewHolder(inflater.inflate(R.layout.item_feature_category_footer, parent, false),
|
||||||
|
mFragment);
|
||||||
}
|
}
|
||||||
default -> throw new IllegalArgumentException("Unsupported viewType: " + viewType);
|
default -> throw new IllegalArgumentException("Unsupported viewType: " + viewType);
|
||||||
}
|
}
|
||||||
@@ -132,21 +134,26 @@ public class FeatureCategoryAdapter extends RecyclerView.Adapter<RecyclerView.Vi
|
|||||||
mSendNoteButton = itemView.findViewById(R.id.send_note_button);
|
mSendNoteButton = itemView.findViewById(R.id.send_note_button);
|
||||||
mSendNoteButton.setOnClickListener(v -> listener.onSendNoteClicked());
|
mSendNoteButton.setOnClickListener(v -> listener.onSendNoteClicked());
|
||||||
final ColorStateList bgButtonColor = new ColorStateList(
|
final ColorStateList bgButtonColor = new ColorStateList(
|
||||||
new int[][] {
|
new int[][]{
|
||||||
new int[] {android.R.attr.state_enabled}, // enabled
|
new int[]{android.R.attr.state_enabled}, // enabled
|
||||||
new int[] {-android.R.attr.state_enabled} // disabled
|
new int[]{-android.R.attr.state_enabled} // disabled
|
||||||
},
|
},
|
||||||
new int[] {ContextCompat.getColor(mSendNoteButton.getContext(), R.color.base_accent),
|
new int[]{
|
||||||
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_disabled)});
|
ContextCompat.getColor(
|
||||||
|
mSendNoteButton.getContext(), R.color.base_accent),
|
||||||
|
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_disabled)
|
||||||
|
});
|
||||||
final ColorStateList textButtonColor = new ColorStateList(
|
final ColorStateList textButtonColor = new ColorStateList(
|
||||||
new int[][] {
|
new int[][]{
|
||||||
new int[] {android.R.attr.state_enabled}, // enabled
|
new int[]{android.R.attr.state_enabled}, // enabled
|
||||||
new int[] {-android.R.attr.state_enabled} // disabled
|
new int[]{-android.R.attr.state_enabled} // disabled
|
||||||
},
|
},
|
||||||
new int[] {ContextCompat.getColor(mSendNoteButton.getContext(),
|
new int[]{
|
||||||
UiUtils.getStyledResourceId(mSendNoteButton.getContext(),
|
ContextCompat.getColor(
|
||||||
android.R.attr.textColorPrimaryInverse)),
|
mSendNoteButton.getContext(),
|
||||||
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_text_disabled)});
|
UiUtils.getStyledResourceId(mSendNoteButton.getContext(), android.R.attr.textColorPrimaryInverse)),
|
||||||
|
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_text_disabled)
|
||||||
|
});
|
||||||
mSendNoteButton.setBackgroundTintList(bgButtonColor);
|
mSendNoteButton.setBackgroundTintList(bgButtonColor);
|
||||||
mSendNoteButton.setTextColor(textButtonColor);
|
mSendNoteButton.setTextColor(textButtonColor);
|
||||||
mNoteEditText.addTextChangedListener(new StringUtils.SimpleTextWatcher() {
|
mNoteEditText.addTextChangedListener(new StringUtils.SimpleTextWatcher() {
|
||||||
|
|||||||
@@ -2,16 +2,19 @@ package app.organicmaps.editor;
|
|||||||
|
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
|
import com.google.android.material.timepicker.MaterialTimePicker;
|
||||||
|
import com.google.android.material.timepicker.TimeFormat;
|
||||||
|
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.sdk.editor.data.HoursMinutes;
|
import app.organicmaps.sdk.editor.data.HoursMinutes;
|
||||||
import app.organicmaps.sdk.util.DateUtils;
|
import app.organicmaps.sdk.util.DateUtils;
|
||||||
import com.google.android.material.timepicker.MaterialTimePicker;
|
|
||||||
import com.google.android.material.timepicker.TimeFormat;
|
|
||||||
|
|
||||||
public class FromToTimePicker
|
public class FromToTimePicker
|
||||||
{
|
{
|
||||||
@@ -29,11 +32,18 @@ public class FromToTimePicker
|
|||||||
private boolean mIsFromTimePicked;
|
private boolean mIsFromTimePicked;
|
||||||
private int mInputMode;
|
private int mInputMode;
|
||||||
|
|
||||||
public static void pickTime(@NonNull Fragment fragment, @NonNull FromToTimePicker.OnPickListener listener,
|
public static void pickTime(@NonNull Fragment fragment,
|
||||||
@NonNull HoursMinutes fromTime, @NonNull HoursMinutes toTime, int id,
|
@NonNull FromToTimePicker.OnPickListener listener,
|
||||||
|
@NonNull HoursMinutes fromTime,
|
||||||
|
@NonNull HoursMinutes toTime,
|
||||||
|
int id,
|
||||||
boolean startWithToTime)
|
boolean startWithToTime)
|
||||||
{
|
{
|
||||||
FromToTimePicker timePicker = new FromToTimePicker(fragment, listener, fromTime, toTime, id);
|
FromToTimePicker timePicker = new FromToTimePicker(fragment,
|
||||||
|
listener,
|
||||||
|
fromTime,
|
||||||
|
toTime,
|
||||||
|
id);
|
||||||
|
|
||||||
if (startWithToTime)
|
if (startWithToTime)
|
||||||
timePicker.showToTimePicker();
|
timePicker.showToTimePicker();
|
||||||
@@ -41,8 +51,11 @@ public class FromToTimePicker
|
|||||||
timePicker.showFromTimePicker();
|
timePicker.showFromTimePicker();
|
||||||
}
|
}
|
||||||
|
|
||||||
private FromToTimePicker(@NonNull Fragment fragment, @NonNull FromToTimePicker.OnPickListener listener,
|
private FromToTimePicker(@NonNull Fragment fragment,
|
||||||
@NonNull HoursMinutes fromTime, @NonNull HoursMinutes toTime, int id)
|
@NonNull FromToTimePicker.OnPickListener listener,
|
||||||
|
@NonNull HoursMinutes fromTime,
|
||||||
|
@NonNull HoursMinutes toTime,
|
||||||
|
int id)
|
||||||
{
|
{
|
||||||
mActivity = fragment.requireActivity();
|
mActivity = fragment.requireActivity();
|
||||||
mFragmentManager = fragment.getChildFragmentManager();
|
mFragmentManager = fragment.getChildFragmentManager();
|
||||||
@@ -87,12 +100,15 @@ public class FromToTimePicker
|
|||||||
|
|
||||||
private MaterialTimePicker buildFromTimePicker()
|
private MaterialTimePicker buildFromTimePicker()
|
||||||
{
|
{
|
||||||
MaterialTimePicker timePicker = buildTimePicker(mFromTime, mResources.getString(R.string.editor_time_from),
|
MaterialTimePicker timePicker = buildTimePicker(mFromTime,
|
||||||
mResources.getString(R.string.next_button), null);
|
mResources.getString(R.string.editor_time_from),
|
||||||
|
mResources.getString(R.string.next_button),
|
||||||
|
null);
|
||||||
|
|
||||||
timePicker.addOnNegativeButtonClickListener(view -> finishTimePicking(false));
|
timePicker.addOnNegativeButtonClickListener(view -> finishTimePicking(false));
|
||||||
|
|
||||||
timePicker.addOnPositiveButtonClickListener(view -> {
|
timePicker.addOnPositiveButtonClickListener(view ->
|
||||||
|
{
|
||||||
mIsFromTimePicked = true;
|
mIsFromTimePicked = true;
|
||||||
saveState(timePicker, true);
|
saveState(timePicker, true);
|
||||||
mFromTimePicker = null;
|
mFromTimePicker = null;
|
||||||
@@ -106,10 +122,13 @@ public class FromToTimePicker
|
|||||||
|
|
||||||
private MaterialTimePicker buildToTimePicker()
|
private MaterialTimePicker buildToTimePicker()
|
||||||
{
|
{
|
||||||
MaterialTimePicker timePicker = buildTimePicker(mToTime, mResources.getString(R.string.editor_time_to), null,
|
MaterialTimePicker timePicker = buildTimePicker(mToTime,
|
||||||
|
mResources.getString(R.string.editor_time_to),
|
||||||
|
null,
|
||||||
mResources.getString(R.string.back));
|
mResources.getString(R.string.back));
|
||||||
|
|
||||||
timePicker.addOnNegativeButtonClickListener(view -> {
|
timePicker.addOnNegativeButtonClickListener(view ->
|
||||||
|
{
|
||||||
saveState(timePicker, false);
|
saveState(timePicker, false);
|
||||||
mToTimePicker = null;
|
mToTimePicker = null;
|
||||||
if (mIsFromTimePicked)
|
if (mIsFromTimePicked)
|
||||||
@@ -118,7 +137,8 @@ public class FromToTimePicker
|
|||||||
finishTimePicking(false);
|
finishTimePicking(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
timePicker.addOnPositiveButtonClickListener(view -> {
|
timePicker.addOnPositiveButtonClickListener(view ->
|
||||||
|
{
|
||||||
saveState(timePicker, false);
|
saveState(timePicker, false);
|
||||||
finishTimePicking(true);
|
finishTimePicking(true);
|
||||||
});
|
});
|
||||||
@@ -129,18 +149,18 @@ public class FromToTimePicker
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
private MaterialTimePicker buildTimePicker(@NonNull HoursMinutes time, @NonNull String title,
|
private MaterialTimePicker buildTimePicker(@NonNull HoursMinutes time,
|
||||||
|
@NonNull String title,
|
||||||
@Nullable String positiveButtonTextOverride,
|
@Nullable String positiveButtonTextOverride,
|
||||||
@Nullable String negativeButtonTextOverride)
|
@Nullable String negativeButtonTextOverride)
|
||||||
{
|
{
|
||||||
MaterialTimePicker.Builder builder =
|
MaterialTimePicker.Builder builder = new MaterialTimePicker.Builder()
|
||||||
new MaterialTimePicker.Builder()
|
.setTitleText(title)
|
||||||
.setTitleText(title)
|
.setTimeFormat(mIs24HourFormat ? TimeFormat.CLOCK_24H : TimeFormat.CLOCK_12H)
|
||||||
.setTimeFormat(mIs24HourFormat ? TimeFormat.CLOCK_24H : TimeFormat.CLOCK_12H)
|
.setInputMode(mInputMode)
|
||||||
.setInputMode(mInputMode)
|
.setTheme(R.style.MwmTheme_MaterialTimePicker)
|
||||||
.setTheme(R.style.MwmTheme_MaterialTimePicker)
|
.setHour((int) time.hours)
|
||||||
.setHour((int) time.hours)
|
.setMinute((int) time.minutes);
|
||||||
.setMinute((int) time.minutes);
|
|
||||||
|
|
||||||
if (positiveButtonTextOverride != null)
|
if (positiveButtonTextOverride != null)
|
||||||
builder.setPositiveButtonText(positiveButtonTextOverride);
|
builder.setPositiveButtonText(positiveButtonTextOverride);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import androidx.annotation.IdRes;
|
import androidx.annotation.IdRes;
|
||||||
import androidx.annotation.IntRange;
|
import androidx.annotation.IntRange;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
@@ -121,14 +122,20 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
|||||||
notifyItemChanged(getItemCount() - 1);
|
notifyItemChanged(getItemCount() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pickTime(int position, @IntRange(from = ID_OPENING_TIME, to = ID_CLOSED_SPAN) int id,
|
private void pickTime(int position,
|
||||||
|
@IntRange(from = ID_OPENING_TIME, to = ID_CLOSED_SPAN) int id,
|
||||||
boolean startWithToTime)
|
boolean startWithToTime)
|
||||||
{
|
{
|
||||||
final Timetable data = mItems.get(position);
|
final Timetable data = mItems.get(position);
|
||||||
mPickingPosition = position;
|
mPickingPosition = position;
|
||||||
|
|
||||||
FromToTimePicker.pickTime(mFragment, this, data.workingTimespan.start, data.workingTimespan.end, id,
|
FromToTimePicker.pickTime(mFragment,
|
||||||
startWithToTime);
|
this,
|
||||||
|
data.workingTimespan.start,
|
||||||
|
data.workingTimespan.end,
|
||||||
|
id,
|
||||||
|
startWithToTime);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -377,21 +384,26 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
|||||||
final String text = mFragment.getString(R.string.editor_time_add);
|
final String text = mFragment.getString(R.string.editor_time_add);
|
||||||
mAdd.setEnabled(enable);
|
mAdd.setEnabled(enable);
|
||||||
final ColorStateList bgButtonColor = new ColorStateList(
|
final ColorStateList bgButtonColor = new ColorStateList(
|
||||||
new int[][] {
|
new int[][]{
|
||||||
new int[] {android.R.attr.state_enabled}, // enabled
|
new int[]{android.R.attr.state_enabled}, // enabled
|
||||||
new int[] {-android.R.attr.state_enabled} // disabled
|
new int[]{-android.R.attr.state_enabled} // disabled
|
||||||
},
|
},
|
||||||
new int[] {ContextCompat.getColor(mAdd.getContext(), R.color.base_accent),
|
new int[]{
|
||||||
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_disabled)});
|
ContextCompat.getColor(
|
||||||
|
mAdd.getContext(), R.color.base_accent),
|
||||||
|
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_disabled)
|
||||||
|
});
|
||||||
final ColorStateList textButtonColor = new ColorStateList(
|
final ColorStateList textButtonColor = new ColorStateList(
|
||||||
new int[][] {
|
new int[][]{
|
||||||
new int[] {android.R.attr.state_enabled}, // enabled
|
new int[]{android.R.attr.state_enabled}, // enabled
|
||||||
new int[] {-android.R.attr.state_enabled} // disabled
|
new int[]{-android.R.attr.state_enabled} // disabled
|
||||||
},
|
},
|
||||||
new int[] {
|
new int[]{
|
||||||
ContextCompat.getColor(mAdd.getContext(), UiUtils.getStyledResourceId(
|
ContextCompat.getColor(
|
||||||
mAdd.getContext(), android.R.attr.textColorPrimaryInverse)),
|
mAdd.getContext(),
|
||||||
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_text_disabled)});
|
UiUtils.getStyledResourceId(mAdd.getContext(), android.R.attr.textColorPrimaryInverse)),
|
||||||
|
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_text_disabled)
|
||||||
|
});
|
||||||
mAdd.setBackgroundTintList(bgButtonColor);
|
mAdd.setBackgroundTintList(bgButtonColor);
|
||||||
mAdd.setTextColor(textButtonColor);
|
mAdd.setTextColor(textButtonColor);
|
||||||
mAdd.setText(enable ? text + " (" + TimeFormatUtils.formatWeekdays(mComplementItem) + ")" : text);
|
mAdd.setText(enable ? text + " (" + TimeFormatUtils.formatWeekdays(mComplementItem) + ")" : text);
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import androidx.annotation.Nullable;
|
|||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.base.BaseMwmRecyclerFragment;
|
import app.organicmaps.base.BaseMwmRecyclerFragment;
|
||||||
|
|
||||||
public class SimpleTimetableFragment
|
public class SimpleTimetableFragment extends BaseMwmRecyclerFragment<SimpleTimetableAdapter>
|
||||||
extends BaseMwmRecyclerFragment<SimpleTimetableAdapter> implements TimetableProvider
|
implements TimetableProvider
|
||||||
{
|
{
|
||||||
private SimpleTimetableAdapter mAdapter;
|
private SimpleTimetableAdapter mAdapter;
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|||||||
@@ -35,30 +35,25 @@ public class LayerBottomSheetItem
|
|||||||
@DrawableRes
|
@DrawableRes
|
||||||
int drawableResId = 0;
|
int drawableResId = 0;
|
||||||
@StringRes
|
@StringRes
|
||||||
int buttonTextResource = switch (mode)
|
int buttonTextResource = switch (mode) {
|
||||||
{
|
case OUTDOORS -> {
|
||||||
case OUTDOORS ->
|
drawableResId = R.drawable.ic_layers_outdoors;
|
||||||
{
|
yield R.string.button_layer_outdoor;
|
||||||
drawableResId = R.drawable.ic_layers_outdoors;
|
}
|
||||||
yield R.string.button_layer_outdoor;
|
case SUBWAY -> {
|
||||||
}
|
drawableResId = R.drawable.ic_layers_subway;
|
||||||
case SUBWAY ->
|
yield R.string.subway;
|
||||||
{
|
}
|
||||||
drawableResId = R.drawable.ic_layers_subway;
|
case ISOLINES -> {
|
||||||
yield R.string.subway;
|
drawableResId = R.drawable.ic_layers_isoline;
|
||||||
}
|
yield R.string.button_layer_isolines;
|
||||||
case ISOLINES ->
|
}
|
||||||
{
|
case TRAFFIC -> {
|
||||||
drawableResId = R.drawable.ic_layers_isoline;
|
drawableResId = R.drawable.ic_layers_traffic;
|
||||||
yield R.string.button_layer_isolines;
|
yield R.string.button_layer_traffic;
|
||||||
}
|
}
|
||||||
case TRAFFIC ->
|
|
||||||
{
|
|
||||||
drawableResId = R.drawable.ic_layers_traffic;
|
|
||||||
yield R.string.button_layer_traffic;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
return new LayerBottomSheetItem(drawableResId, buttonTextResource, mode, layerItemClickListener);
|
return new LayerBottomSheetItem(drawableResId, buttonTextResource, mode, layerItemClickListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ import android.widget.ImageView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.adapter.OnItemClickListener;
|
import app.organicmaps.adapter.OnItemClickListener;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
|
||||||
|
|
||||||
class LayerHolder extends RecyclerView.ViewHolder
|
class LayerHolder extends RecyclerView.ViewHolder
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ public class MapButtonsController extends Fragment
|
|||||||
0;
|
0;
|
||||||
// Allow offset tolerance for zoom buttons
|
// Allow offset tolerance for zoom buttons
|
||||||
};
|
};
|
||||||
showButton(getViewTopOffset(translation, button) >= toleranceOffset, entry.getKey());
|
showButton(getViewTopOffset(translation, button) >= toleranceOffset, entry.getKey());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ import app.organicmaps.util.UiUtils;
|
|||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
import app.organicmaps.widget.recycler.DotDividerItemDecoration;
|
import app.organicmaps.widget.recycler.DotDividerItemDecoration;
|
||||||
import app.organicmaps.widget.recycler.MultilineLayoutManager;
|
import app.organicmaps.widget.recycler.MultilineLayoutManager;
|
||||||
|
|
||||||
import com.google.android.material.button.MaterialButton;
|
import com.google.android.material.button.MaterialButton;
|
||||||
import com.google.android.material.imageview.ShapeableImageView;
|
import com.google.android.material.imageview.ShapeableImageView;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
@@ -122,9 +123,9 @@ final class RoutingBottomMenuController implements View.OnClickListener
|
|||||||
@NonNull View timeElevationLine, @NonNull View transitFrame,
|
@NonNull View timeElevationLine, @NonNull View transitFrame,
|
||||||
@NonNull MaterialTextView error, @NonNull MaterialButton start,
|
@NonNull MaterialTextView error, @NonNull MaterialButton start,
|
||||||
@NonNull ShapeableImageView altitudeChart, @NonNull MaterialTextView time,
|
@NonNull ShapeableImageView altitudeChart, @NonNull MaterialTextView time,
|
||||||
@NonNull MaterialTextView altitudeDifference,
|
@NonNull MaterialTextView altitudeDifference, @NonNull MaterialTextView timeVehicle,
|
||||||
@NonNull MaterialTextView timeVehicle, @Nullable MaterialTextView arrival,
|
@Nullable MaterialTextView arrival, @NonNull View actionFrame,
|
||||||
@NonNull View actionFrame, @Nullable RoutingBottomMenuListener listener)
|
@Nullable RoutingBottomMenuListener listener)
|
||||||
{
|
{
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mAltitudeChartFrame = altitudeChartFrame;
|
mAltitudeChartFrame = altitudeChartFrame;
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ import androidx.annotation.IdRes;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import app.organicmaps.MwmApplication;
|
import app.organicmaps.MwmApplication;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.sdk.Framework;
|
import app.organicmaps.sdk.Framework;
|
||||||
@@ -26,7 +29,6 @@ import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
|
|||||||
import app.organicmaps.widget.RoutingToolbarButton;
|
import app.organicmaps.widget.RoutingToolbarButton;
|
||||||
import app.organicmaps.widget.ToolbarController;
|
import app.organicmaps.widget.ToolbarController;
|
||||||
import app.organicmaps.widget.WheelProgressView;
|
import app.organicmaps.widget.WheelProgressView;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
|
||||||
|
|
||||||
public class RoutingPlanController extends ToolbarController
|
public class RoutingPlanController extends ToolbarController
|
||||||
{
|
{
|
||||||
@@ -262,7 +264,7 @@ public class RoutingPlanController extends ToolbarController
|
|||||||
default -> throw new IllegalArgumentException("unknown router: " + router);
|
default -> throw new IllegalArgumentException("unknown router: " + router);
|
||||||
};
|
};
|
||||||
|
|
||||||
RoutingToolbarButton button = mRouterTypes.findViewById(mRouterTypes.getCheckedRadioButtonId());
|
RoutingToolbarButton button = mRouterTypes.findViewById(mRouterTypes.getCheckedRadioButtonId());
|
||||||
button.progress();
|
button.progress();
|
||||||
|
|
||||||
updateProgressLabels();
|
updateProgressLabels();
|
||||||
|
|||||||
@@ -14,10 +14,12 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.sdk.search.DisplayedCategories;
|
import app.organicmaps.sdk.search.DisplayedCategories;
|
||||||
import app.organicmaps.sdk.util.Language;
|
import app.organicmaps.sdk.util.Language;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|||||||
@@ -10,12 +10,14 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.sdk.search.SearchResult;
|
import app.organicmaps.sdk.search.SearchResult;
|
||||||
import app.organicmaps.util.Graphics;
|
import app.organicmaps.util.Graphics;
|
||||||
import app.organicmaps.util.ThemeUtils;
|
import app.organicmaps.util.ThemeUtils;
|
||||||
import app.organicmaps.util.UiUtils;
|
import app.organicmaps.util.UiUtils;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
|
||||||
|
|
||||||
class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHolder>
|
class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHolder>
|
||||||
{
|
{
|
||||||
@@ -150,8 +152,7 @@ class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHol
|
|||||||
{
|
{
|
||||||
final Resources resources = mSearchFragment.getResources();
|
final Resources resources = mSearchFragment.getResources();
|
||||||
|
|
||||||
if (result.description.openNow != SearchResult.OPEN_NOW_YES
|
if (result.description.openNow != SearchResult.OPEN_NOW_YES && result.description.openNow != SearchResult.OPEN_NOW_NO)
|
||||||
&& result.description.openNow != SearchResult.OPEN_NOW_NO)
|
|
||||||
{
|
{
|
||||||
// Hide if unknown opening hours state
|
// Hide if unknown opening hours state
|
||||||
UiUtils.hide(mOpen);
|
UiUtils.hide(mOpen);
|
||||||
@@ -168,18 +169,15 @@ class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHol
|
|||||||
{
|
{
|
||||||
final String minsToChangeStr = resources.getQuantityString(
|
final String minsToChangeStr = resources.getQuantityString(
|
||||||
R.plurals.minutes_short, Math.max(minsToNextState, 1), Math.max(minsToNextState, 1));
|
R.plurals.minutes_short, Math.max(minsToNextState, 1), Math.max(minsToNextState, 1));
|
||||||
final String nextChangeFormatted =
|
final String nextChangeFormatted = resources.getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
|
||||||
resources.getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
|
|
||||||
|
|
||||||
UiUtils.setTextAndShow(mOpen, nextChangeFormatted);
|
UiUtils.setTextAndShow(mOpen, nextChangeFormatted);
|
||||||
mOpen.setTextColor(ContextCompat.getColor(mSearchFragment.getContext(), R.color.base_yellow));
|
mOpen.setTextColor(ContextCompat.getColor(mSearchFragment.getContext(), R.color.base_yellow));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UiUtils.setTextAndShow(
|
UiUtils.setTextAndShow(mOpen, isOpen ? resources.getString(R.string.editor_time_open) : resources.getString(R.string.closed));
|
||||||
mOpen, isOpen ? resources.getString(R.string.editor_time_open) : resources.getString(R.string.closed));
|
mOpen.setTextColor(ContextCompat.getColor(mSearchFragment.getContext(), isOpen ? R.color.base_green : R.color.base_red));
|
||||||
mOpen.setTextColor(
|
|
||||||
ContextCompat.getColor(mSearchFragment.getContext(), isOpen ? R.color.base_green : R.color.base_red));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -273,8 +273,7 @@ public class SearchFragment extends BaseMwmFragment implements SearchListener, C
|
|||||||
RecyclerView mResults = mResultsFrame.findViewById(R.id.recycler);
|
RecyclerView mResults = mResultsFrame.findViewById(R.id.recycler);
|
||||||
setRecyclerScrollListener(mResults);
|
setRecyclerScrollListener(mResults);
|
||||||
mResultsPlaceholder = mResultsFrame.findViewById(R.id.placeholder);
|
mResultsPlaceholder = mResultsFrame.findViewById(R.id.placeholder);
|
||||||
mResultsPlaceholder.setContent(R.string.search_not_found, R.string.search_not_found_query,
|
mResultsPlaceholder.setContent(R.string.search_not_found, R.string.search_not_found_query, R.drawable.ic_search_fail);
|
||||||
R.drawable.ic_search_fail);
|
|
||||||
mSearchAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver()
|
mSearchAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver()
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,13 +5,15 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import app.organicmaps.MwmApplication;
|
import app.organicmaps.MwmApplication;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.sdk.routing.RoutingController;
|
import app.organicmaps.sdk.routing.RoutingController;
|
||||||
import app.organicmaps.sdk.search.SearchRecents;
|
import app.organicmaps.sdk.search.SearchRecents;
|
||||||
import app.organicmaps.util.Graphics;
|
import app.organicmaps.util.Graphics;
|
||||||
import app.organicmaps.widget.SearchToolbarController;
|
import app.organicmaps.widget.SearchToolbarController;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
|
||||||
|
|
||||||
class SearchHistoryAdapter extends RecyclerView.Adapter<SearchHistoryAdapter.ViewHolder>
|
class SearchHistoryAdapter extends RecyclerView.Adapter<SearchHistoryAdapter.ViewHolder>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,12 +8,14 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.google.android.material.materialswitch.MaterialSwitch;
|
||||||
|
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.base.BaseMwmToolbarFragment;
|
import app.organicmaps.base.BaseMwmToolbarFragment;
|
||||||
import app.organicmaps.sdk.routing.RoutingController;
|
import app.organicmaps.sdk.routing.RoutingController;
|
||||||
import app.organicmaps.sdk.routing.RoutingOptions;
|
import app.organicmaps.sdk.routing.RoutingOptions;
|
||||||
import app.organicmaps.sdk.settings.RoadType;
|
import app.organicmaps.sdk.settings.RoadType;
|
||||||
import com.google.android.material.materialswitch.MaterialSwitch;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|||||||
@@ -4,16 +4,23 @@ import static app.organicmaps.leftbutton.LeftButtonsHolder.DISABLE_BUTTON_CODE;
|
|||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.preference.ListPreference;
|
import androidx.preference.ListPreference;
|
||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
import androidx.preference.PreferenceCategory;
|
import androidx.preference.PreferenceCategory;
|
||||||
|
import androidx.preference.PreferenceManager;
|
||||||
import androidx.preference.TwoStatePreference;
|
import androidx.preference.TwoStatePreference;
|
||||||
|
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
import app.organicmaps.MwmApplication;
|
import app.organicmaps.MwmApplication;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
|
import app.organicmaps.dialog.CustomMapServerDialog;
|
||||||
import app.organicmaps.downloader.OnmapDownloader;
|
import app.organicmaps.downloader.OnmapDownloader;
|
||||||
import app.organicmaps.editor.LanguagesFragment;
|
import app.organicmaps.editor.LanguagesFragment;
|
||||||
import app.organicmaps.editor.ProfileActivity;
|
import app.organicmaps.editor.ProfileActivity;
|
||||||
@@ -35,7 +42,7 @@ import app.organicmaps.sdk.util.SharedPropertiesUtils;
|
|||||||
import app.organicmaps.sdk.util.log.LogsManager;
|
import app.organicmaps.sdk.util.log.LogsManager;
|
||||||
import app.organicmaps.util.ThemeSwitcher;
|
import app.organicmaps.util.ThemeSwitcher;
|
||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -73,6 +80,7 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
|
|||||||
initScreenSleepEnabledPrefsCallbacks();
|
initScreenSleepEnabledPrefsCallbacks();
|
||||||
initShowOnLockScreenPrefsCallbacks();
|
initShowOnLockScreenPrefsCallbacks();
|
||||||
initLeftButtonPrefs();
|
initLeftButtonPrefs();
|
||||||
|
initCustomMapDownloadUrlPrefsCallbacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initLeftButtonPrefs()
|
private void initLeftButtonPrefs()
|
||||||
@@ -535,6 +543,34 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initCustomMapDownloadUrlPrefsCallbacks()
|
||||||
|
{
|
||||||
|
Preference customUrlPref = getPreference(getString(R.string.pref_custom_map_download_url));
|
||||||
|
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(requireContext());
|
||||||
|
|
||||||
|
String current = prefs.getString(getString(R.string.pref_custom_map_download_url), "");
|
||||||
|
String normalizedUrl = Framework.normalizeServerUrl(current);
|
||||||
|
|
||||||
|
// Initial summary
|
||||||
|
customUrlPref.setSummary(normalizedUrl.isEmpty()
|
||||||
|
? getString(R.string.download_resources_custom_url_summary_none)
|
||||||
|
: normalizedUrl);
|
||||||
|
|
||||||
|
// Sync native
|
||||||
|
Framework.applyCustomMapDownloadUrl(requireContext(), normalizedUrl);
|
||||||
|
|
||||||
|
// Show dialog
|
||||||
|
customUrlPref.setOnPreferenceClickListener(preference -> {
|
||||||
|
CustomMapServerDialog.show(requireContext(), url -> {
|
||||||
|
preference.setSummary(url.isEmpty()
|
||||||
|
? getString(R.string.download_resources_custom_url_summary_none)
|
||||||
|
: url);
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void removePreference(@NonNull String categoryKey, @NonNull Preference preference)
|
private void removePreference(@NonNull String categoryKey, @NonNull Preference preference)
|
||||||
{
|
{
|
||||||
final PreferenceCategory category = getPreference(categoryKey);
|
final PreferenceCategory category = getPreference(categoryKey);
|
||||||
|
|||||||
@@ -8,165 +8,165 @@ import android.graphics.Typeface;
|
|||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
public abstract class BaseSignView extends View
|
public abstract class BaseSignView extends View
|
||||||
{
|
{
|
||||||
private float mBorderWidthRatio = 0.1f;
|
private float mBorderWidthRatio = 0.1f;
|
||||||
protected void setBorderWidthRatio(float ratio)
|
protected void setBorderWidthRatio(float ratio) {
|
||||||
{
|
mBorderWidthRatio = ratio;
|
||||||
mBorderWidthRatio = ratio;
|
|
||||||
}
|
|
||||||
|
|
||||||
private float mBorderInsetRatio = 0f;
|
|
||||||
protected void setBorderInsetRatio(float ratio)
|
|
||||||
{
|
|
||||||
mBorderInsetRatio = ratio;
|
|
||||||
}
|
|
||||||
|
|
||||||
// colors
|
|
||||||
protected int mBackgroundColor;
|
|
||||||
protected int mBorderColor;
|
|
||||||
protected int mAlertColor;
|
|
||||||
protected int mTextColor;
|
|
||||||
protected int mTextAlertColor;
|
|
||||||
|
|
||||||
// paints
|
|
||||||
protected final Paint mBackgroundPaint;
|
|
||||||
protected final Paint mBorderPaint;
|
|
||||||
protected final Paint mTextPaint;
|
|
||||||
|
|
||||||
// geometry
|
|
||||||
protected float mWidth;
|
|
||||||
protected float mHeight;
|
|
||||||
protected float mRadius;
|
|
||||||
protected float mBorderWidth;
|
|
||||||
protected float mBorderRadius;
|
|
||||||
|
|
||||||
public BaseSignView(Context ctx, @Nullable AttributeSet attrs)
|
|
||||||
{
|
|
||||||
super(ctx, attrs);
|
|
||||||
mBackgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
|
||||||
mBorderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
|
||||||
mBorderPaint.setStyle(Paint.Style.STROKE);
|
|
||||||
mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
|
||||||
mTextPaint.setTextAlign(Paint.Align.CENTER);
|
|
||||||
mTextPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void setColors(int backgroundColor, int borderColor, int alertColor, int textColor, int textAlertColor)
|
|
||||||
{
|
|
||||||
mBackgroundColor = backgroundColor;
|
|
||||||
mBorderColor = borderColor;
|
|
||||||
mAlertColor = alertColor;
|
|
||||||
mTextColor = textColor;
|
|
||||||
mTextAlertColor = textAlertColor;
|
|
||||||
|
|
||||||
mBackgroundPaint.setColor(mBackgroundColor);
|
|
||||||
mBorderPaint.setColor(mBorderColor);
|
|
||||||
mTextPaint.setColor(mTextColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight)
|
|
||||||
{
|
|
||||||
super.onSizeChanged(width, height, oldWidth, oldHeight);
|
|
||||||
final float paddingX = getPaddingLeft() + getPaddingRight();
|
|
||||||
final float paddingY = getPaddingTop() + getPaddingBottom();
|
|
||||||
mWidth = width - paddingX;
|
|
||||||
mHeight = height - paddingY;
|
|
||||||
mRadius = Math.min(mWidth, mHeight) / 2f;
|
|
||||||
mBorderWidth = mRadius * mBorderWidthRatio;
|
|
||||||
// subtract half the stroke PLUS the extra inset
|
|
||||||
final float gap = mRadius * mBorderInsetRatio;
|
|
||||||
mBorderRadius = mRadius - (mBorderWidth / 2f) - gap;
|
|
||||||
configureTextSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDraw(@NonNull Canvas canvas)
|
|
||||||
{
|
|
||||||
super.onDraw(canvas);
|
|
||||||
final String str = getValueString();
|
|
||||||
if (str == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
final float cx = mWidth / 2f;
|
|
||||||
final float cy = mHeight / 2f;
|
|
||||||
|
|
||||||
// background & border
|
|
||||||
boolean alert = isAlert();
|
|
||||||
mBackgroundPaint.setColor(alert ? mAlertColor : mBackgroundColor);
|
|
||||||
canvas.drawCircle(cx, cy, mRadius, mBackgroundPaint);
|
|
||||||
if (!alert)
|
|
||||||
{
|
|
||||||
mBorderPaint.setStrokeWidth(mBorderWidth);
|
|
||||||
mBorderPaint.setColor(mBorderColor);
|
|
||||||
canvas.drawCircle(cx, cy, mBorderRadius, mBorderPaint);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// text
|
private float mBorderInsetRatio = 0f;
|
||||||
mTextPaint.setColor(alert ? mTextAlertColor : mTextColor);
|
protected void setBorderInsetRatio(float ratio) {
|
||||||
drawValueString(canvas, cx, cy, str);
|
mBorderInsetRatio = ratio;
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onTouchEvent(@NonNull MotionEvent e)
|
|
||||||
{
|
|
||||||
final float cx = mWidth / 2f, cy = mHeight / 2f;
|
|
||||||
final float dx = e.getX() - cx, dy = e.getY() - cy;
|
|
||||||
if ((dx * dx) + (dy * dy) <= (mRadius * mRadius))
|
|
||||||
{
|
|
||||||
performClick();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
// colors
|
||||||
public boolean performClick()
|
protected int mBackgroundColor;
|
||||||
{
|
protected int mBorderColor;
|
||||||
super.performClick();
|
protected int mAlertColor;
|
||||||
return false;
|
protected int mTextColor;
|
||||||
}
|
protected int mTextAlertColor;
|
||||||
|
|
||||||
private void drawValueString(Canvas c, float cx, float cy, String str)
|
// paints
|
||||||
{
|
protected final Paint mBackgroundPaint;
|
||||||
Rect b = new Rect();
|
protected final Paint mBorderPaint;
|
||||||
mTextPaint.getTextBounds(str, 0, str.length(), b);
|
protected final Paint mTextPaint;
|
||||||
final float y = cy - b.exactCenterY();
|
|
||||||
c.drawText(str, cx, y, mTextPaint);
|
|
||||||
}
|
|
||||||
|
|
||||||
void configureTextSize()
|
// geometry
|
||||||
{
|
protected float mWidth;
|
||||||
String text = getValueString();
|
protected float mHeight;
|
||||||
if (text == null)
|
protected float mRadius;
|
||||||
return;
|
protected float mBorderWidth;
|
||||||
final float textRadius = mBorderRadius - mBorderWidth;
|
protected float mBorderRadius;
|
||||||
final float maxTextSize = 2f * textRadius;
|
|
||||||
final float maxTextSize2 = maxTextSize * maxTextSize;
|
public BaseSignView(Context ctx, @Nullable AttributeSet attrs)
|
||||||
float lo = 0f, hi = maxTextSize, sz = maxTextSize;
|
|
||||||
Rect b = new Rect();
|
|
||||||
while (lo <= hi)
|
|
||||||
{
|
{
|
||||||
sz = (lo + hi) / 2f;
|
super(ctx, attrs);
|
||||||
mTextPaint.setTextSize(sz);
|
mBackgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
mTextPaint.getTextBounds(text, 0, text.length(), b);
|
mBorderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
float area = b.width() * b.width() + b.height() * b.height();
|
mBorderPaint.setStyle(Paint.Style.STROKE);
|
||||||
if (area <= maxTextSize2)
|
mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
lo = sz + 1f;
|
mTextPaint.setTextAlign(Paint.Align.CENTER);
|
||||||
else
|
mTextPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
|
||||||
hi = sz - 1f;
|
|
||||||
}
|
}
|
||||||
mTextPaint.setTextSize(Math.max(1f, sz));
|
|
||||||
}
|
|
||||||
|
|
||||||
/** child must return the string to draw, or null if nothing */
|
protected void setColors(int backgroundColor,
|
||||||
@Nullable
|
int borderColor,
|
||||||
protected abstract String getValueString();
|
int alertColor,
|
||||||
|
int textColor,
|
||||||
|
int textAlertColor)
|
||||||
|
{
|
||||||
|
mBackgroundColor = backgroundColor;
|
||||||
|
mBorderColor = borderColor;
|
||||||
|
mAlertColor = alertColor;
|
||||||
|
mTextColor = textColor;
|
||||||
|
mTextAlertColor = textAlertColor;
|
||||||
|
|
||||||
/** child decides if this is in “alert” state */
|
mBackgroundPaint.setColor(mBackgroundColor);
|
||||||
protected abstract boolean isAlert();
|
mBorderPaint.setColor(mBorderColor);
|
||||||
|
mTextPaint.setColor(mTextColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight) {
|
||||||
|
super.onSizeChanged(width, height, oldWidth, oldHeight);
|
||||||
|
final float paddingX = getPaddingLeft() + getPaddingRight();
|
||||||
|
final float paddingY = getPaddingTop() + getPaddingBottom();
|
||||||
|
mWidth = width - paddingX;
|
||||||
|
mHeight = height - paddingY;
|
||||||
|
mRadius = Math.min(mWidth, mHeight) / 2f;
|
||||||
|
mBorderWidth = mRadius * mBorderWidthRatio;
|
||||||
|
// subtract half the stroke PLUS the extra inset
|
||||||
|
final float gap = mRadius * mBorderInsetRatio;
|
||||||
|
mBorderRadius = mRadius - (mBorderWidth / 2f) - gap;
|
||||||
|
configureTextSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDraw(@NonNull Canvas canvas)
|
||||||
|
{
|
||||||
|
super.onDraw(canvas);
|
||||||
|
final String str = getValueString();
|
||||||
|
if (str == null) return;
|
||||||
|
|
||||||
|
final float cx = mWidth / 2f;
|
||||||
|
final float cy = mHeight / 2f;
|
||||||
|
|
||||||
|
// background & border
|
||||||
|
boolean alert = isAlert();
|
||||||
|
mBackgroundPaint.setColor(alert ? mAlertColor : mBackgroundColor);
|
||||||
|
canvas.drawCircle(cx, cy, mRadius, mBackgroundPaint);
|
||||||
|
if (!alert)
|
||||||
|
{
|
||||||
|
mBorderPaint.setStrokeWidth(mBorderWidth);
|
||||||
|
mBorderPaint.setColor(mBorderColor);
|
||||||
|
canvas.drawCircle(cx, cy, mBorderRadius, mBorderPaint);
|
||||||
|
}
|
||||||
|
|
||||||
|
// text
|
||||||
|
mTextPaint.setColor(alert ? mTextAlertColor : mTextColor);
|
||||||
|
drawValueString(canvas, cx, cy, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(@NonNull MotionEvent e)
|
||||||
|
{
|
||||||
|
final float cx = mWidth / 2f, cy = mHeight / 2f;
|
||||||
|
final float dx = e.getX() - cx, dy = e.getY() - cy;
|
||||||
|
if ((dx * dx) + (dy * dy) <= (mRadius * mRadius))
|
||||||
|
{
|
||||||
|
performClick();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean performClick()
|
||||||
|
{
|
||||||
|
super.performClick();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawValueString(Canvas c, float cx, float cy, String str)
|
||||||
|
{
|
||||||
|
Rect b = new Rect();
|
||||||
|
mTextPaint.getTextBounds(str, 0, str.length(), b);
|
||||||
|
final float y = cy - b.exactCenterY();
|
||||||
|
c.drawText(str, cx, y, mTextPaint);
|
||||||
|
}
|
||||||
|
|
||||||
|
void configureTextSize()
|
||||||
|
{
|
||||||
|
String text = getValueString();
|
||||||
|
if (text == null) return;
|
||||||
|
final float textRadius = mBorderRadius - mBorderWidth;
|
||||||
|
final float maxTextSize = 2f * textRadius;
|
||||||
|
final float maxTextSize2 = maxTextSize * maxTextSize;
|
||||||
|
float lo = 0f, hi = maxTextSize, sz = maxTextSize;
|
||||||
|
Rect b = new Rect();
|
||||||
|
while (lo <= hi)
|
||||||
|
{
|
||||||
|
sz = (lo + hi) / 2f;
|
||||||
|
mTextPaint.setTextSize(sz);
|
||||||
|
mTextPaint.getTextBounds(text, 0, text.length(), b);
|
||||||
|
float area = b.width()*b.width() + b.height()*b.height();
|
||||||
|
if (area <= maxTextSize2)
|
||||||
|
lo = sz + 1f;
|
||||||
|
else
|
||||||
|
hi = sz - 1f;
|
||||||
|
}
|
||||||
|
mTextPaint.setTextSize(Math.max(1f, sz));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** child must return the string to draw, or null if nothing */
|
||||||
|
@Nullable
|
||||||
|
protected abstract String getValueString();
|
||||||
|
|
||||||
|
/** child decides if this is in “alert” state */
|
||||||
|
protected abstract boolean isAlert();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ import android.content.Context;
|
|||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.sdk.util.StringUtils;
|
import app.organicmaps.sdk.util.StringUtils;
|
||||||
|
|
||||||
@@ -20,18 +22,18 @@ public class CurrentSpeedView extends BaseSignView
|
|||||||
setBorderWidthRatio(0.1f);
|
setBorderWidthRatio(0.1f);
|
||||||
setBorderInsetRatio(0.05f);
|
setBorderInsetRatio(0.05f);
|
||||||
|
|
||||||
try (TypedArray a = ctx.getTheme().obtainStyledAttributes(
|
try (TypedArray a = ctx.getTheme()
|
||||||
attrs, R.styleable.CurrentSpeedView /* reuse same attrs or define new */, 0, 0))
|
.obtainStyledAttributes(attrs, R.styleable.CurrentSpeedView /* reuse same attrs or define new */ , 0, 0))
|
||||||
{
|
{
|
||||||
int bg = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBackgroundColor, DefaultValues.BACKGROUND_COLOR);
|
int bg = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBackgroundColor, DefaultValues.BACKGROUND_COLOR);
|
||||||
int bd = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBorderColor, DefaultValues.BORDER_COLOR);
|
int bd = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBorderColor, DefaultValues.BORDER_COLOR);
|
||||||
int tc = a.getColor(R.styleable.CurrentSpeedView_currentSpeedTextColor, DefaultValues.TEXT_COLOR);
|
int tc = a.getColor(R.styleable.CurrentSpeedView_currentSpeedTextColor, DefaultValues.TEXT_COLOR);
|
||||||
setColors(bg, bd, 0, tc, 0);
|
setColors(bg, bd, 0, tc, 0);
|
||||||
|
|
||||||
if (isInEditMode())
|
if (isInEditMode())
|
||||||
{
|
{
|
||||||
mSpeedMps = a.getInt(R.styleable.CurrentSpeedView_currentSpeedEditModeCurrentSpeed, 50);
|
mSpeedMps = a.getInt(R.styleable.CurrentSpeedView_currentSpeedEditModeCurrentSpeed, 50);
|
||||||
mSpeedStr = Integer.toString((int) mSpeedMps);
|
mSpeedStr = Integer.toString((int)mSpeedMps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,7 +47,7 @@ public class CurrentSpeedView extends BaseSignView
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pair<String, String> su = StringUtils.nativeFormatSpeedAndUnits(mps);
|
Pair<String,String> su = StringUtils.nativeFormatSpeedAndUnits(mps);
|
||||||
mSpeedStr = su.first;
|
mSpeedStr = su.first;
|
||||||
}
|
}
|
||||||
requestLayout();
|
requestLayout();
|
||||||
@@ -68,8 +70,8 @@ public class CurrentSpeedView extends BaseSignView
|
|||||||
|
|
||||||
private interface DefaultValues
|
private interface DefaultValues
|
||||||
{
|
{
|
||||||
int BACKGROUND_COLOR = 0xFFFFFFFF;
|
int BACKGROUND_COLOR = 0xFFFFFFFF;
|
||||||
int BORDER_COLOR = 0xFF000000;
|
int BORDER_COLOR = 0xFF000000;
|
||||||
int TEXT_COLOR = 0xFF000000;
|
int TEXT_COLOR = 0xFF000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,11 +12,13 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import app.organicmaps.R;
|
|
||||||
import app.organicmaps.util.UiUtils;
|
|
||||||
import com.google.android.material.imageview.ShapeableImageView;
|
import com.google.android.material.imageview.ShapeableImageView;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
|
import app.organicmaps.R;
|
||||||
|
import app.organicmaps.util.UiUtils;
|
||||||
|
|
||||||
public class PlaceholderView extends LinearLayout
|
public class PlaceholderView extends LinearLayout
|
||||||
{
|
{
|
||||||
@SuppressWarnings("NullableProblems")
|
@SuppressWarnings("NullableProblems")
|
||||||
|
|||||||
@@ -5,14 +5,16 @@ import android.content.res.TypedArray;
|
|||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
|
|
||||||
public class SpeedLimitView extends BaseSignView
|
public class SpeedLimitView extends BaseSignView
|
||||||
{
|
{
|
||||||
private int mSpeedLimit = -1;
|
private int mSpeedLimit = -1;
|
||||||
private boolean mAlert = false;
|
private boolean mAlert = false;
|
||||||
private String mSpeedStr = "-1";
|
private String mSpeedStr = "-1";
|
||||||
private final int unlimitedBorderColor;
|
private final int unlimitedBorderColor;
|
||||||
private final int unlimitedStripeColor;
|
private final int unlimitedStripeColor;
|
||||||
|
|
||||||
@@ -25,22 +27,15 @@ public class SpeedLimitView extends BaseSignView
|
|||||||
|
|
||||||
try (TypedArray styleAttrs = ctx.getTheme().obtainStyledAttributes(attrs, R.styleable.SpeedLimitView, 0, 0))
|
try (TypedArray styleAttrs = ctx.getTheme().obtainStyledAttributes(attrs, R.styleable.SpeedLimitView, 0, 0))
|
||||||
{
|
{
|
||||||
final int bgColor =
|
final int bgColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBackgroundColor, DefaultValues.BACKGROUND_COLOR);
|
||||||
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBackgroundColor, DefaultValues.BACKGROUND_COLOR);
|
final int borderColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBorderColor, DefaultValues.BORDER_COLOR);
|
||||||
final int borderColor =
|
final int alertColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitAlertColor, DefaultValues.ALERT_COLOR);
|
||||||
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBorderColor, DefaultValues.BORDER_COLOR);
|
final int textColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitTextColor, DefaultValues.TEXT_COLOR);
|
||||||
final int alertColor =
|
final int txtAlertColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitTextAlertColor, DefaultValues.TEXT_ALERT_COLOR);
|
||||||
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitAlertColor, DefaultValues.ALERT_COLOR);
|
|
||||||
final int textColor =
|
|
||||||
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitTextColor, DefaultValues.TEXT_COLOR);
|
|
||||||
final int txtAlertColor =
|
|
||||||
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitTextAlertColor, DefaultValues.TEXT_ALERT_COLOR);
|
|
||||||
setColors(bgColor, borderColor, alertColor, textColor, txtAlertColor);
|
setColors(bgColor, borderColor, alertColor, textColor, txtAlertColor);
|
||||||
|
|
||||||
unlimitedBorderColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedBorderColor,
|
unlimitedBorderColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedBorderColor, DefaultValues.UNLIMITED_BORDER_COLOR);
|
||||||
DefaultValues.UNLIMITED_BORDER_COLOR);
|
unlimitedStripeColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedStripeColor, DefaultValues.UNLIMITED_STRIPE_COLOR);
|
||||||
unlimitedStripeColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedStripeColor,
|
|
||||||
DefaultValues.UNLIMITED_STRIPE_COLOR);
|
|
||||||
|
|
||||||
if (isInEditMode())
|
if (isInEditMode())
|
||||||
{
|
{
|
||||||
@@ -56,7 +51,7 @@ public class SpeedLimitView extends BaseSignView
|
|||||||
if (mSpeedLimit != limit)
|
if (mSpeedLimit != limit)
|
||||||
{
|
{
|
||||||
mSpeedLimit = limit;
|
mSpeedLimit = limit;
|
||||||
mSpeedStr = Integer.toString(limit);
|
mSpeedStr = Integer.toString(limit);
|
||||||
requestLayout();
|
requestLayout();
|
||||||
}
|
}
|
||||||
mAlert = alert;
|
mAlert = alert;
|
||||||
@@ -80,7 +75,7 @@ public class SpeedLimitView extends BaseSignView
|
|||||||
@Override
|
@Override
|
||||||
protected void onDraw(Canvas canvas)
|
protected void onDraw(Canvas canvas)
|
||||||
{
|
{
|
||||||
final float cx = mWidth / 2f, cy = mHeight / 2f;
|
final float cx = mWidth/2f, cy = mHeight/2f;
|
||||||
|
|
||||||
if (mSpeedLimit == 0) // 0 means unlimited speed (maxspeed=none)
|
if (mSpeedLimit == 0) // 0 means unlimited speed (maxspeed=none)
|
||||||
{
|
{
|
||||||
@@ -110,7 +105,7 @@ public class SpeedLimitView extends BaseSignView
|
|||||||
stripe.setStrokeWidth(mBorderWidth * 0.4f);
|
stripe.setStrokeWidth(mBorderWidth * 0.4f);
|
||||||
|
|
||||||
final float radius = mRadius * 0.8f; // Shorten to 80% of full radius
|
final float radius = mRadius * 0.8f; // Shorten to 80% of full radius
|
||||||
final float diag = (float) (1 / Math.sqrt(2)); // 45 degrees
|
final float diag = (float) (1/Math.sqrt(2)); // 45 degrees
|
||||||
final float dx = -diag, dy = +diag;
|
final float dx = -diag, dy = +diag;
|
||||||
final float px = -dy, py = +dx; // Perpendicular
|
final float px = -dy, py = +dx; // Perpendicular
|
||||||
final float step = radius * 0.15f; // Spacing
|
final float step = radius * 0.15f; // Spacing
|
||||||
@@ -127,13 +122,14 @@ public class SpeedLimitView extends BaseSignView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private interface DefaultValues
|
private interface DefaultValues
|
||||||
{
|
{
|
||||||
int BACKGROUND_COLOR = 0xFFFFFFFF;
|
int BACKGROUND_COLOR = 0xFFFFFFFF;
|
||||||
int BORDER_COLOR = 0xFFFF0000;
|
int BORDER_COLOR = 0xFFFF0000;
|
||||||
int ALERT_COLOR = 0xFFFF0000;
|
int ALERT_COLOR = 0xFFFF0000;
|
||||||
int TEXT_COLOR = 0xFF000000;
|
int TEXT_COLOR = 0xFF000000;
|
||||||
int TEXT_ALERT_COLOR = 0xFFFFFFFF;
|
int TEXT_ALERT_COLOR = 0xFFFFFFFF;
|
||||||
int UNLIMITED_BORDER_COLOR = 0xFF000000;
|
int UNLIMITED_BORDER_COLOR = 0xFF000000;
|
||||||
int UNLIMITED_STRIPE_COLOR = 0xFF000000;
|
int UNLIMITED_STRIPE_COLOR = 0xFF000000;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class MyPositionButton
|
|||||||
case LocationState.FOLLOW_AND_ROTATE -> R.drawable.ic_follow_and_rotate;
|
case LocationState.FOLLOW_AND_ROTATE -> R.drawable.ic_follow_and_rotate;
|
||||||
default -> throw new IllegalArgumentException("Invalid button mode: " + mode);
|
default -> throw new IllegalArgumentException("Invalid button mode: " + mode);
|
||||||
};
|
};
|
||||||
image = ResourcesCompat.getDrawable(resources, drawableRes, context.getTheme());
|
image = ResourcesCompat.getDrawable(resources, drawableRes, context.getTheme());
|
||||||
mIcons.put(mode, image);
|
mIcons.put(mode, image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package app.organicmaps.widget.placepage;
|
package app.organicmaps.widget.placepage;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import app.organicmaps.sdk.util.StringUtils;
|
import app.organicmaps.sdk.util.StringUtils;
|
||||||
import com.github.mikephil.charting.charts.BarLineChartBase;
|
import com.github.mikephil.charting.charts.BarLineChartBase;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import com.github.mikephil.charting.components.AxisBase;
|
import com.github.mikephil.charting.components.AxisBase;
|
||||||
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
|
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
|
||||||
|
|
||||||
|
|||||||
@@ -105,8 +105,7 @@ public class EditBookmarkFragment extends BaseMwmDialogFragment implements View.
|
|||||||
public EditBookmarkFragment() {}
|
public EditBookmarkFragment() {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState)
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
{
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setStyle(DialogFragment.STYLE_NORMAL, R.style.MwmTheme_FullScreenDialog);
|
setStyle(DialogFragment.STYLE_NORMAL, R.style.MwmTheme_FullScreenDialog);
|
||||||
}
|
}
|
||||||
@@ -185,9 +184,10 @@ public class EditBookmarkFragment extends BaseMwmDialogFragment implements View.
|
|||||||
{
|
{
|
||||||
super.onStart();
|
super.onStart();
|
||||||
Dialog dialog = getDialog();
|
Dialog dialog = getDialog();
|
||||||
if (dialog != null)
|
if (dialog != null) {
|
||||||
{
|
dialog.getWindow().setLayout(
|
||||||
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
|
ViewGroup.LayoutParams.MATCH_PARENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Focus name and show keyboard for "Unknown Place" bookmarks
|
// Focus name and show keyboard for "Unknown Place" bookmarks
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ import android.widget.RelativeLayout;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
|
|
||||||
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import app.organicmaps.ChartController;
|
import app.organicmaps.ChartController;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.sdk.Framework;
|
import app.organicmaps.sdk.Framework;
|
||||||
@@ -14,7 +17,6 @@ import app.organicmaps.sdk.bookmarks.data.Track;
|
|||||||
import app.organicmaps.sdk.bookmarks.data.TrackStatistics;
|
import app.organicmaps.sdk.bookmarks.data.TrackStatistics;
|
||||||
import app.organicmaps.util.UiUtils;
|
import app.organicmaps.util.UiUtils;
|
||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class ElevationProfileViewRenderer implements PlacePageStateListener
|
public class ElevationProfileViewRenderer implements PlacePageStateListener
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ public class OpenStateTextFormatter
|
|||||||
return String.format(Locale.ROOT, "%02d:%02d", hour, minute);
|
return String.format(Locale.ROOT, "%02d:%02d", hour, minute);
|
||||||
|
|
||||||
int h = hour % 12;
|
int h = hour % 12;
|
||||||
if (h == 0)
|
if (h == 0) h = 12;
|
||||||
h = 12;
|
|
||||||
String ampm = (hour < 12) ? "AM" : "PM";
|
String ampm = (hour < 12) ? "AM" : "PM";
|
||||||
return String.format(Locale.ROOT, "%d:%02d %s", h, minute, ampm);
|
return String.format(Locale.ROOT, "%d:%02d %s", h, minute, ampm);
|
||||||
}
|
}
|
||||||
@@ -30,13 +29,21 @@ public class OpenStateTextFormatter
|
|||||||
return t.getDayOfWeek().getDisplayName(TextStyle.SHORT, locale);
|
return t.getDayOfWeek().getDisplayName(TextStyle.SHORT, locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
static String buildAtLabel(boolean opens, boolean isToday, String dayShort, String time, String opensAtLocalized,
|
static String buildAtLabel(
|
||||||
String closesAtLocalized, String opensDayAtLocalized, String closesDayAtLocalized)
|
boolean opens,
|
||||||
|
boolean isToday,
|
||||||
|
String dayShort,
|
||||||
|
String time,
|
||||||
|
String opensAtLocalized,
|
||||||
|
String closesAtLocalized,
|
||||||
|
String opensDayAtLocalized,
|
||||||
|
String closesDayAtLocalized
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (isToday)
|
if (isToday)
|
||||||
return opens ? String.format(Locale.ROOT, opensAtLocalized, time) // Opens at %s
|
return opens ? String.format(Locale.ROOT, opensAtLocalized, time) // Opens at %s
|
||||||
: String.format(Locale.ROOT, closesAtLocalized, time); // Closes at %s
|
: String.format(Locale.ROOT, closesAtLocalized, time); // Closes at %s
|
||||||
return opens ? String.format(Locale.ROOT, opensDayAtLocalized, dayShort, time) // Opens %s at %s
|
return opens ? String.format(Locale.ROOT, opensDayAtLocalized, dayShort, time) // Opens %s at %s
|
||||||
: String.format(Locale.ROOT, closesDayAtLocalized, dayShort, time); // Closes %s at %s
|
: String.format(Locale.ROOT, closesDayAtLocalized, dayShort, time); // Closes %s at %s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,6 @@ public class PlacePageButtonFactory
|
|||||||
yield R.drawable.ic_more;
|
yield R.drawable.ic_more;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return new PlacePageButton(titleId, iconId, buttonType);
|
return new PlacePageButton(titleId, iconId, buttonType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import androidx.fragment.app.FragmentFactory;
|
|||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.lifecycle.Observer;
|
import androidx.lifecycle.Observer;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
import app.organicmaps.MwmActivity;
|
import app.organicmaps.MwmActivity;
|
||||||
import app.organicmaps.MwmApplication;
|
import app.organicmaps.MwmApplication;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
@@ -699,20 +700,27 @@ public class PlacePageView extends Fragment
|
|||||||
|
|
||||||
if (shouldEnableEditPlace)
|
if (shouldEnableEditPlace)
|
||||||
{
|
{
|
||||||
|
mTvEditPlace.setEnabled(true);
|
||||||
|
mTvAddPlace.setEnabled(true);
|
||||||
mTvEditPlace.setOnClickListener(this);
|
mTvEditPlace.setOnClickListener(this);
|
||||||
mTvAddPlace.setOnClickListener(this);
|
mTvAddPlace.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mTvEditPlace.setOnClickListener(
|
|
||||||
(v) -> { Utils.showSnackbar(v.getContext(), v.getRootView(), R.string.place_page_too_old_to_edit); });
|
|
||||||
mTvAddPlace.setOnClickListener(
|
|
||||||
(v) -> { Utils.showSnackbar(v.getContext(), v.getRootView(), R.string.place_page_too_old_to_edit); });
|
|
||||||
|
|
||||||
String countryId = MapManager.nativeGetSelectedCountry();
|
String countryId = MapManager.nativeGetSelectedCountry();
|
||||||
|
|
||||||
if (countryId != null)
|
if (countryId != null && MapManager.nativeIsMapTooOldToEdit(countryId))
|
||||||
{
|
{
|
||||||
|
// map editing is disabled because the map is too old
|
||||||
|
mTvEditPlace.setEnabled(true);
|
||||||
|
mTvAddPlace.setEnabled(true);
|
||||||
|
mTvEditPlace.setOnClickListener((v) -> {
|
||||||
|
Utils.showSnackbar(v.getContext(), v.getRootView(), R.string.place_page_too_old_to_edit);
|
||||||
|
});
|
||||||
|
mTvAddPlace.setOnClickListener((v) -> {
|
||||||
|
Utils.showSnackbar(v.getContext(), v.getRootView(), R.string.place_page_too_old_to_edit);
|
||||||
|
});
|
||||||
|
|
||||||
CountryItem map = CountryItem.fill(countryId);
|
CountryItem map = CountryItem.fill(countryId);
|
||||||
|
|
||||||
if (map.status == CountryItem.STATUS_UPDATABLE || map.status == CountryItem.STATUS_DONE
|
if (map.status == CountryItem.STATUS_UPDATABLE || map.status == CountryItem.STATUS_DONE
|
||||||
@@ -737,6 +745,12 @@ public class PlacePageView extends Fragment
|
|||||||
mapTooOldDescription.setText(R.string.place_page_app_too_old_description);
|
mapTooOldDescription.setText(R.string.place_page_app_too_old_description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// map editing is disabled for other reasons
|
||||||
|
mTvEditPlace.setEnabled(false);
|
||||||
|
mTvAddPlace.setEnabled(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final int editButtonColor =
|
final int editButtonColor =
|
||||||
@@ -750,7 +764,9 @@ public class PlacePageView extends Fragment
|
|||||||
mTvAddPlace.setTextColor(editButtonColor);
|
mTvAddPlace.setTextColor(editButtonColor);
|
||||||
mTvEditPlace.setStrokeColor(ColorStateList.valueOf(editButtonColor));
|
mTvEditPlace.setStrokeColor(ColorStateList.valueOf(editButtonColor));
|
||||||
mTvAddPlace.setStrokeColor(ColorStateList.valueOf(editButtonColor));
|
mTvAddPlace.setStrokeColor(ColorStateList.valueOf(editButtonColor));
|
||||||
UiUtils.showIf(UiUtils.isVisible(mEditPlace) || UiUtils.isVisible(mAddPlace), mEditTopSpace);
|
UiUtils.showIf(
|
||||||
|
UiUtils.isVisible(mEditPlace) || UiUtils.isVisible(mAddPlace),
|
||||||
|
mEditTopSpace);
|
||||||
}
|
}
|
||||||
updateLinksView();
|
updateLinksView();
|
||||||
updateOpeningHoursView();
|
updateOpeningHoursView();
|
||||||
@@ -851,9 +867,10 @@ public class PlacePageView extends Fragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get colours
|
// Get colours
|
||||||
final ForegroundColorSpan colorGreen = new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_green));
|
final ForegroundColorSpan colorGreen =
|
||||||
|
new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_green));
|
||||||
final ForegroundColorSpan colorYellow =
|
final ForegroundColorSpan colorYellow =
|
||||||
new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_yellow));
|
new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_yellow));
|
||||||
final ForegroundColorSpan colorRed = new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_red));
|
final ForegroundColorSpan colorRed = new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_red));
|
||||||
|
|
||||||
// Get next state info
|
// Get next state info
|
||||||
@@ -879,12 +896,13 @@ public class PlacePageView extends Fragment
|
|||||||
if (nextStateTime > 0 && nextStateTime < Long.MAX_VALUE / 2)
|
if (nextStateTime > 0 && nextStateTime < Long.MAX_VALUE / 2)
|
||||||
{
|
{
|
||||||
// NOTE: Timezone is currently device timezone. TODO: use feature-specific timezone.
|
// NOTE: Timezone is currently device timezone. TODO: use feature-specific timezone.
|
||||||
nextChangeLocal = ZonedDateTime.ofInstant(Instant.ofEpochSecond(nextStateTime), ZoneId.systemDefault());
|
nextChangeLocal = ZonedDateTime.ofInstant(
|
||||||
|
Instant.ofEpochSecond(nextStateTime), ZoneId.systemDefault()
|
||||||
|
);
|
||||||
hasFiniteNextChange = true;
|
hasFiniteNextChange = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Throwable ignored)
|
catch (Throwable ignored) {}
|
||||||
{}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasFiniteNextChange) // No valid next change
|
if (!hasFiniteNextChange) // No valid next change
|
||||||
@@ -899,7 +917,7 @@ public class PlacePageView extends Fragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
String localizedTimeString = OpenStateTextFormatter.formatHoursMinutes(
|
String localizedTimeString = OpenStateTextFormatter.formatHoursMinutes(
|
||||||
nextChangeLocal.getHour(), nextChangeLocal.getMinute(), DateUtils.is24HourFormat(context));
|
nextChangeLocal.getHour(), nextChangeLocal.getMinute(), DateUtils.is24HourFormat(context));
|
||||||
|
|
||||||
final boolean shortHorizonClosing = isOpen && minsToNextState >= 0 && minsToNextState <= SHORT_HORIZON_CLOSE_MIN;
|
final boolean shortHorizonClosing = isOpen && minsToNextState >= 0 && minsToNextState <= SHORT_HORIZON_CLOSE_MIN;
|
||||||
final boolean shortHorizonOpening = !isOpen && minsToNextState >= 0 && minsToNextState <= SHORT_HORIZON_OPEN_MIN;
|
final boolean shortHorizonOpening = !isOpen && minsToNextState >= 0 && minsToNextState <= SHORT_HORIZON_OPEN_MIN;
|
||||||
@@ -907,12 +925,12 @@ public class PlacePageView extends Fragment
|
|||||||
if (shortHorizonClosing || shortHorizonOpening) // POI Opens/Closes in 60 mins • at 18:00
|
if (shortHorizonClosing || shortHorizonOpening) // POI Opens/Closes in 60 mins • at 18:00
|
||||||
{
|
{
|
||||||
final String minsToChangeStr = getResources().getQuantityString(
|
final String minsToChangeStr = getResources().getQuantityString(
|
||||||
R.plurals.minutes_short, Math.max(minsToNextState, 1), Math.max(minsToNextState, 1));
|
R.plurals.minutes_short, Math.max(minsToNextState, 1), Math.max(minsToNextState, 1));
|
||||||
final String nextChangeFormatted = getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
|
final String nextChangeFormatted = getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
|
||||||
|
|
||||||
openStateString.append(nextChangeFormatted, colorYellow, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
openStateString.append(nextChangeFormatted, colorYellow, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
.append(" • ") // Add spacer
|
.append(" • ") // Add spacer
|
||||||
.append(getString(R.string.at, localizedTimeString));
|
.append(getString(R.string.at, localizedTimeString));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -922,16 +940,18 @@ public class PlacePageView extends Fragment
|
|||||||
final String closesDayAtStr = getString(R.string.closes_day_at); // "Closes %1$s at %2$s"
|
final String closesDayAtStr = getString(R.string.closes_day_at); // "Closes %1$s at %2$s"
|
||||||
|
|
||||||
final boolean isToday =
|
final boolean isToday =
|
||||||
OpenStateTextFormatter.isSameLocalDate(nextChangeLocal, ZonedDateTime.now(nextChangeLocal.getZone()));
|
OpenStateTextFormatter.isSameLocalDate(nextChangeLocal, ZonedDateTime.now(nextChangeLocal.getZone()));
|
||||||
// Full weekday name per design feedback.
|
// Full weekday name per design feedback.
|
||||||
final String dayName = nextChangeLocal.getDayOfWeek().getDisplayName(TextStyle.FULL, Locale.getDefault());
|
final String dayName =
|
||||||
|
nextChangeLocal.getDayOfWeek().getDisplayName(TextStyle.FULL, Locale.getDefault());
|
||||||
|
|
||||||
if (isOpen) // > 60 minutes OR negative (safety). Show “Open now • Closes at 18:00”
|
if (isOpen) // > 60 minutes OR negative (safety). Show “Open now • Closes at 18:00”
|
||||||
{
|
{
|
||||||
openStateString.append(getString(R.string.open_now), colorGreen, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
openStateString.append(getString(R.string.open_now), colorGreen, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
|
||||||
final String atLabel = OpenStateTextFormatter.buildAtLabel(
|
final String atLabel =
|
||||||
false, isToday, dayName, localizedTimeString, opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
|
OpenStateTextFormatter.buildAtLabel(false, isToday, dayName, localizedTimeString,
|
||||||
|
opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(atLabel))
|
if (!TextUtils.isEmpty(atLabel))
|
||||||
openStateString.append(" • ").append(atLabel);
|
openStateString.append(" • ").append(atLabel);
|
||||||
@@ -940,8 +960,9 @@ public class PlacePageView extends Fragment
|
|||||||
{
|
{
|
||||||
openStateString.append(getString(R.string.closed_now), colorRed, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
openStateString.append(getString(R.string.closed_now), colorRed, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
|
||||||
final String atLabel = OpenStateTextFormatter.buildAtLabel(
|
final String atLabel =
|
||||||
true, isToday, dayName, localizedTimeString, opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
|
OpenStateTextFormatter.buildAtLabel(true, isToday, dayName, localizedTimeString,
|
||||||
|
opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(atLabel))
|
if (!TextUtils.isEmpty(atLabel))
|
||||||
openStateString.append(" • ").append(atLabel);
|
openStateString.append(" • ").append(atLabel);
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ package app.organicmaps.widget.placepage;
|
|||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
import androidx.lifecycle.ViewModel;
|
import androidx.lifecycle.ViewModel;
|
||||||
|
|
||||||
import app.organicmaps.sdk.bookmarks.data.MapObject;
|
import app.organicmaps.sdk.bookmarks.data.MapObject;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PlacePageViewModel extends ViewModel
|
public class PlacePageViewModel extends ViewModel
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ import app.organicmaps.widget.placepage.PlacePageViewModel;
|
|||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
public class PlacePageBookmarkFragment extends Fragment implements View.OnClickListener, View.OnLongClickListener,
|
public class PlacePageBookmarkFragment extends Fragment implements View.OnClickListener, View.OnLongClickListener,
|
||||||
Observer<MapObject>,
|
Observer<MapObject>, EditBookmarkFragment.EditBookmarkListener
|
||||||
EditBookmarkFragment.EditBookmarkListener
|
|
||||||
{
|
{
|
||||||
private View mFrame;
|
private View mFrame;
|
||||||
private MaterialTextView mTvBookmarkNote;
|
private MaterialTextView mTvBookmarkNote;
|
||||||
|
|||||||
@@ -13,13 +13,15 @@ import androidx.annotation.Nullable;
|
|||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.Observer;
|
import androidx.lifecycle.Observer;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
|
import com.google.android.material.imageview.ShapeableImageView;
|
||||||
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.sdk.Framework;
|
import app.organicmaps.sdk.Framework;
|
||||||
import app.organicmaps.sdk.bookmarks.data.ChargeSocketDescriptor;
|
import app.organicmaps.sdk.bookmarks.data.ChargeSocketDescriptor;
|
||||||
import app.organicmaps.sdk.bookmarks.data.MapObject;
|
import app.organicmaps.sdk.bookmarks.data.MapObject;
|
||||||
import app.organicmaps.widget.placepage.PlacePageViewModel;
|
import app.organicmaps.widget.placepage.PlacePageViewModel;
|
||||||
import com.google.android.material.imageview.ShapeableImageView;
|
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
|
||||||
public class PlacePageChargeSocketsFragment extends Fragment implements Observer<MapObject>
|
public class PlacePageChargeSocketsFragment extends Fragment implements Observer<MapObject>
|
||||||
@@ -94,8 +96,8 @@ public class PlacePageChargeSocketsFragment extends Fragment implements Observer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
int resTypeId = getResources().getIdentifier("charge_socket_" + socket.visualType(), "string",
|
int resTypeId =
|
||||||
requireContext().getPackageName());
|
getResources().getIdentifier("charge_socket_" + socket.visualType(), "string", requireContext().getPackageName());
|
||||||
if (resTypeId != 0)
|
if (resTypeId != 0)
|
||||||
{
|
{
|
||||||
type.setText(resTypeId);
|
type.setText(resTypeId);
|
||||||
@@ -106,8 +108,7 @@ public class PlacePageChargeSocketsFragment extends Fragment implements Observer
|
|||||||
DecimalFormat df = new DecimalFormat("#.##");
|
DecimalFormat df = new DecimalFormat("#.##");
|
||||||
power.setText(getString(R.string.kw_label, df.format(socket.power())));
|
power.setText(getString(R.string.kw_label, df.format(socket.power())));
|
||||||
}
|
}
|
||||||
else if (socket.ignorePower())
|
else if (socket.ignorePower()) {
|
||||||
{
|
|
||||||
power.setVisibility(INVISIBLE);
|
power.setVisibility(INVISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -191,9 +191,8 @@ public class PlacePageLinksFragment extends Fragment implements Observer<MapObje
|
|||||||
case FMD_PANORAMAX -> null; // Don't add raw ID to list, as it's useless for users.
|
case FMD_PANORAMAX -> null; // Don't add raw ID to list, as it's useless for users.
|
||||||
default -> mMapObject.getMetadata(type);
|
default -> mMapObject.getMetadata(type);
|
||||||
};
|
};
|
||||||
// Add user names for social media if available
|
// Add user names for social media if available
|
||||||
if (!TextUtils.isEmpty(title) && !title.equals(url) && !title.contains("/"))
|
if (!TextUtils.isEmpty(title) && !title.equals(url) && !title.contains("/")) items.add(title);
|
||||||
items.add(title);
|
|
||||||
|
|
||||||
if (items.size() == 1)
|
if (items.size() == 1)
|
||||||
PlacePageUtils.copyToClipboard(requireContext(), mFrame, items.get(0));
|
PlacePageUtils.copyToClipboard(requireContext(), mFrame, items.get(0));
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
<shape
|
<shape
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<solid android:color="@color/bg_panel"/>
|
<solid android:color="@color/bg_window"/>
|
||||||
<corners android:radius="100dp"/>
|
<corners android:radius="100dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
@@ -2,5 +2,5 @@
|
|||||||
<shape
|
<shape
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="oval">
|
android:shape="oval">
|
||||||
<solid android:color="@color/bg_panel"/>
|
<solid android:color="@color/bg_window"/>
|
||||||
</shape>
|
</shape>
|
||||||
11
android/app/src/main/res/drawable/ic_cloud_download.xml
Normal file
11
android/app/src/main/res/drawable/ic_cloud_download.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:tint="?colorControlNormal"
|
||||||
|
android:height="24dp"
|
||||||
|
android:width="24dp"
|
||||||
|
android:viewportHeight="960"
|
||||||
|
android:viewportWidth="960">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M260,800Q169,800 104.5,737Q40,674 40,583Q40,505 87,444Q134,383 210,366Q227,294 295,229Q363,164 440,164Q473,164 496.5,187.5Q520,211 520,244L520,486L584,424L640,480L480,640L320,480L376,424L440,486L440,244Q364,258 322,317.5Q280,377 280,440L260,440Q202,440 161,481Q120,522 120,580Q120,638 161,679Q202,720 260,720L740,720Q782,720 811,691Q840,662 840,620Q840,578 811,549Q782,520 740,520L680,520L680,440Q680,392 658,350.5Q636,309 600,280L600,187Q674,222 717,290.5Q760,359 760,440L760,440L760,440Q829,448 874.5,499.5Q920,551 920,620Q920,695 867.5,747.5Q815,800 740,800L260,800ZM480,442Q480,442 480,442Q480,442 480,442L480,442Q480,442 480,442Q480,442 480,442L480,442Q480,442 480,442Q480,442 480,442L480,442Q480,442 480,442Q480,442 480,442Q480,442 480,442Q480,442 480,442L480,442Q480,442 480,442Q480,442 480,442Q480,442 480,442Q480,442 480,442L480,442L480,442Q480,442 480,442Q480,442 480,442Z"/>
|
||||||
|
|
||||||
|
</vector>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="960"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="960">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
android:pathData="M240,520q-17,0 -28.5,-11.5T200,480q0,-17 11.5,-28.5T240,440h480q17,0 28.5,11.5T760,480q0,17 -11.5,28.5T720,520L240,520Z"
|
android:pathData="M19,13H5v-2h14v2z"
|
||||||
android:fillColor="#ffffff"/>
|
android:fillColor="#ffffff"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="960"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="960">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
android:pathData="M440,520L240,520q-17,0 -28.5,-11.5T200,480q0,-17 11.5,-28.5T240,440h200v-200q0,-17 11.5,-28.5T480,200q17,0 28.5,11.5T520,240v200h200q17,0 28.5,11.5T760,480q0,17 -11.5,28.5T720,520L520,520v200q0,17 -11.5,28.5T480,760q-17,0 -28.5,-11.5T440,720v-200Z"
|
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
||||||
android:fillColor="@android:color/white"/>
|
android:fillColor="@android:color/white"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
@@ -11,6 +11,18 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_above="@+id/button_container"
|
android:layout_above="@+id/button_container"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btn_advanced"
|
||||||
|
style="@style/Widget.Material3.Button.IconButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:icon="@drawable/ic_settings"
|
||||||
|
app:iconTint="?iconTint"
|
||||||
|
android:contentDescription="@string/download_resources_custom_url_title"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_margin="@dimen/margin_half" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|||||||
22
android/app/src/main/res/layout/dialog_custom_map_server.xml
Normal file
22
android/app/src/main/res/layout/dialog_custom_map_server.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/til_custom_map_server"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="@dimen/margin_base"
|
||||||
|
android:paddingEnd="@dimen/margin_base"
|
||||||
|
android:paddingTop="@dimen/margin_base"
|
||||||
|
android:paddingBottom="@dimen/margin_half"
|
||||||
|
android:hint="@string/download_resources_custom_url_title"
|
||||||
|
app:placeholderText="@string/download_resources_custom_url_hint"
|
||||||
|
app:endIconMode="clear_text">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/edit_custom_map_server"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textUri"
|
||||||
|
android:singleLine="true" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
android:id="@+id/items_frame"
|
android:id="@+id/items_frame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?panel">
|
android:background="?windowBackgroundForced">
|
||||||
<include
|
<include
|
||||||
layout="@layout/item_missed_map"
|
layout="@layout/item_missed_map"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
android:id="@+id/items_frame"
|
android:id="@+id/items_frame"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?panel"
|
android:background="?windowBackgroundForced"
|
||||||
android:listSelector="?clickableBackground"
|
android:listSelector="?clickableBackground"
|
||||||
android:drawSelectorOnTop="true"/>
|
android:drawSelectorOnTop="true"/>
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
android:layout_below="@id/tv__bookmark_set_title"
|
android:layout_below="@id/tv__bookmark_set_title"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="@dimen/margin_quadruple"
|
android:layout_marginEnd="@dimen/margin_quadruple"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:paddingTop="@dimen/margin_quarter_plus"
|
android:paddingTop="@dimen/margin_quarter_plus"
|
||||||
android:paddingBottom="@dimen/margin_half_plus"
|
android:paddingBottom="@dimen/margin_half_plus"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:background="?attr/cardBackground"
|
android:background="?cardBackground"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
@@ -11,7 +11,6 @@
|
|||||||
style="@style/MwmWidget.ToolbarStyle"
|
style="@style/MwmWidget.ToolbarStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?colorPrimary"
|
|
||||||
android:gravity="end|center_vertical"
|
android:gravity="end|center_vertical"
|
||||||
android:theme="@style/MwmWidget.ToolbarTheme">
|
android:theme="@style/MwmWidget.ToolbarTheme">
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
app:srcCompat="@drawable/ic_done"
|
app:srcCompat="@drawable/ic_done"
|
||||||
android:layout_width="?actionBarSize"
|
android:layout_width="?actionBarSize"
|
||||||
android:layout_height="?actionBarSize"
|
android:layout_height="?actionBarSize"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
android:layout_gravity="end|center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
android:contentDescription="@string/save" />
|
android:contentDescription="@string/save" />
|
||||||
|
|||||||
@@ -402,11 +402,13 @@
|
|||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/margin_half"
|
||||||
android:fontFamily="@string/robotoMedium"
|
android:fontFamily="@string/robotoMedium"
|
||||||
android:text="@string/editor_other_info"
|
android:text="@string/editor_other_info"
|
||||||
android:textAppearance="@style/MwmTextAppearance.Body3"/>
|
android:textAppearance="@style/MwmTextAppearance.Body3"/>
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/custom_input"
|
android:id="@+id/custom_input"
|
||||||
|
android:layout_marginBottom="@dimen/margin_quarter"
|
||||||
style="@style/MwmWidget.Editor.CustomTextInput"
|
style="@style/MwmWidget.Editor.CustomTextInput"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:minHeight="74dp"
|
android:minHeight="74dp"
|
||||||
@@ -416,6 +418,7 @@
|
|||||||
android:id="@+id/input"
|
android:id="@+id/input"
|
||||||
style="@style/MwmWidget.Editor.FieldLayout.EditText"
|
style="@style/MwmWidget.Editor.FieldLayout.EditText"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
|
android:gravity="top"
|
||||||
android:hint="@string/editor_note_hint"/>
|
android:hint="@string/editor_note_hint"/>
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -48,7 +48,6 @@
|
|||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fragment_container"
|
android:id="@+id/fragment_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent" />
|
||||||
android:background="?panel"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
style="@style/MwmWidget.ToolbarStyle"
|
style="@style/MwmWidget.ToolbarStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?colorPrimary"
|
|
||||||
android:gravity="end|center_vertical"
|
android:gravity="end|center_vertical"
|
||||||
android:theme="@style/MwmWidget.ToolbarTheme">
|
android:theme="@style/MwmWidget.ToolbarTheme">
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
|
|||||||
@@ -15,15 +15,20 @@
|
|||||||
android:theme="@style/MwmWidget.ToolbarTheme">
|
android:theme="@style/MwmWidget.ToolbarTheme">
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/save"
|
android:id="@+id/save"
|
||||||
style="@style/MwmWidget.Downloader.ToolbarButton"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
|
android:padding="@dimen/margin_half"
|
||||||
|
android:textAppearance="@style/MwmTextAppearance.Toolbar.Title"
|
||||||
android:text="@string/editor_report_problem_send_button"/>
|
android:text="@string/editor_report_problem_send_button"/>
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/scrollView"
|
android:id="@+id/scrollView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:background="?panel">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
android:id="@+id/app_bar"
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?colorPrimary"
|
||||||
android:elevation="@dimen/dp_0"
|
android:elevation="@dimen/dp_0"
|
||||||
app:elevation="@dimen/dp_0">
|
app:elevation="@dimen/dp_0">
|
||||||
<include
|
<include
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?windowBackgroundForced"
|
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="?windowBackgroundForced"
|
android:background="?cardBackground"
|
||||||
android:padding="@dimen/margin_base">
|
android:padding="@dimen/margin_base">
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?cardBackground"
|
||||||
android:minHeight="@dimen/height_item_oneline"
|
android:minHeight="@dimen/height_item_oneline"
|
||||||
android:paddingStart="@dimen/margin_base_plus"
|
android:paddingStart="@dimen/margin_base_plus"
|
||||||
android:paddingEnd="@dimen/margin_base_plus">
|
android:paddingEnd="@dimen/margin_base_plus">
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?cardBackground"
|
||||||
android:minHeight="@dimen/height_item_oneline"
|
android:minHeight="@dimen/height_item_oneline"
|
||||||
android:paddingStart="@dimen/margin_base_plus"
|
android:paddingStart="@dimen/margin_base_plus"
|
||||||
android:paddingEnd="@dimen/margin_base_plus">
|
android:paddingEnd="@dimen/margin_base_plus">
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="@dimen/altitude_chart_container_padding_left">
|
android:paddingEnd="@dimen/altitude_chart_container_padding_left">
|
||||||
|
|
||||||
<View
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/divider_height"
|
android:layout_height="@dimen/divider_height"
|
||||||
android:background="?dividerHorizontal"/>
|
android:background="?dividerHorizontal"/>
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
style="@style/MwmWidget.M3.FAB.MapButton.Zoom"
|
style="@style/MwmWidget.M3.FAB.MapButton.Zoom"
|
||||||
android:tint="?iconTint"
|
android:tint="?iconTint"
|
||||||
app:srcCompat="@drawable/ic_plus"
|
app:srcCompat="@drawable/ic_plus"
|
||||||
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton"
|
app:shapeAppearanceOverlay="@style/ShapeAppearance.MapButton.Zoom.Minus"
|
||||||
android:layout_marginBottom="@dimen/margin_half"
|
android:layout_marginBottom="@dimen/margin_eighth"
|
||||||
android:contentDescription="@string/zoom_in"/>
|
android:contentDescription="@string/zoom_in"/>
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/nav_zoom_out"
|
android:id="@+id/nav_zoom_out"
|
||||||
style="@style/MwmWidget.M3.FAB.MapButton.Zoom"
|
style="@style/MwmWidget.M3.FAB.MapButton.Zoom"
|
||||||
android:tint="?iconTint"
|
android:tint="?iconTint"
|
||||||
app:srcCompat="@drawable/ic_minus"
|
app:srcCompat="@drawable/ic_minus"
|
||||||
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton"
|
app:shapeAppearanceOverlay="@style/ShapeAppearance.MapButton.Zoom.Plus"
|
||||||
android:contentDescription="@string/zoom_out"/>
|
android:contentDescription="@string/zoom_out"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?panel"
|
android:background="?windowBackgroundForced"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/margin_half_plus"
|
android:layout_marginTop="@dimen/margin_half_plus"
|
||||||
android:layout_marginBottom="@dimen/margin_quarter"
|
android:layout_marginBottom="@dimen/margin_quarter"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?selectableItemBackground"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingStart="@dimen/margin_quarter"
|
android:paddingStart="@dimen/margin_quarter"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/margin_half_plus"
|
android:layout_marginBottom="@dimen/margin_half_plus"
|
||||||
android:textAppearance="@style/MwmTextAppearance.Title.Toolbar"
|
android:textSize="@dimen/text_size_headline"
|
||||||
|
android:fontFamily="@string/robotoMedium"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
tools:text="Some long long long placeholder title"/>
|
tools:text="Some long long long placeholder title"/>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?panel"
|
android:background="?cardBackground"
|
||||||
android:padding="@dimen/margin_base"
|
android:padding="@dimen/margin_base"
|
||||||
android:text="@string/editor_focus_map_on_location"
|
android:text="@string/editor_focus_map_on_location"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/toolbar_point_chooser" />
|
app:layout_constraintTop_toBottomOf="@+id/toolbar_point_chooser" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
android:id="@+id/pp_buttons_layout"
|
android:id="@+id/pp_buttons_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?ppButtonsBackground"
|
android:background="?windowBackgroundForced"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_gravity="bottom">
|
android:layout_gravity="bottom">
|
||||||
<include layout="@layout/item_divider" />
|
<include layout="@layout/item_divider" />
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
android:layout_width="?attr/actionBarSize"
|
android:layout_width="?attr/actionBarSize"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
app:srcCompat="?homeAsUpIndicator"
|
app:srcCompat="?homeAsUpIndicator"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
tools:src="@drawable/ic_expand_more" />
|
tools:src="@drawable/ic_expand_more" />
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
android:id="@+id/driving_options_btn_container"
|
android:id="@+id/driving_options_btn_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/drivingOptionsViewBg"
|
android:background="?drivingOptionsViewBg"
|
||||||
android:foreground="@drawable/shadow_top"
|
android:foreground="@drawable/shadow_top"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
android:id="@+id/driving_options_btn"
|
android:id="@+id/driving_options_btn"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:minHeight="@dimen/height_block_base">
|
android:minHeight="@dimen/height_block_base">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
style="@style/MwmWidget.Tab"
|
|
||||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
|
||||||
tools:drawableStart="@drawable/ic_menu_open"
|
|
||||||
tools:text="Some tab"/>
|
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:layout_width="?attr/actionBarSize"
|
android:layout_width="?attr/actionBarSize"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
app:srcCompat="?homeAsUpIndicator"
|
app:srcCompat="?homeAsUpIndicator"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
tools:src="@drawable/ic_expand_more"
|
tools:src="@drawable/ic_expand_more"
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
android:layout_height="?actionBarSize"
|
android:layout_height="?actionBarSize"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@string/clear_the_search"
|
android:contentDescription="@string/clear_the_search"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
app:srcCompat="@drawable/ic_close"/>
|
app:srcCompat="@drawable/ic_close"/>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
android:layout_height="?actionBarSize"
|
android:layout_height="?actionBarSize"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
app:srcCompat="@drawable/ic_mic_white"
|
app:srcCompat="@drawable/ic_mic_white"
|
||||||
|
|||||||
@@ -912,4 +912,12 @@
|
|||||||
<string name="charge_socket_type1">Tipus 1</string>
|
<string name="charge_socket_type1">Tipus 1</string>
|
||||||
<string name="charge_socket_nacs">NACS</string>
|
<string name="charge_socket_nacs">NACS</string>
|
||||||
<string name="charge_socket_chademo">CHAdeMO</string>
|
<string name="charge_socket_chademo">CHAdeMO</string>
|
||||||
|
<string name="place_page_too_old_to_edit">L\'edició de dades d\'OpenStreetMap està deshabilitada perquè les dades del mapa són massa antigues.</string>
|
||||||
|
<string name="place_page_map_too_old_title">Dades del mapa desactualitzades</string>
|
||||||
|
<string name="place_page_map_too_old_description">Les teves dades de mapa son molt antigues, per favor actualitza el mapa.</string>
|
||||||
|
<string name="place_page_app_too_old_description">Les teues dades del mapa son molt antigues, per favor actualitza l\'app de CoMaps.</string>
|
||||||
|
<string name="place_page_update_too_old_map">Actualitzar regió del mapa</string>
|
||||||
|
<string name="prefs_speed_cameras_information">Les advertències de càmeres radar estan deshabilitades als països on estan prohibides per llei.</string>
|
||||||
|
<string name="navigation_start_tts_message">"Iniciant Navegació, idioma d\'instruccions de veu: "</string>
|
||||||
|
<string name="navigation_start_tts_disabled_message">Instruccions de veu desactivades: motor TTS no disponible</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -907,4 +907,10 @@
|
|||||||
<string name="charge_socket_schuko">Domovní EU</string>
|
<string name="charge_socket_schuko">Domovní EU</string>
|
||||||
<string name="prefs_speed_cameras_information">Upozornění na radary jsou vypnuty v zemích, kde je tato funkcionalita zakázána místními zákony.</string>
|
<string name="prefs_speed_cameras_information">Upozornění na radary jsou vypnuty v zemích, kde je tato funkcionalita zakázána místními zákony.</string>
|
||||||
<string name="navigation_start_tts_message">"Spouštím navigaci, jazyk hlasových instrukcí: "</string>
|
<string name="navigation_start_tts_message">"Spouštím navigaci, jazyk hlasových instrukcí: "</string>
|
||||||
|
<string name="place_page_map_too_old_title">Mapová data jsou zastaralá</string>
|
||||||
|
<string name="place_page_map_too_old_description">Vaše mapová data jsou velmi stará, doporučujeme je aktualizovat.</string>
|
||||||
|
<string name="place_page_app_too_old_description">Vaše aktuální mapová data jsou velmi stará, aktualizujte prosím aplikaci CoMaps.</string>
|
||||||
|
<string name="place_page_update_too_old_map">Aktualizovat oblast mapy</string>
|
||||||
|
<string name="place_page_too_old_to_edit">Úprava OpenStreetMap je zakázaná, protože mapová data jsou příliš stará.</string>
|
||||||
|
<string name="navigation_start_tts_disabled_message">Hlasové pokyny vypnuty: služba TTS není dostupná</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -489,7 +489,7 @@
|
|||||||
<string name="placepage_edit_bookmark_button">Rediger bogmærke</string>
|
<string name="placepage_edit_bookmark_button">Rediger bogmærke</string>
|
||||||
<string name="placepage_personal_notes_hint">Personlige notater (tekst eller html)</string>
|
<string name="placepage_personal_notes_hint">Personlige notater (tekst eller html)</string>
|
||||||
<string name="editor_reset_edits_message">Kassér alle lokale ændringer?</string>
|
<string name="editor_reset_edits_message">Kassér alle lokale ændringer?</string>
|
||||||
<string name="editor_reset_edits_button">Kassér</string>
|
<string name="editor_reset_edits_button">Kassér ændringer</string>
|
||||||
<string name="editor_remove_place_message">Slet tilføjet sted?</string>
|
<string name="editor_remove_place_message">Slet tilføjet sted?</string>
|
||||||
<string name="editor_remove_place_button">Slet</string>
|
<string name="editor_remove_place_button">Slet</string>
|
||||||
<string name="editor_place_doesnt_exist">Stedet eksisterer ikke</string>
|
<string name="editor_place_doesnt_exist">Stedet eksisterer ikke</string>
|
||||||
@@ -896,4 +896,10 @@
|
|||||||
<string name="charge_socket_schuko">Europæisk</string>
|
<string name="charge_socket_schuko">Europæisk</string>
|
||||||
<string name="prefs_speed_cameras_information">Advarsler om hastighedskameraer er deaktiveret i lande, hvor advarsler er forbudt i henhold til lokal lovgivning.</string>
|
<string name="prefs_speed_cameras_information">Advarsler om hastighedskameraer er deaktiveret i lande, hvor advarsler er forbudt i henhold til lokal lovgivning.</string>
|
||||||
<string name="navigation_start_tts_message">"Starter navigation, sprog for stemmeinstruktioner: "</string>
|
<string name="navigation_start_tts_message">"Starter navigation, sprog for stemmeinstruktioner: "</string>
|
||||||
|
<string name="place_page_map_too_old_title">Kortdata forældet</string>
|
||||||
|
<string name="place_page_map_too_old_description">Dine nuværende kortdata er meget gamle. Opdater kortet.</string>
|
||||||
|
<string name="place_page_app_too_old_description">Dine nuværende kortdata er meget gamle. Opdater CoMaps-appen.</string>
|
||||||
|
<string name="place_page_update_too_old_map">Opdater kortregion</string>
|
||||||
|
<string name="place_page_too_old_to_edit">Redigering af OpenStreetMap er deaktiveret, fordi kortdataene er for gamle.</string>
|
||||||
|
<string name="navigation_start_tts_disabled_message">Stemmeinstruktioner deaktiveret: TTS-motor ikke tilgængelig</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -502,7 +502,7 @@
|
|||||||
<string name="placepage_edit_bookmark_button">Lesezeichen bearbeiten</string>
|
<string name="placepage_edit_bookmark_button">Lesezeichen bearbeiten</string>
|
||||||
<string name="placepage_personal_notes_hint">Persönliche Notizen (Text oder html)</string>
|
<string name="placepage_personal_notes_hint">Persönliche Notizen (Text oder html)</string>
|
||||||
<string name="editor_reset_edits_message">Alle lokalen Änderungen verwerfen?</string>
|
<string name="editor_reset_edits_message">Alle lokalen Änderungen verwerfen?</string>
|
||||||
<string name="editor_reset_edits_button">Verwerfen</string>
|
<string name="editor_reset_edits_button">Änderungen verwerfen</string>
|
||||||
<string name="editor_remove_place_message">Hinzugefügtes Objekt löschen?</string>
|
<string name="editor_remove_place_message">Hinzugefügtes Objekt löschen?</string>
|
||||||
<string name="editor_remove_place_button">Löschen</string>
|
<string name="editor_remove_place_button">Löschen</string>
|
||||||
<string name="editor_place_doesnt_exist">Dieser Ort existiert nicht</string>
|
<string name="editor_place_doesnt_exist">Dieser Ort existiert nicht</string>
|
||||||
@@ -902,9 +902,17 @@
|
|||||||
<item quantity="other">%d min</item>
|
<item quantity="other">%d min</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="editor_business_vacant_button">Geschäft steht leer</string>
|
<string name="editor_business_vacant_button">Geschäft steht leer</string>
|
||||||
<string name="editor_mark_business_vacant_title">Geschäft als leerstehend markieren</string>
|
<string name="editor_mark_business_vacant_title">Geschäft auf leerstehend setzen</string>
|
||||||
<string name="editor_submit">Absenden</string>
|
<string name="editor_submit">Absenden</string>
|
||||||
<string name="editor_mark_business_vacant_description">Wenn das Unternehmen ausgezogen ist und die Fläche leer und bereit für die nächste Miete ist.</string>
|
<string name="editor_mark_business_vacant_description">Verwenden Sie diese Option, wenn das Geschäft ausgezogen ist und ein neues Geschäft die leerstehenden Räume übernehmen könnte.</string>
|
||||||
<string name="charge_socket_schuko">Schuko</string>
|
<string name="charge_socket_schuko">Schuko</string>
|
||||||
<string name="power_management">Energiemanagement</string>
|
<string name="power_management">Energiemanagement</string>
|
||||||
|
<string name="place_page_map_too_old_title">Kartendaten veraltet</string>
|
||||||
|
<string name="place_page_map_too_old_description">Die aktuellen Kartendaten sind sehr alt, bitte aktualisiere die Karte.</string>
|
||||||
|
<string name="place_page_app_too_old_description">Die aktuellen Kartendaten sind sehr alt, bitte aktualisiere die CoMaps-App.</string>
|
||||||
|
<string name="place_page_update_too_old_map">Kartenregion aktualisieren</string>
|
||||||
|
<string name="place_page_too_old_to_edit">OpenStreetMap-Bearbeitung ist deaktiviert, da die Kartendaten zu alt sind.</string>
|
||||||
|
<string name="prefs_speed_cameras_information">Blitzerwarnungen sind in Ländern deaktiviert, in denen Warnungen durch lokale Gesetze verboten sind.</string>
|
||||||
|
<string name="navigation_start_tts_message">"Navigation wird gestartet, Sprache der Sprachansagen: "</string>
|
||||||
|
<string name="navigation_start_tts_disabled_message">Sprachansagen deaktiviert: TTS-Engine nicht verfügbar</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<!-- "Add new bookmark list" dialog title -->
|
<!-- "Add new bookmark list" dialog title -->
|
||||||
<string name="add_new_set">Agregar una lista nueva</string>
|
<string name="add_new_set">Agregar una lista nueva</string>
|
||||||
<!-- Add Bookmark list dialog - hint when the list name is empty -->
|
<!-- Add Bookmark list dialog - hint when the list name is empty -->
|
||||||
<string name="bookmark_set_name">Nombre del grupo de marcadores</string>
|
<string name="bookmark_set_name">Nombre de la lista de marcadores</string>
|
||||||
<!-- Should be used in the bookmarks-only context, see bookmarks_and_tracks if tracks are also implied. -->
|
<!-- Should be used in the bookmarks-only context, see bookmarks_and_tracks if tracks are also implied. -->
|
||||||
<string name="bookmarks">Marcadores</string>
|
<string name="bookmarks">Marcadores</string>
|
||||||
<!-- "Bookmarks and Tracks" dialog title, also sync it with iphone/plist.txt -->
|
<!-- "Bookmarks and Tracks" dialog title, also sync it with iphone/plist.txt -->
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
<!-- Button in the main menu -->
|
<!-- Button in the main menu -->
|
||||||
<string name="donate">Donar</string>
|
<string name="donate">Donar</string>
|
||||||
<!-- Button in the main Help dialog -->
|
<!-- Button in the main Help dialog -->
|
||||||
<string name="how_to_support_us">Apoya el proyecto</string>
|
<string name="how_to_support_us">Apoya y mejora el proyecto CoMaps</string>
|
||||||
<!-- Button in the main Help dialog -->
|
<!-- Button in the main Help dialog -->
|
||||||
<string name="copyright">Derechos de autor</string>
|
<string name="copyright">Derechos de autor</string>
|
||||||
<!-- Text in menu + Button in the main Help dialog -->
|
<!-- Text in menu + Button in the main Help dialog -->
|
||||||
@@ -914,4 +914,12 @@
|
|||||||
<string name="editor_mark_business_vacant_description">Usa esto si el negocio ya no existe y el local ha quedado vacío para un nuevo inquilino.</string>
|
<string name="editor_mark_business_vacant_description">Usa esto si el negocio ya no existe y el local ha quedado vacío para un nuevo inquilino.</string>
|
||||||
<string name="editor_submit">Enviar</string>
|
<string name="editor_submit">Enviar</string>
|
||||||
<string name="power_management">Gestión de energía</string>
|
<string name="power_management">Gestión de energía</string>
|
||||||
|
<string name="place_page_map_too_old_title">Datos del mapa anticuados</string>
|
||||||
|
<string name="place_page_map_too_old_description">Tus datos del mapa están muy anticuados, por favor actualiza el mapa.</string>
|
||||||
|
<string name="place_page_app_too_old_description">Tus datos del mapa están muy anticuados, por favor actualiza la aplicación CoMaps.</string>
|
||||||
|
<string name="place_page_update_too_old_map">Actualizar mapa de la región</string>
|
||||||
|
<string name="place_page_too_old_to_edit">La edición de OpenStreetMap está deshabilitada porque los datos del mapa están muy anticuados.</string>
|
||||||
|
<string name="prefs_speed_cameras_information">Las advertencias de radares de velocidad están deshabilitadas en países donde las alertas están prohibidas por ley.</string>
|
||||||
|
<string name="navigation_start_tts_message">"Iniciando Navegación, idioma de las instrucciones por voz: "</string>
|
||||||
|
<string name="navigation_start_tts_disabled_message">Instrucciones por voz deshabilitadas: Motor de TTS no disponible</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user