Compare commits

..

64 Commits

Author SHA1 Message Date
x7z4w
ad6ea4bec3 Update .git-blame-ignore-revs
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
2026-01-09 19:05:09 +00:00
x7z4w
aefb34ff4d [core] Implicit m2::Point hash
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
2026-01-09 19:03:38 +00:00
x7z4w
5828fc76ce [generator] Implement hash for OsmElement::Tag
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
2026-01-09 19:03:38 +00:00
x7z4w
732210b9a2 [core] Replace SmallMap
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
2026-01-09 19:03:38 +00:00
x7z4w
05ba3afa97 [core] Switch to ankerl::unordered_dense
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
2026-01-09 19:03:35 +00:00
x7z4w
ae3260f3d1 [drape] nits
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
2026-01-09 18:28:30 +00:00
Yannik Bloscheck
53e1361276 [styles] Keep using shorter type for simple charging stations
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-09 18:22:22 +01:00
Yannik Bloscheck
f2a0b4470f [styles] Optimize displaying of charging stations, handle implicit motorcars tagging and add motorcycles
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-09 18:22:22 +01:00
Jean-Baptiste
111fd10af9 [android] Apply new dark background on bottomsheet and map buttons
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-09 18:15:03 +01:00
Jean-Baptiste
52edb5da6d [android] Enable more languages on Android
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-09 17:28:16 +01:00
matheusgomesms
70215404c3 [iOS] Improve confirmed existence format
Signed-off-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
2026-01-09 17:21:00 +01:00
Chris H. Meyer
49b0ec164d [types] Swap abandoned and disused bridge/tunnel
Drop abandoned bridge and tunnel in favor of disused ones.

Signed-off-by: Chris H. Meyer <christian.h.meyer@t-online.de>
2026-01-09 17:07:15 +01:00
Lukas H.
018259bb0f [styles] swap rendering of railway=abandoned and railway=disused
Signed-off-by: Lukas H. <lukas@ideallygrey.uk>
Co-authored-by: Chris H. Meyer <christian.h.meyer@t-online.de>
2026-01-09 17:07:15 +01:00
Jean-Baptiste
b7733786df [android] Remove useless property apply in main TextView style
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-09 13:56:15 +01:00
Henry Sternberg
245646c45d [routing] parking_aisle fixes v2
Signed-off-by: Henry Sternberg <henry@bluelightmaps.com>
2026-01-09 12:23:33 +00:00
Jean-Baptiste
6799f17c1b [android] Rework text style applied on title in app bar
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-09 11:44:18 +01:00
Henry Sternberg
e3abbc712b [routing] Fix crash on 32-bit devices with conditional access
The deserialization of conditional road access data was using
size_t which is 8 bytes on 64-bit (where maps are generated)
but only 4 bytes on 32-bit devices. This caused stream
misalignment and eventual std::length_error when garbage data
was interpreted as a huge vector size.

Fix by using uint64_t to always read 8 bytes, matching what
64-bit build servers write.

Signed-off-by: Henry Sternberg <henry@bluelightmaps.com>
2026-01-09 11:15:38 +01:00
Bastian Greshake Tzovaras
0da7869c5b [translation] manually add lt strings
Signed-off-by: Bastian Greshake Tzovaras <bgreshake@googlemail.com>
Co-authored-by: Bastian Greshake Tzovaras <bgreshake@googlemail.com>
Co-committed-by: Bastian Greshake Tzovaras <bgreshake@googlemail.com>
2026-01-09 09:13:48 +01:00
Yannik Bloscheck
2e3a76fc94 [ios] Increasing base version number to new year
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-09 09:12:31 +01:00
Dobri Dabar
85d4226eda [android] Add map Local Language
Signed-off-by: Dobri Dabar <dobridabar@noreply.codeberg.org>
2026-01-09 08:41:22 +01:00
Henry Sternberg
3f9dfd6605 [routing] fix/parking-aisle for pedestrian/cycle routing
Signed-off-by: Henry Sternberg <henry@bluelightmaps.com>
Co-authored-by: Henry Sternberg <henry@bluelightmaps.com>
Co-committed-by: Henry Sternberg <henry@bluelightmaps.com>
2026-01-08 21:41:50 +01:00
Jean-Baptiste
fdf698281a [android] Fix tracks description not showed on the place page
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-08 18:40:19 +01:00
x7z4w
fd57e71ac4 fix
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
2026-01-08 18:24:08 +01:00
thesupertechie
d86049f6d8 [ui][ux] change bookmarks and tracks to favourites
Signed-off-by: thesupertechie <thesupertechie1@gmail.com>
2026-01-08 18:24:08 +01:00
vikiawv
32bba5bc5e Added T-Road to italy
Signed-off-by: vikiawv <vikiawv@noreply.codeberg.org>
2026-01-08 18:21:08 +01:00
vikiawv
3068a468a3 Fixed italy again
Signed-off-by: vikiawv <vikiawv@noreply.codeberg.org>
2026-01-08 18:21:08 +01:00
vikiawv
267378aa23 Fixed two cases for italy
Signed-off-by: vikiawv <vikiawv@noreply.codeberg.org>
2026-01-08 18:21:08 +01:00
Yannik Bloscheck
0a525b7483 Stop interference with county roads in Bavaria
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-08 18:21:08 +01:00
vikiawv
ea4b39ea47 Readding part that hides roadshield letter for some classification types
Signed-off-by: vikiawv <vikiawv@noreply.codeberg.org>
2026-01-08 18:21:08 +01:00
vikiawv
67f27482b8 Found mistake in Germany/Austria implementation
Signed-off-by: vikiawv <vikiawv@noreply.codeberg.org>
2026-01-08 18:21:08 +01:00
vikiawv
b231f2de6e manually corrected formatting of germany and austria part
Signed-off-by: vikiawv <vikiawv@noreply.codeberg.org>
2026-01-08 18:21:08 +01:00
vikiawv
2609dd5588 Update libs/indexer/road_shields_parser.cpp
Corrected albania
2026-01-08 18:21:08 +01:00
vikiawv
08a87c1962 Reverted Austria and Germany to Simpleroadshieldparser and corrected minor things
Signed-off-by: vikiawv <vikiawv@noreply.codeberg.org>
2026-01-08 18:21:08 +01:00
Chris H. Meyer
09b07c2631 [styles] Add railway=turntable
Signed-off-by: Chris H. Meyer <christian.h.meyer@t-online.de>
2026-01-08 18:20:39 +01:00
matheusgomesms
42f5590210 [iOS] Fix display of long addresses in Place Page
Signed-off-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
2026-01-08 18:19:40 +01:00
matheusgomesms
f7d2e43f09 [iOS] Remove decimals in current speed
Signed-off-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
2026-01-08 18:19:30 +01:00
Chris H. Meyer
7617f85442 [editor] enable tactile maps
Signed-off-by: Chris H. Meyer <christian.h.meyer@t-online.de>
2026-01-08 18:18:48 +01:00
Viktor Govako
ffcb694961 [routing] Enable access conditional.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
(cherry picked from commit 6a2f2662b334345dc8789e970f358cec3ed69c85)
2026-01-08 14:59:02 +01:00
Henry Sternberg
3352fc13c1 Revert "[routing] Support conditional routing"
This reverts commit 718d0f726b.
2026-01-08 14:59:02 +01:00
Konstantin Pastbin
268d8936ca January R1 release notes
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2026-01-08 20:53:02 +07:00
Konstantin Pastbin
a679198c09 [planet] Update map data to 260106
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2026-01-08 14:05:53 +01:00
x7z4w
6f3ac44e9a Add Lithuanian
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
2026-01-08 12:57:14 +01:00
Jean-Baptiste
907c5cf39e [android] Migrate progress dialog theme to Material 3
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-08 12:54:22 +01:00
x7z4w
b8e5a70cf7 Deleted translation using Weblate (Lithuanian) 2026-01-08 11:50:09 +00:00
Codeberg Translate
464033a491 [strings] Update from Codeberg Translate
Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: JanezPavelZebovec <janezpavelzebovec@noreply.codeberg.org>
Co-authored-by: Linus_W_Frische <linus_w_frische@noreply.codeberg.org>
Co-authored-by: N4ta <codeberg@n4ta.anonaddy.me>
Co-authored-by: NikoM <nikom@noreply.codeberg.org>
Co-authored-by: Prefill add-on <noreply-addon-prefill@weblate.org>
Co-authored-by: Priit Jõerüüt <jrtcdbrg@noreply.codeberg.org>
Co-authored-by: Weblate <noreply-mt-weblate@weblate.org>
Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Co-authored-by: ZeljkoBG <zeljkobg@noreply.codeberg.org>
Co-authored-by: arnyminerz <arnyminerz@noreply.codeberg.org>
Co-authored-by: astro-ray <astro-ray@noreply.codeberg.org>
Co-authored-by: cirilla <cirilla@noreply.codeberg.org>
Co-authored-by: codebergian42 <codebergian42@noreply.codeberg.org>
Co-authored-by: eatham <eatham@noreply.codeberg.org>
Co-authored-by: ghose <ghose@noreply.codeberg.org>
Co-authored-by: liilliil <liilliil@noreply.codeberg.org>
Co-authored-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
Co-authored-by: patepelo <patepelo@noreply.codeberg.org>
Co-authored-by: rimas <rimas@noreply.codeberg.org>
Co-authored-by: teletext <teletext@noreply.codeberg.org>
Co-authored-by: x7z4w <x7z4w@noreply.codeberg.org>
Co-authored-by: zhuk2 <zhuk2@noreply.codeberg.org>
Translate-URL: https://translate.codeberg.org/projects/comaps/ios/
Translation: CoMaps/Android - Map Feature Types
Translation: CoMaps/Android UI Strings
Translation: CoMaps/Android UI Strings (SDK)
Translation: CoMaps/Countries and regions names
Translation: CoMaps/F-Droid app description
Translation: CoMaps/Search synonyms / aliases
Translation: CoMaps/Voice announcements for navigation (TTS)
Translation: CoMaps/iOS - Map Feature Types
Translation: CoMaps/iOS Plist
Translation: CoMaps/iOS Plurals
Translation: CoMaps/iOS UI Strings
2026-01-08 11:33:48 +00:00
Yannik Bloscheck
832f9bdd11 [drape] Fix highway road parser private field warning
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-08 12:33:43 +01:00
Jean-Baptiste
7d56fc6ba6 [android] Force Cornish language to be used in the app
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-08 11:02:05 +07:00
x7z4w
153e75175d [drape] Adjust double- and long-tap delays
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
2026-01-07 18:32:54 +01:00
Chris H. Meyer
4899a12d33 [styles] Add recycling centre to vehicle style
Signed-off-by: Chris H. Meyer <christian.h.meyer@t-online.de>
2026-01-07 17:59:46 +01:00
Yannik Bloscheck
4a64bf05be [ios] Add missing speedcamera icon version
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-07 12:28:51 +01:00
Dobri Dabar
381c1e3979 [desktop] Added Local Language option
Signed-off-by: Dobri Dabar <dobridabar@noreply.codeberg.org>
2026-01-07 12:12:32 +01:00
Chris H. Meyer
aa9ee3cbbf [styles] Add tactile maps
Signed-off-by: Chris H. Meyer <christian.h.meyer@t-online.de>
2026-01-07 11:02:50 +01:00
matheusgomesms
20d9185c79 Removing maxspeed estimate from generator
Signed-off-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
2026-01-06 14:54:00 +01:00
Chris H. Meyer
90c18f4983 [types] Add miniature railway
Signed-off-by: Chris H. Meyer <christian.h.meyer@t-online.de>
2026-01-06 14:47:40 +01:00
Viktor Govako
fe5d4f5286 [classifier] Added railway=miniature.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
Co-authored-by: Chris H. Meyer <christian.h.meyer@t-online.de>
2026-01-06 14:47:40 +01:00
Yannik Bloscheck
13d7def519 [ios] Fix file path
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-06 00:31:44 +01:00
Chris H. Meyer
93b35454eb [styles] Fix missing comma
Signed-off-by: Chris H. Meyer <christian.h.meyer@t-online.de>
2026-01-05 18:26:16 +01:00
Chris H. Meyer
de1c0a061d [styles] Set text color of fortress and other castles
Signed-off-by: Chris H. Meyer <christian.h.meyer@t-online.de>
2026-01-05 18:24:48 +01:00
gedankenstuecke
18ce55afa3 incorp review feedback 2026-01-05 13:27:42 +01:00
gedankenstuecke
43ffd199a4 [docs] Update CB teams description
Keeps the docs up to date on the currently existing teams

Signed-off-by: gedankenstuecke <gedankenstuecke@noreply.codeberg.org>
2026-01-05 13:23:29 +01:00
thesupertechie
3e75e5e802 [core] Add Tamil TTS support
This PR adds TTS voice instruction support for the Tamil language.

Co-authored-by: thesupertechie <thesupertechie1@gmail.com>
Co-committed-by: thesupertechie <thesupertechie1@gmail.com>
2026-01-05 10:42:53 +01:00
Jean-Baptiste
fc96d17ed7 [android] Remove background apply on item phone view
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-04 19:33:18 +01:00
Jean-Baptiste
e869fe1da1 [android] Fix custom dialog styles
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-04 19:32:11 +01:00
matheusgomesms
f38953458d [ios] Fix project.pbxproj
Signed-off-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
Co-authored-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
Co-committed-by: matheusgomesms <matheusgomesms@noreply.codeberg.org>
2026-01-04 19:31:56 +01:00
490 changed files with 10470 additions and 5500 deletions

View File

@@ -2,3 +2,5 @@
480fa6c2fcf53be296504ac6ba8e6b3d70f92b42
a6ede2b1466f0c9d8a443600ef337ba6b5832e58
1377b81bf1cac72bb6da192da7fed6696d5d5281
05ba3afa979104bb33e5f41ede1d43e1ba30a63c
732210b9a24a95d798d092eb3455456a79d4c702

83
3party/ankerl/stl.h Normal file
View File

@@ -0,0 +1,83 @@
///////////////////////// 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

View File

@@ -254,18 +254,20 @@ android {
androidResources {
ignoreAssetsPattern = '!.svn:!.git:!.DS_Store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~'
noCompress = ['txt', 'bin', 'html', 'png', 'json', 'mwm', 'ttf', 'sdf', 'ui', 'config', 'csv', 'spv', 'obj']
// Some languages not supported by Android require to be specified here to be applied
localeFilters += [
"en",
"af",
"ar",
"az",
"be",
"bg",
"bn",
"ca",
"cs",
"da",
"de",
"el",
"en",
"en-rGB",
"es",
"es-rMX",
@@ -275,28 +277,38 @@ android {
"fi",
"fr",
"fr-rCA",
"iw",
"gl",
"gsw",
"he",
"hi",
"hu",
"id",
"in",
"is",
"it",
"iw",
"ja",
"kw",
"ko",
"lt",
"lv",
"mr",
"mt",
"nb",
"nb-rNO",
"nl",
"pl",
"pt",
"pt-rBR",
"ro",
"ru",
"sl",
"sk",
"sr",
"sr-rCyrl",
"sr-rLatn",
"sv",
"sw",
"ta",
"th",
"tr",
"uk",

View File

@@ -1,8 +1,9 @@
• OpenStreetMap Daten vom 17. Dezember
Map download server nun wählbar
Warnung über veraltete Karten hinzugefügt + Knopf zum updaten
Vermeidung von Parkplatzwegen im Routing
Neuer Zoombutton
• Verbesserte Französchische Suchsynonme
OSM editor: Maximale Länge für OSM-Tags werden nun geprüft
Mehr auf codeberg.org/comaps/comaps/releases
• OSM-Daten vom 6. Januar
Editor: POI mit mehr als einem Tag, (z.B. Arten von Kunstwerken wie Skulpturen...), mehr POI können als leer/stillgelegt werden
Miniatureisenbahnen & Kläranlagen hinzugefügt
Material 3-Dialoge & dunklerer Hintergrund im Darkmode
Fiktive Geschwindigkeitsbegrenzungen für Verbindungsstraßen entfernt
• Versatz der Kameraausschnitt in der Navigation behoben
Weniger empfindliches langes Antippen
Weitere Details unter codeberg.org/comaps/comaps/releases

View File

@@ -0,0 +1,32 @@
A community-led free & open source maps app based on OpenStreetMap data and reinforced with commitment to transparency, privacy and being not-for-profit. CoMaps is a fork/spin-off of Organic Maps, which in turn is a fork of Maps.ME.
Read on about reasons for the project and its direction at <b><i>codeberg.org/comaps</i></b>.
Join the community there and help make the best maps app
• Use the app and spread the word about it
• Give feedback and report issues
• Update map data in the app or on the OpenStreetMap website
‣ <b>Offline-focused</b>: Plan and navigate your trip abroad without the need for cellular service, search waypoints while on a distant hike, etc. All app functions are designed to work offline.
‣ <b>Respecting Privacy</b>: The app is designed with privacy in mind - does not identify people, does not track, and does not collect personal information. Ads-free.
‣ <b>Simple and Polished</b>: essential easy to use features that just work.
‣ <b>Saves Your Battery and Space</b>: Doesnt drain your battery like other navigation apps. Compact maps save precious space on your phone.
‣ <b>Free and Built by the Community</b>: People like you helped build the app by adding places to OpenStreetMap, testing and giving feedback on features and contributing their development skills and money.
‣ <b>Open and Transparent Decision-making and Financials, Not-for-profit and Fully Open Source.</b>
<b>Main Features</b>:
• Downloadable detailed maps with places which are not available with Google Maps
• Outdoor mode with highlighted hiking trails, campsites, water sources, peaks, contour lines, etc
• Walking paths and cycleways
• Points of interest like restaurants, gas stations, hotels, shops, sightseeing and many more
• Search by name or an address or by point of interest category
• Navigation with voice announcements for walking, cycling, or driving
• Bookmark your favorite places with a single tap
• Offline Wikipedia articles
• Subway transit layer and directions
• Track recording
• Export and import bookmarks and tracks in KML, KMZ, GPX formats
• A dark mode to use during the night
• Improve map data for everyone using a basic built-in editor
<b>Freedom Is Here</b>
Discover your journey, navigate the world with privacy and community at the forefront!

View File

@@ -0,0 +1 @@
Easy map navigation - Discover more of your journey - Powered by the community

View File

@@ -0,0 +1 @@
CoMaps - Hike, Bike, Drive Offline with Privacy

View File

@@ -1,8 +1,9 @@
• OpenStreetMap data as of December 17
Make map download server configurable
• Added info about outdated maps and an update button to the selected place info card
Avoid using parking aisles for routing
Changed shape of zoom buttons
Improved French search synonyms
OSM editor: check length limit for OSM tags in value validation
• OpenStreetMap data as of January 6
Editor: add POI types with more than one OSM tag, e.g. artwork subtypes sculptures, paintings..; more POI types could be marked as vacant/disused
• Added miniature railways and wastewater treatment plants
Use Material 3 dialogs and darker background in dark mode
Removed fictional speed limits for link roads
Fixed camera cutout offset in navigation
Less sensitive long tap (full-screen mode)
More details on codeberg.org/comaps/comaps/releases

View File

@@ -0,0 +1,9 @@
• Datos OSM a 06/01
• Editor: se añaden tipos de POI con más de una etiqueta, ej. esculturas, pinturas...; se podrán marcar más tipos como en desuso
• Se añaden ferrocarriles mini y plantas de tratamiento de aguas
• Se utilizan diálogos Material 3 y fondo más oscuro en el modo oscuro
• Se eliminan límites de velocidad ficticios para enlaces
• Se corrige desplazamiento en la navegación
• Toque largo menos sensible (en pantalla completa)
Más detalles en codeberg.org/comaps/comaps/releases

View File

@@ -1,8 +1,9 @@
• Données OpenStreetMap du 17 décembre
Serveur de téléchargement de cartes configurable
Ajout d'un message d'avertissement pour les cartes trop anciennes
Évitement des allées de parking dans les itinéraires
Mise à jour de l'apparence des boutons de zooms
Amélioration des synonymes de recherche en français
Editeur OSM: vérification de la taille limite des tags OSM
Plus d'informations sur codeberg.org/comaps/comaps/releases
• Données OpenStreetMap du 6 janvier
Éditeur : support des types de POI avec plus dun tag OSM, par exemple types dœuvres dart sculptures, peintures..
Rendu des rails pour trains miniatures et des stations d'épuration
Utilisation des pop-ups Material 3 et d'un fond plus sombre en thème sombre
Suppression des limites de vitesse fictives sur les bretelles de routes
Correction des instructions de navigation sur les appareils avec des encoches
Appui long moins sensible (en mode plein écran)
Plus de détails sur codeberg.org/comaps/comaps/releases

View File

@@ -0,0 +1,7 @@
• OpenStreetMap podaci od 6. siječnja
• Uređivač: dodane točake interesa s više od jedne OSM oznake, npr. podtipovi umjetnina kao skulpture, slike...; više točaka interesa se sada može označiti kao upražnjene/napuštene
• Dodane minijaturne željeznice i postrojenja za pročišćavanje otpadnih voda
• Korištenje Material 3 dijaloga i tamnije pozadine u tamnom načinu rada
• Uklonjena su izmišljena ograničenja brzine za spojne ceste
Više detalja na codeberg.org/comaps/comaps/releases

View File

@@ -1,8 +1,9 @@
• Dados OSM de 17/12
Servidor de download de mapas configurável
• Adição de informações sobre mapas desatualizados e um botão de atualização ao cartão de informações do local selecionado
Evita o uso de corredores de estacionamento para roteamento
Formato dos botões de zoom alterado
Sinônimos de busca em francês aprimorados
Editor OSM: verificação do limite de comprimento das tags do OSM na validação de valores
• Dados OSM de 6/1
Editor: adição de POIs com mais de uma etiqueta OSM, por exemplo esculturas e pinturas; mais tipos de POI podem ser marcados como vagos/desativados
• Adição de ferrovias em miniatura e ETEs
Uso de diálogos Material 3 e fundo mais escuro no modo escuro
Remoção de limites de velocidade fictícios para vias de ligação
Correção de recorte da câmera na navegação
Toque longo menos sensível (modo tela cheia)
Mais detalhes em codeberg.org/comaps/comaps/releases

View File

@@ -1,8 +1,8 @@
• Карты OpenStreetMap от 17 декабря
Возможность настройки сервера для скачивания карт
• Добавлена ​​информация об устаревании карт и ​​кнопка обновления (при выборе места на карте)
Парковочные проезды больше не используются для транзитной маршрутизации
Изменены кнопки масштабирования карты
На карту добавлены ирригационные гидранты
• Редактор OSM: проверка максимальной длины OSM тегов
• Карты OpenStreetMap от 6 января
Редактор: возможность добавления POI, определяемых несколькими тегами, например церквей, мечетей, буддистских храмов..
• Добавлены миниатюрные железные дороги и очистные сооружения
Использование диалогов Material 3 и более тёмного фона в тёмном режиме
Удалены фиктивные ограничения скорости для заездов / съездов с шоссе
Менее чувствительное длительное нажатие на экран (переход в полноэкранный режим)
Подробнее на codeberg.org/comaps/comaps/releases

View File

@@ -28,7 +28,6 @@ import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.github.mikephil.charting.highlight.Highlight;
import com.github.mikephil.charting.listener.OnChartValueSelectedListener;
import com.google.android.material.textview.MaterialTextView;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

View File

@@ -18,7 +18,6 @@ import android.location.Location;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.CallSuper;
@@ -26,13 +25,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
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.dialog.CustomMapServerDialog;
import app.organicmaps.downloader.MapManagerHelper;
@@ -47,7 +39,11 @@ import app.organicmaps.sdk.util.StringUtils;
import app.organicmaps.util.UiUtils;
import app.organicmaps.util.Utils;
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.Objects;
@@ -259,7 +255,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
mProgress.setMax(bytes);
// Start progress at 1% according to M3 guidelines
mProgress.setProgressCompat(bytes/100, true);
mProgress.setProgressCompat(bytes / 100, true);
}
else
finishFilesDownload(bytes);
@@ -275,11 +271,8 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
mChbDownloadCountry = findViewById(R.id.chb_download_country);
mBtnAdvanced = findViewById(R.id.btn_advanced);
mBtnAdvanced.setOnClickListener(v -> {
CustomMapServerDialog.show(this, url -> {
prepareFilesDownload(false);
});
});
mBtnAdvanced.setOnClickListener(
v -> { CustomMapServerDialog.show(this, url -> { prepareFilesDownload(false); }); });
mBtnAdvanced.setEnabled(true);
mBtnListeners = new View.OnClickListener[BTN_COUNT];
@@ -394,7 +387,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
mTvMessage.setText(getString(R.string.downloading_country_can_proceed, item.name, fileSizeString));
mProgress.setMax((int) item.totalSize);
// 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);
MapManagerHelper.startDownload(mCurrentCountry);
@@ -446,21 +439,18 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
default -> throw new AssertionError("Unexpected result code = " + result);
};
mAlertDialog = new MaterialAlertDialogBuilder(this)
.setTitle(titleId)
.setMessage(messageId)
.setCancelable(true)
.setOnCancelListener((dialog) -> setAction(RESUME))
.setPositiveButton(R.string.try_again,
(dialog, which) -> {
setAction(TRY_AGAIN);
onTryAgainClicked();
})
.setNegativeButton(R.string.cancel,
(dialog, which) -> {
setAction(RESUME);
})
.setOnDismissListener(dialog -> mAlertDialog = null)
.show();
mAlertDialog = new MaterialAlertDialogBuilder(this)
.setTitle(titleId)
.setMessage(messageId)
.setCancelable(true)
.setOnCancelListener((dialog) -> setAction(RESUME))
.setPositiveButton(R.string.try_again,
(dialog, which) -> {
setAction(TRY_AGAIN);
onTryAgainClicked();
})
.setNegativeButton(R.string.cancel, (dialog, which) -> { setAction(RESUME); })
.setOnDismissListener(dialog -> mAlertDialog = null)
.show();
}
}

View File

@@ -132,7 +132,6 @@ import app.organicmaps.widget.placepage.PlacePageViewModel;
import com.google.android.material.appbar.MaterialToolbar;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.textview.MaterialTextView;
import java.util.ArrayList;
import java.util.Objects;
@@ -712,7 +711,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
if (!TextUtils.isEmpty(appName))
{
setTitle(appName);
((MaterialTextView) mPointChooser.findViewById(R.id.title)).setText(appName);
}
}

View File

@@ -38,8 +38,9 @@ public class OsmUploadWork extends Worker
{
final Constraints c = new Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build();
OneTimeWorkRequest.Builder builder = new OneTimeWorkRequest.Builder(OsmUploadWork.class).setConstraints(c);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
builder.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
{
builder.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST);
}
final OneTimeWorkRequest wr = builder.build();
WorkManager.getInstance(context).beginUniqueWork("UploadOsmChanges", ExistingWorkPolicy.KEEP, wr).enqueue();

View File

@@ -17,7 +17,6 @@ import androidx.annotation.NonNull;
import androidx.documentfile.provider.DocumentFile;
import app.organicmaps.R;
import app.organicmaps.sdk.util.log.Logger;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;

View File

@@ -10,7 +10,6 @@ import androidx.fragment.app.DialogFragment;
public class BaseMwmDialogFragment extends DialogFragment
{
protected int getStyle()
{
return STYLE_NORMAL;

View File

@@ -282,11 +282,13 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<ConcatAdapter
{
if (isEmptySearchResults())
{
requirePlaceholder().setContent(R.string.search_not_found, R.string.search_not_found_query, R.drawable.ic_search_fail);
requirePlaceholder().setContent(R.string.search_not_found, R.string.search_not_found_query,
R.drawable.ic_search_fail);
}
else if (isEmpty())
{
requirePlaceholder().setContent(R.string.bookmarks_empty_list_title, R.string.bookmarks_empty_list_message, R.drawable.ic_bookmarks);
requirePlaceholder().setContent(R.string.bookmarks_empty_list_title, R.string.bookmarks_empty_list_message,
R.drawable.ic_bookmarks);
}
boolean isEmptyRecycler = isEmpty() || isEmptySearchResults();

View File

@@ -42,6 +42,7 @@ public class ChooseBookmarkCategoryFragment
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View root = inflater.inflate(R.layout.choose_bookmark_category_fragment, container, false);
getDialog().getWindow().setBackgroundDrawableResource(android.R.color.transparent);
mRecycler = root.findViewById(R.id.recycler);
mRecycler.setLayoutManager(new LinearLayoutManager(requireActivity()));
return root;

View File

@@ -77,6 +77,7 @@ public class ChooseBookmarksSortingTypeFragment
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
{
super.onViewCreated(view, savedInstanceState);
getDialog().getWindow().setBackgroundDrawableResource(android.R.color.transparent);
final Bundle args = getArguments();
if (args == null)

View File

@@ -23,7 +23,6 @@ import app.organicmaps.util.UiUtils;
import app.organicmaps.util.Utils;
import app.organicmaps.widget.recycler.RecyclerClickListener;
import app.organicmaps.widget.recycler.RecyclerLongClickListener;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.checkbox.MaterialCheckBox;
import com.google.android.material.imageview.ShapeableImageView;
@@ -458,10 +457,12 @@ public class Holders
String formattedDesc = desc.replace("\n", "<br>");
Spanned spannedDesc = Utils.fromHtml(formattedDesc);
if (!TextUtils.isEmpty(spannedDesc)) {
if (!TextUtils.isEmpty(spannedDesc))
{
mDescText.setText(spannedDesc);
}
else {
else
{
mDescText.setText(R.string.list_description_empty);
}
}

View File

@@ -50,8 +50,8 @@ public final class IntentUtils
}
// https://developer.android.com/reference/androidx/car/app/CarContext#startCarApp(android.content.Intent)
private static void processNavigationIntent(@NonNull CarContext carContext,
@NonNull Renderer surfaceRenderer, @NonNull Intent intent)
private static void processNavigationIntent(@NonNull CarContext carContext, @NonNull Renderer surfaceRenderer,
@NonNull Intent intent)
{
// 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

View File

@@ -31,7 +31,7 @@ public final class RoutingHelpers
default -> Distance.UNIT_METERS;
};
return Distance.create(distance.mDistance, displayUnit);
return Distance.create(distance.mDistance, displayUnit);
}
@NonNull
@@ -52,7 +52,7 @@ public final class RoutingHelpers
default -> LaneDirection.SHAPE_UNKNOWN;
};
return LaneDirection.create(shape, isRecommended);
return LaneDirection.create(shape, isRecommended);
}
@NonNull
@@ -77,7 +77,7 @@ public final class RoutingHelpers
case EXIT_HIGHWAY_TO_LEFT -> Maneuver.TYPE_OFF_RAMP_SLIGHT_LEFT;
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)
builder.setRoundaboutExitNumber(roundaboutExitNum > 0 ? roundaboutExitNum : 1);
builder.setIcon(new CarIcon.Builder(createManeuverIcon(context, carDirection, roundaboutExitNum)).build());
@@ -85,7 +85,8 @@ public final class RoutingHelpers
}
@NonNull
private static IconCompat createManeuverIcon(@NonNull final CarContext context, @NonNull CarDirection carDirection, int roundaboutExitNum)
private static IconCompat createManeuverIcon(@NonNull final CarContext context, @NonNull CarDirection carDirection,
int roundaboutExitNum)
{
if (!CarDirection.isRoundAbout(carDirection) || roundaboutExitNum == 0)
{

View File

@@ -39,8 +39,7 @@ public final class UiHelpers
}
@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 iconMinus = new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_minus)).build();
@@ -59,15 +58,13 @@ public final class UiHelpers
}
@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();
}
@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);
}
@@ -81,8 +78,7 @@ public final class UiHelpers
}
@NonNull
private static Action createSettingsAction(@NonNull BaseMapScreen mapScreen,
@NonNull Renderer surfaceRenderer,
private static Action createSettingsAction(@NonNull BaseMapScreen mapScreen, @NonNull Renderer surfaceRenderer,
@Nullable OnScreenResultListener onScreenResultListener)
{
final CarContext context = mapScreen.getCarContext();
@@ -123,8 +119,7 @@ public final class UiHelpers
return null;
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)
builder.setTitle(ohStr);

View File

@@ -6,19 +6,16 @@ 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 app.organicmaps.R;
import app.organicmaps.sdk.Framework;
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
@@ -28,26 +25,22 @@ public final class CustomMapServerDialog
private CustomMapServerDialog() {}
public static void show(@NonNull Context context,
@Nullable OnUrlAppliedListener listener)
public static void show(@NonNull Context context, @Nullable OnUrlAppliedListener listener)
{
View dialogView = LayoutInflater.from(context)
.inflate(R.layout.dialog_custom_map_server, null);
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);
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)
.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);
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(context)
.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 -> {
@@ -55,9 +48,7 @@ public final class CustomMapServerDialog
ok.setOnClickListener(v -> {
String url = edit.getText() != null ? edit.getText().toString().trim() : "";
if (!url.isEmpty()
&& !url.startsWith("http://")
&& !url.startsWith("https://"))
if (!url.isEmpty() && !url.startsWith("http://") && !url.startsWith("https://"))
{
til.setError(context.getString(R.string.download_resources_custom_url_error_scheme));
return;
@@ -67,9 +58,7 @@ public final class CustomMapServerDialog
String normalizedUrl = Framework.normalizeServerUrl(url);
prefs.edit()
.putString(context.getString(R.string.pref_custom_map_download_url), normalizedUrl)
.apply();
prefs.edit().putString(context.getString(R.string.pref_custom_map_download_url), normalizedUrl).apply();
// Apply to native
Framework.applyCustomMapDownloadUrl(context, normalizedUrl);

View File

@@ -125,7 +125,8 @@ public class EditTextDialogFragment extends BaseMwmDialogFragment
positiveButton.setOnClickListener(view -> {
final String result = mEtInput.getText().toString();
if (validateInput(requireActivity(), result)) {
if (validateInput(requireActivity(), result))
{
processInput(result);
editTextDialog.dismiss();
}

View File

@@ -4,7 +4,6 @@ import android.location.Location;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import androidx.core.view.ViewCompat;
import app.organicmaps.MwmActivity;
@@ -49,7 +48,8 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
@Override
public void onStatusChanged(List<MapManager.StorageCallbackData> data)
{
if (mCurrentCountry == null) {
if (mCurrentCountry == null)
{
updateOfflineExplanationVisibility();
return;
}
@@ -109,10 +109,13 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
return enqueued || progress || applying;
}
private void updateOfflineExplanationVisibility() {
if (mOfflineExplanation == null) return;
private void updateOfflineExplanationVisibility()
{
if (mOfflineExplanation == null)
return;
// hide once threshold reached; safe to call repeatedly.
app.organicmaps.util.UiUtils.showIf(MapManager.nativeGetDownloadedCount() < (DEFAULT_MAP_BASELINE + HIDE_THRESHOLD), mOfflineExplanation);
app.organicmaps.util.UiUtils.showIf(MapManager.nativeGetDownloadedCount() < (DEFAULT_MAP_BASELINE + HIDE_THRESHOLD),
mOfflineExplanation);
}
private void updateProgressState(boolean shouldAutoDownload)

View File

@@ -15,7 +15,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.AutoCompleteTextView;
import android.widget.GridLayout;
import androidx.annotation.CallSuper;
import androidx.annotation.DrawableRes;
import androidx.annotation.IdRes;
@@ -196,8 +195,9 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
{
final Context context = mInputBuildingLevels.getContext();
final boolean isValid = Editor.nativeIsLevelValid(s.toString());
mInputBuildingLevels.setError(isValid ? null : context.getString(R.string.error_enter_correct_storey_number,
Editor.nativeGetMaxEditableBuildingLevels()));
mInputBuildingLevels.setError(isValid ? null
: context.getString(R.string.error_enter_correct_storey_number,
Editor.nativeGetMaxEditableBuildingLevels()));
}
});
@@ -396,7 +396,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
List<String> SOCKET_TYPES = Arrays.stream(getResources().getStringArray(R.array.charge_socket_types)).toList();
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);
@@ -404,16 +404,16 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
// load SVG icon converted into VectorDrawable in res/drawable
@SuppressLint("DiscouragedApi")
int resIconId =
getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable", requireContext().getPackageName());
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable",
requireContext().getPackageName());
if (resIconId != 0)
{
btn.setIcon(getResources().getDrawable(resIconId));
}
@SuppressLint("DiscouragedApi")
int resTypeId =
getResources().getIdentifier("charge_socket_" + socket.visualType(), "string", requireContext().getPackageName());
int resTypeId = getResources().getIdentifier("charge_socket_" + socket.visualType(), "string",
requireContext().getPackageName());
if (resTypeId != 0)
{
btn.setText(getResources().getString(resTypeId));
@@ -461,13 +461,16 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
// Add a TextWatcher to validate on text change
countView.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
public void beforeTextChanged(CharSequence s, int start, int count, int after)
{}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {}
public void onTextChanged(CharSequence s, int start, int before, int count)
{}
@Override
public void afterTextChanged(Editable s) {
public void afterTextChanged(Editable s)
{
validatePositiveField(s.toString(), countInputLayout);
}
});
@@ -482,13 +485,16 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
// Add a TextWatcher to validate on text change
powerView.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
public void beforeTextChanged(CharSequence s, int start, int count, int after)
{}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {}
public void onTextChanged(CharSequence s, int start, int before, int count)
{}
@Override
public void afterTextChanged(Editable s) {
public void afterTextChanged(Editable s)
{
validatePositiveField(s.toString(), powerInputLayout);
}
});
@@ -496,74 +502,82 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
return new MaterialAlertDialogBuilder(requireActivity())
.setTitle(R.string.editor_socket)
.setView(dialogView)
.setPositiveButton(R.string.save,
(dialog, which) -> {
String socketType = "";
for (MaterialButton b : buttonList)
{
if (b.isChecked())
{
socketType = b.getTag(R.id.socket_type).toString();
break;
}
}
.setPositiveButton(
R.string.save,
(dialog, which) -> {
String socketType = "";
for (MaterialButton b : buttonList)
{
if (b.isChecked())
{
socketType = b.getTag(R.id.socket_type).toString();
break;
}
}
int countValue = 0; // 0 means 'unknown count'
try
{
countValue = Integer.parseInt(countView.getText().toString());
}
catch (NumberFormatException ignored)
{
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
}
int countValue = 0; // 0 means 'unknown count'
try
{
countValue = Integer.parseInt(countView.getText().toString());
}
catch (NumberFormatException ignored)
{
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
}
if (countValue < 0)
{
countValue = 0;
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
}
if (countValue < 0)
{
countValue = 0;
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
}
double powerValue = 0; // 0 means 'unknown power'
try
{
powerValue = Double.parseDouble(powerView.getText().toString());
}
catch (NumberFormatException ignored)
{
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
}
double powerValue = 0; // 0 means 'unknown power'
try
{
powerValue = Double.parseDouble(powerView.getText().toString());
}
catch (NumberFormatException ignored)
{
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
}
if (powerValue < 0)
{
powerValue = 0;
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
}
if (powerValue < 0)
{
powerValue = 0;
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());
}
// Helper method for validation logic
private boolean validatePositiveField(String text, TextInputLayout layout) {
if (text.isEmpty()) {
private boolean validatePositiveField(String text, TextInputLayout layout)
{
if (text.isEmpty())
{
layout.setError(null); // No error if empty (assuming 0 is the default)
return true;
}
try {
try
{
double value = Double.parseDouble(text);
if (value < 0) {
if (value < 0)
{
layout.setError(getString(R.string.error_value_must_be_positive));
return false;
} else {
layout.setError(null);
return true;
}
} catch (NumberFormatException e) {
else
{
layout.setError(null);
return true;
}
}
catch (NumberFormatException e)
{
layout.setError(getString(R.string.error_invalid_number));
return false;
}
@@ -583,7 +597,8 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
{
sockets[socketIndex] = socket;
}
else {
else
{
List<ChargeSocketDescriptor> list = new ArrayList<>(Arrays.asList(sockets));
list.add(socket);
sockets = list.toArray(new ChargeSocketDescriptor[0]);
@@ -601,7 +616,8 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
GridLayout socketsGrid = mChargeSockets.findViewById(R.id.socket_grid_editor);
socketsGrid.removeAllViews();
for (int i = 0; i < sockets.length; i++) {
for (int i = 0; i < sockets.length; i++)
{
final int currentIndex = i;
ChargeSocketDescriptor socket = sockets[i];
@@ -612,27 +628,30 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
MaterialTextView power = itemView.findViewById(R.id.socket_power);
MaterialTextView count = itemView.findViewById(R.id.socket_count);
// load SVG icon converted into VectorDrawable in res/drawable
@SuppressLint("DiscouragedApi")
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable",
requireContext().getPackageName());
if (resIconId != 0) {
requireContext().getPackageName());
if (resIconId != 0)
{
icon.setImageResource(resIconId);
}
@SuppressLint("DiscouragedApi")
int resTypeId =
getResources().getIdentifier("charge_socket_" + socket.visualType(), "string", requireContext().getPackageName());
if (resTypeId != 0) {
int resTypeId = getResources().getIdentifier("charge_socket_" + socket.visualType(), "string",
requireContext().getPackageName());
if (resTypeId != 0)
{
type.setText(resTypeId);
}
if (socket.power() != 0) {
if (socket.power() != 0)
{
DecimalFormat df = new DecimalFormat("#.##");
power.setText(getString(R.string.kw_label, df.format(socket.power())));
}
else if (socket.ignorePower()) {
else if (socket.ignorePower())
{
power.setVisibility(INVISIBLE);
}
@@ -641,7 +660,8 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
count.setText(getString(R.string.count_label, socket.count()));
}
itemView.setOnClickListener(v -> buildChargeSocketDialog(currentIndex, socket.type(), socket.count(), socket.power()).show());
itemView.setOnClickListener(
v -> buildChargeSocketDialog(currentIndex, socket.type(), socket.count(), socket.power()).show());
socketsGrid.addView(itemView);
}
@@ -787,9 +807,8 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
View lineContactBlock =
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);
View blueskyContactBlock =
initBlock(view, Metadata.MetadataType.FMD_CONTACT_BLUESKY, R.id.block_bluesky, R.drawable.ic_bluesky,
R.string.bluesky, InputType.TYPE_TEXT_VARIATION_URI);
View blueskyContactBlock = 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,
R.drawable.ic_operator, R.string.editor_operator, 0);
@@ -1021,14 +1040,15 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
private void placeDisused()
{
new MaterialAlertDialogBuilder(requireActivity())
.setTitle(R.string.editor_mark_business_vacant_title)
.setMessage(R.string.editor_mark_business_vacant_description)
.setPositiveButton(R.string.editor_submit, (dlg, which) -> {
Editor.nativeMarkPlaceAsDisused();
mParent.processEditedFeatures();
})
.setNegativeButton(android.R.string.cancel, null)
.show();
.setTitle(R.string.editor_mark_business_vacant_title)
.setMessage(R.string.editor_mark_business_vacant_description)
.setPositiveButton(R.string.editor_submit,
(dlg, which) -> {
Editor.nativeMarkPlaceAsDisused();
mParent.processEditedFeatures();
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
private void commitPlaceDoesntExists(@NonNull String text)

View File

@@ -237,6 +237,7 @@ public class EditorHostFragment
for (LocalizedName name : sNames)
languages.add(name.lang);
args.putStringArrayList(LanguagesFragment.EXISTING_LOCALIZED_NAMES, languages);
args.putBoolean(LanguagesFragment.INCLUDE_LOCAL_LANGUAGE, false);
editWithFragment(Mode.LANGUAGE, R.string.choose_language, args, LanguagesFragment.class, false);
}

View File

@@ -13,7 +13,6 @@ import app.organicmaps.R;
import app.organicmaps.sdk.editor.data.FeatureCategory;
import app.organicmaps.sdk.util.StringUtils;
import app.organicmaps.util.UiUtils;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textview.MaterialTextView;
@@ -69,8 +68,7 @@ public class FeatureCategoryAdapter extends RecyclerView.Adapter<RecyclerView.Vi
}
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);
}
@@ -134,26 +132,21 @@ public class FeatureCategoryAdapter extends RecyclerView.Adapter<RecyclerView.Vi
mSendNoteButton = itemView.findViewById(R.id.send_note_button);
mSendNoteButton.setOnClickListener(v -> listener.onSendNoteClicked());
final ColorStateList bgButtonColor = new ColorStateList(
new int[][]{
new int[]{android.R.attr.state_enabled}, // enabled
new int[]{-android.R.attr.state_enabled} // disabled
},
new int[]{
ContextCompat.getColor(
mSendNoteButton.getContext(), R.color.base_accent),
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_disabled)
});
new int[][] {
new int[] {android.R.attr.state_enabled}, // enabled
new int[] {-android.R.attr.state_enabled} // disabled
},
new int[] {ContextCompat.getColor(mSendNoteButton.getContext(), R.color.base_accent),
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_disabled)});
final ColorStateList textButtonColor = new ColorStateList(
new int[][]{
new int[]{android.R.attr.state_enabled}, // enabled
new int[]{-android.R.attr.state_enabled} // disabled
},
new int[]{
ContextCompat.getColor(
mSendNoteButton.getContext(),
UiUtils.getStyledResourceId(mSendNoteButton.getContext(), android.R.attr.textColorPrimaryInverse)),
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_text_disabled)
});
new int[][] {
new int[] {android.R.attr.state_enabled}, // enabled
new int[] {-android.R.attr.state_enabled} // disabled
},
new int[] {ContextCompat.getColor(mSendNoteButton.getContext(),
UiUtils.getStyledResourceId(mSendNoteButton.getContext(),
android.R.attr.textColorPrimaryInverse)),
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_text_disabled)});
mSendNoteButton.setBackgroundTintList(bgButtonColor);
mSendNoteButton.setTextColor(textButtonColor);
mNoteEditText.addTextChangedListener(new StringUtils.SimpleTextWatcher() {

View File

@@ -2,19 +2,16 @@ package app.organicmaps.editor;
import android.content.res.Configuration;
import android.content.res.Resources;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
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.sdk.editor.data.HoursMinutes;
import app.organicmaps.sdk.util.DateUtils;
import com.google.android.material.timepicker.MaterialTimePicker;
import com.google.android.material.timepicker.TimeFormat;
public class FromToTimePicker
{
@@ -32,18 +29,11 @@ public class FromToTimePicker
private boolean mIsFromTimePicked;
private int mInputMode;
public static void pickTime(@NonNull Fragment fragment,
@NonNull FromToTimePicker.OnPickListener listener,
@NonNull HoursMinutes fromTime,
@NonNull HoursMinutes toTime,
int id,
public static void pickTime(@NonNull Fragment fragment, @NonNull FromToTimePicker.OnPickListener listener,
@NonNull HoursMinutes fromTime, @NonNull HoursMinutes toTime, int id,
boolean startWithToTime)
{
FromToTimePicker timePicker = new FromToTimePicker(fragment,
listener,
fromTime,
toTime,
id);
FromToTimePicker timePicker = new FromToTimePicker(fragment, listener, fromTime, toTime, id);
if (startWithToTime)
timePicker.showToTimePicker();
@@ -51,11 +41,8 @@ public class FromToTimePicker
timePicker.showFromTimePicker();
}
private FromToTimePicker(@NonNull Fragment fragment,
@NonNull FromToTimePicker.OnPickListener listener,
@NonNull HoursMinutes fromTime,
@NonNull HoursMinutes toTime,
int id)
private FromToTimePicker(@NonNull Fragment fragment, @NonNull FromToTimePicker.OnPickListener listener,
@NonNull HoursMinutes fromTime, @NonNull HoursMinutes toTime, int id)
{
mActivity = fragment.requireActivity();
mFragmentManager = fragment.getChildFragmentManager();
@@ -100,15 +87,12 @@ public class FromToTimePicker
private MaterialTimePicker buildFromTimePicker()
{
MaterialTimePicker timePicker = buildTimePicker(mFromTime,
mResources.getString(R.string.editor_time_from),
mResources.getString(R.string.next_button),
null);
MaterialTimePicker timePicker = buildTimePicker(mFromTime, mResources.getString(R.string.editor_time_from),
mResources.getString(R.string.next_button), null);
timePicker.addOnNegativeButtonClickListener(view -> finishTimePicking(false));
timePicker.addOnPositiveButtonClickListener(view ->
{
timePicker.addOnPositiveButtonClickListener(view -> {
mIsFromTimePicked = true;
saveState(timePicker, true);
mFromTimePicker = null;
@@ -122,13 +106,10 @@ public class FromToTimePicker
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));
timePicker.addOnNegativeButtonClickListener(view ->
{
timePicker.addOnNegativeButtonClickListener(view -> {
saveState(timePicker, false);
mToTimePicker = null;
if (mIsFromTimePicked)
@@ -137,8 +118,7 @@ public class FromToTimePicker
finishTimePicking(false);
});
timePicker.addOnPositiveButtonClickListener(view ->
{
timePicker.addOnPositiveButtonClickListener(view -> {
saveState(timePicker, false);
finishTimePicking(true);
});
@@ -149,18 +129,18 @@ public class FromToTimePicker
}
@NonNull
private MaterialTimePicker buildTimePicker(@NonNull HoursMinutes time,
@NonNull String title,
private MaterialTimePicker buildTimePicker(@NonNull HoursMinutes time, @NonNull String title,
@Nullable String positiveButtonTextOverride,
@Nullable String negativeButtonTextOverride)
{
MaterialTimePicker.Builder builder = new MaterialTimePicker.Builder()
.setTitleText(title)
.setTimeFormat(mIs24HourFormat ? TimeFormat.CLOCK_24H : TimeFormat.CLOCK_12H)
.setInputMode(mInputMode)
.setTheme(R.style.MwmTheme_MaterialTimePicker)
.setHour((int) time.hours)
.setMinute((int) time.minutes);
MaterialTimePicker.Builder builder =
new MaterialTimePicker.Builder()
.setTitleText(title)
.setTimeFormat(mIs24HourFormat ? TimeFormat.CLOCK_24H : TimeFormat.CLOCK_12H)
.setInputMode(mInputMode)
.setTheme(R.style.MwmTheme_MaterialTimePicker)
.setHour((int) time.hours)
.setMinute((int) time.minutes);
if (positiveButtonTextOverride != null)
builder.setPositiveButtonText(positiveButtonTextOverride);

View File

@@ -1,11 +1,14 @@
package app.organicmaps.editor;
import static app.organicmaps.sdk.editor.data.Language.DEFAULT_LANG_CODE;
import android.content.res.Configuration;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.core.os.ConfigurationCompat;
import androidx.core.os.LocaleListCompat;
import androidx.fragment.app.Fragment;
import app.organicmaps.R;
import app.organicmaps.base.BaseMwmRecyclerFragment;
import app.organicmaps.sdk.editor.Editor;
import app.organicmaps.sdk.editor.data.Language;
@@ -21,6 +24,7 @@ import java.util.Set;
public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
{
final static String EXISTING_LOCALIZED_NAMES = "ExistingLocalizedNames";
final static String INCLUDE_LOCAL_LANGUAGE = "IncludeLocalLanguage";
public interface Listener
{
@@ -34,6 +38,7 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
protected LanguagesAdapter createAdapter()
{
Bundle args = getArguments();
boolean includeLocalLanguage = args != null ? args.getBoolean(INCLUDE_LOCAL_LANGUAGE) : true;
Set<String> existingLanguages =
args != null ? new HashSet<>(args.getStringArrayList(EXISTING_LOCALIZED_NAMES)) : new HashSet<>();
@@ -68,6 +73,13 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
languages.addAll(0, systemLanguages.stream().filter(Objects::nonNull).toList());
if (includeLocalLanguage)
{
String localLanguageLabel = getString(R.string.pref_maplanguage_local);
Language localLanguage = new Language(DEFAULT_LANG_CODE, localLanguageLabel);
languages.add(0, localLanguage);
}
return new LanguagesAdapter(this, languages.toArray(new Language[languages.size()]));
}

View File

@@ -7,7 +7,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import androidx.annotation.IdRes;
import androidx.annotation.IntRange;
import androidx.annotation.Nullable;
@@ -122,20 +121,14 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
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)
{
final Timetable data = mItems.get(position);
mPickingPosition = position;
FromToTimePicker.pickTime(mFragment,
this,
data.workingTimespan.start,
data.workingTimespan.end,
id,
startWithToTime);
FromToTimePicker.pickTime(mFragment, this, data.workingTimespan.start, data.workingTimespan.end, id,
startWithToTime);
}
@Override
@@ -384,26 +377,21 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
final String text = mFragment.getString(R.string.editor_time_add);
mAdd.setEnabled(enable);
final ColorStateList bgButtonColor = new ColorStateList(
new int[][]{
new int[]{android.R.attr.state_enabled}, // enabled
new int[]{-android.R.attr.state_enabled} // disabled
},
new int[]{
ContextCompat.getColor(
mAdd.getContext(), R.color.base_accent),
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_disabled)
});
new int[][] {
new int[] {android.R.attr.state_enabled}, // enabled
new int[] {-android.R.attr.state_enabled} // disabled
},
new int[] {ContextCompat.getColor(mAdd.getContext(), R.color.base_accent),
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_disabled)});
final ColorStateList textButtonColor = new ColorStateList(
new int[][]{
new int[]{android.R.attr.state_enabled}, // enabled
new int[]{-android.R.attr.state_enabled} // disabled
},
new int[]{
ContextCompat.getColor(
mAdd.getContext(),
UiUtils.getStyledResourceId(mAdd.getContext(), android.R.attr.textColorPrimaryInverse)),
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_text_disabled)
});
new int[][] {
new int[] {android.R.attr.state_enabled}, // enabled
new int[] {-android.R.attr.state_enabled} // disabled
},
new int[] {
ContextCompat.getColor(mAdd.getContext(), UiUtils.getStyledResourceId(
mAdd.getContext(), android.R.attr.textColorPrimaryInverse)),
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_text_disabled)});
mAdd.setBackgroundTintList(bgButtonColor);
mAdd.setTextColor(textButtonColor);
mAdd.setText(enable ? text + " (" + TimeFormatUtils.formatWeekdays(mComplementItem) + ")" : text);

View File

@@ -9,8 +9,8 @@ import androidx.annotation.Nullable;
import app.organicmaps.R;
import app.organicmaps.base.BaseMwmRecyclerFragment;
public class SimpleTimetableFragment extends BaseMwmRecyclerFragment<SimpleTimetableAdapter>
implements TimetableProvider
public class SimpleTimetableFragment
extends BaseMwmRecyclerFragment<SimpleTimetableAdapter> implements TimetableProvider
{
private SimpleTimetableAdapter mAdapter;
@Nullable

View File

@@ -35,25 +35,30 @@ public class LayerBottomSheetItem
@DrawableRes
int drawableResId = 0;
@StringRes
int buttonTextResource = switch (mode) {
case OUTDOORS -> {
drawableResId = R.drawable.ic_layers_outdoors;
yield R.string.button_layer_outdoor;
}
case SUBWAY -> {
drawableResId = R.drawable.ic_layers_subway;
yield R.string.subway;
}
case ISOLINES -> {
drawableResId = R.drawable.ic_layers_isoline;
yield R.string.button_layer_isolines;
}
case TRAFFIC -> {
drawableResId = R.drawable.ic_layers_traffic;
yield R.string.button_layer_traffic;
}
int buttonTextResource = switch (mode)
{
case OUTDOORS ->
{
drawableResId = R.drawable.ic_layers_outdoors;
yield R.string.button_layer_outdoor;
}
case SUBWAY ->
{
drawableResId = R.drawable.ic_layers_subway;
yield R.string.subway;
}
case ISOLINES ->
{
drawableResId = R.drawable.ic_layers_isoline;
yield R.string.button_layer_isolines;
}
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

View File

@@ -5,11 +5,9 @@ import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.textview.MaterialTextView;
import app.organicmaps.R;
import app.organicmaps.adapter.OnItemClickListener;
import com.google.android.material.textview.MaterialTextView;
class LayerHolder extends RecyclerView.ViewHolder
{

View File

@@ -395,7 +395,7 @@ public class MapButtonsController extends Fragment
0;
// Allow offset tolerance for zoom buttons
};
showButton(getViewTopOffset(translation, button) >= toleranceOffset, entry.getKey());
showButton(getViewTopOffset(translation, button) >= toleranceOffset, entry.getKey());
}
}
}

View File

@@ -99,9 +99,9 @@ public class NavigationController implements TrafficManager.TrafficCallback, Nav
mCurrentSpeed = topFrame.findViewById(R.id.nav_current_speed);
View mTopbar = topFrame.findViewById(R.id.statutbar);
ViewCompat.setOnApplyWindowInsetsListener(mTopbar,(v, windowInsets) -> {
UiUtils.setViewNavigationTopInsetsMargin(v, windowInsets);
return windowInsets;
ViewCompat.setOnApplyWindowInsetsListener(mTopbar, (v, windowInsets) -> {
UiUtils.setViewNavigationTopInsetsMargin(v, windowInsets);
return windowInsets;
});
// Show a blank view below the navbar to hide the menu content
final View navigationBarBackground = mFrame.findViewById(R.id.nav_bottom_sheet_nav_bar);

View File

@@ -43,7 +43,6 @@ import app.organicmaps.util.UiUtils;
import app.organicmaps.util.Utils;
import app.organicmaps.widget.recycler.DotDividerItemDecoration;
import app.organicmaps.widget.recycler.MultilineLayoutManager;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.imageview.ShapeableImageView;
import com.google.android.material.textview.MaterialTextView;
@@ -123,9 +122,9 @@ final class RoutingBottomMenuController implements View.OnClickListener
@NonNull View timeElevationLine, @NonNull View transitFrame,
@NonNull MaterialTextView error, @NonNull MaterialButton start,
@NonNull ShapeableImageView altitudeChart, @NonNull MaterialTextView time,
@NonNull MaterialTextView altitudeDifference, @NonNull MaterialTextView timeVehicle,
@Nullable MaterialTextView arrival, @NonNull View actionFrame,
@Nullable RoutingBottomMenuListener listener)
@NonNull MaterialTextView altitudeDifference,
@NonNull MaterialTextView timeVehicle, @Nullable MaterialTextView arrival,
@NonNull View actionFrame, @Nullable RoutingBottomMenuListener listener)
{
mContext = context;
mAltitudeChartFrame = altitudeChartFrame;

View File

@@ -12,9 +12,6 @@ import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.google.android.material.textview.MaterialTextView;
import app.organicmaps.MwmApplication;
import app.organicmaps.R;
import app.organicmaps.sdk.Framework;
@@ -29,6 +26,7 @@ import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
import app.organicmaps.widget.RoutingToolbarButton;
import app.organicmaps.widget.ToolbarController;
import app.organicmaps.widget.WheelProgressView;
import com.google.android.material.textview.MaterialTextView;
public class RoutingPlanController extends ToolbarController
{
@@ -264,7 +262,7 @@ public class RoutingPlanController extends ToolbarController
default -> throw new IllegalArgumentException("unknown router: " + router);
};
RoutingToolbarButton button = mRouterTypes.findViewById(mRouterTypes.getCheckedRadioButtonId());
RoutingToolbarButton button = mRouterTypes.findViewById(mRouterTypes.getCheckedRadioButtonId());
button.progress();
updateProgressLabels();

View File

@@ -14,12 +14,10 @@ import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.textview.MaterialTextView;
import app.organicmaps.R;
import app.organicmaps.sdk.search.DisplayedCategories;
import app.organicmaps.sdk.util.Language;
import com.google.android.material.textview.MaterialTextView;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Locale;

View File

@@ -10,14 +10,12 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.textview.MaterialTextView;
import app.organicmaps.R;
import app.organicmaps.sdk.search.SearchResult;
import app.organicmaps.util.Graphics;
import app.organicmaps.util.ThemeUtils;
import app.organicmaps.util.UiUtils;
import com.google.android.material.textview.MaterialTextView;
class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHolder>
{
@@ -152,7 +150,8 @@ class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHol
{
final Resources resources = mSearchFragment.getResources();
if (result.description.openNow != SearchResult.OPEN_NOW_YES && result.description.openNow != SearchResult.OPEN_NOW_NO)
if (result.description.openNow != SearchResult.OPEN_NOW_YES
&& result.description.openNow != SearchResult.OPEN_NOW_NO)
{
// Hide if unknown opening hours state
UiUtils.hide(mOpen);
@@ -169,15 +168,18 @@ class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHol
{
final String minsToChangeStr = resources.getQuantityString(
R.plurals.minutes_short, Math.max(minsToNextState, 1), Math.max(minsToNextState, 1));
final String nextChangeFormatted = resources.getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
final String nextChangeFormatted =
resources.getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
UiUtils.setTextAndShow(mOpen, nextChangeFormatted);
mOpen.setTextColor(ContextCompat.getColor(mSearchFragment.getContext(), R.color.base_yellow));
}
else
{
UiUtils.setTextAndShow(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));
UiUtils.setTextAndShow(
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));
}
}

View File

@@ -273,7 +273,8 @@ public class SearchFragment extends BaseMwmFragment implements SearchListener, C
RecyclerView mResults = mResultsFrame.findViewById(R.id.recycler);
setRecyclerScrollListener(mResults);
mResultsPlaceholder = mResultsFrame.findViewById(R.id.placeholder);
mResultsPlaceholder.setContent(R.string.search_not_found, R.string.search_not_found_query, R.drawable.ic_search_fail);
mResultsPlaceholder.setContent(R.string.search_not_found, R.string.search_not_found_query,
R.drawable.ic_search_fail);
mSearchAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver()
{

View File

@@ -5,15 +5,13 @@ import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.textview.MaterialTextView;
import app.organicmaps.MwmApplication;
import app.organicmaps.R;
import app.organicmaps.sdk.routing.RoutingController;
import app.organicmaps.sdk.search.SearchRecents;
import app.organicmaps.util.Graphics;
import app.organicmaps.widget.SearchToolbarController;
import com.google.android.material.textview.MaterialTextView;
class SearchHistoryAdapter extends RecyclerView.Adapter<SearchHistoryAdapter.ViewHolder>
{

View File

@@ -8,14 +8,12 @@ import android.view.ViewGroup;
import android.widget.CompoundButton;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.material.materialswitch.MaterialSwitch;
import app.organicmaps.R;
import app.organicmaps.base.BaseMwmToolbarFragment;
import app.organicmaps.sdk.routing.RoutingController;
import app.organicmaps.sdk.routing.RoutingOptions;
import app.organicmaps.sdk.settings.RoadType;
import com.google.android.material.materialswitch.MaterialSwitch;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;

View File

@@ -1,13 +1,13 @@
package app.organicmaps.settings;
import static app.organicmaps.leftbutton.LeftButtonsHolder.DISABLE_BUTTON_CODE;
import static app.organicmaps.sdk.editor.data.Language.DEFAULT_LANG_CODE;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.preference.ListPreference;
@@ -15,9 +15,6 @@ import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceManager;
import androidx.preference.TwoStatePreference;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import app.organicmaps.MwmApplication;
import app.organicmaps.R;
import app.organicmaps.dialog.CustomMapServerDialog;
@@ -42,7 +39,7 @@ import app.organicmaps.sdk.util.SharedPropertiesUtils;
import app.organicmaps.sdk.util.log.LogsManager;
import app.organicmaps.util.ThemeSwitcher;
import app.organicmaps.util.Utils;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -140,8 +137,16 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
private void updateMapLanguageCodeSummary()
{
final Preference pref = getPreference(getString(R.string.pref_map_locale));
Locale locale = new Locale(MapLanguageCode.getMapLanguageCode());
pref.setSummary(locale.getDisplayLanguage());
String mapLanguageCode = MapLanguageCode.getMapLanguageCode();
if (mapLanguageCode.equals(DEFAULT_LANG_CODE))
{
pref.setSummary(R.string.pref_maplanguage_local);
}
else
{
Locale locale = new Locale(mapLanguageCode);
pref.setSummary(locale.getDisplayLanguage());
}
}
private void updateRoutingSettingsPrefsSummary()
@@ -553,9 +558,8 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
String normalizedUrl = Framework.normalizeServerUrl(current);
// Initial summary
customUrlPref.setSummary(normalizedUrl.isEmpty()
? getString(R.string.download_resources_custom_url_summary_none)
: normalizedUrl);
customUrlPref.setSummary(normalizedUrl.isEmpty() ? getString(R.string.download_resources_custom_url_summary_none)
: normalizedUrl);
// Sync native
Framework.applyCustomMapDownloadUrl(requireContext(), normalizedUrl);
@@ -563,9 +567,7 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
// Show dialog
customUrlPref.setOnPreferenceClickListener(preference -> {
CustomMapServerDialog.show(requireContext(), url -> {
preference.setSummary(url.isEmpty()
? getString(R.string.download_resources_custom_url_summary_none)
: url);
preference.setSummary(url.isEmpty() ? getString(R.string.download_resources_custom_url_summary_none) : url);
});
return true;
});

View File

@@ -274,10 +274,10 @@ public final class UiUtils
public static void setViewNavigationTopInsetsMargin(View view, WindowInsetsCompat windowInsets)
{
final Insets systemInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
lp.topMargin = systemInsets.top;
view.setLayoutParams(lp);
final Insets systemInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
lp.topMargin = systemInsets.top;
view.setLayoutParams(lp);
}
public static void setupNavigationIcon(@NonNull MaterialToolbar toolbar, @NonNull View.OnClickListener listener)

View File

@@ -53,7 +53,7 @@ public class MenuBottomSheetFragment extends BottomSheetDialogFragment
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState)
{
return new BottomSheetDialog(requireContext(), getTheme()) {
return new BottomSheetDialog(requireContext(), R.style.MwmTheme_BottomSheetDialog) {
@Override
public void onAttachedToWindow()
{

View File

@@ -8,165 +8,165 @@ import android.graphics.Typeface;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public abstract class BaseSignView extends View
{
private float mBorderWidthRatio = 0.1f;
protected void setBorderWidthRatio(float ratio) {
mBorderWidthRatio = ratio;
}
private float mBorderWidthRatio = 0.1f;
protected void setBorderWidthRatio(float ratio)
{
mBorderWidthRatio = ratio;
}
private float mBorderInsetRatio = 0f;
protected void setBorderInsetRatio(float ratio) {
mBorderInsetRatio = 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;
// 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;
// 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;
// geometry
protected float mWidth;
protected float mHeight;
protected float mRadius;
protected float mBorderWidth;
protected float mBorderRadius;
public BaseSignView(Context ctx, @Nullable AttributeSet attrs)
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)
{
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));
mBorderPaint.setStrokeWidth(mBorderWidth);
mBorderPaint.setColor(mBorderColor);
canvas.drawCircle(cx, cy, mBorderRadius, mBorderPaint);
}
protected void setColors(int backgroundColor,
int borderColor,
int alertColor,
int textColor,
int textAlertColor)
// 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))
{
mBackgroundColor = backgroundColor;
mBorderColor = borderColor;
mAlertColor = alertColor;
mTextColor = textColor;
mTextAlertColor = textAlertColor;
mBackgroundPaint.setColor(mBackgroundColor);
mBorderPaint.setColor(mBorderColor);
mTextPaint.setColor(mTextColor);
performClick();
return true;
}
return false;
}
@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
public boolean performClick()
{
super.performClick();
return false;
}
@Override
protected void onDraw(@NonNull Canvas canvas)
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)
{
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);
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));
}
@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;
}
/** child must return the string to draw, or null if nothing */
@Nullable
protected abstract String getValueString();
@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();
/** child decides if this is in “alert” state */
protected abstract boolean isAlert();
}

View File

@@ -4,9 +4,7 @@ import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.Pair;
import androidx.annotation.Nullable;
import app.organicmaps.R;
import app.organicmaps.sdk.util.StringUtils;
@@ -22,18 +20,18 @@ public class CurrentSpeedView extends BaseSignView
setBorderWidthRatio(0.1f);
setBorderInsetRatio(0.05f);
try (TypedArray a = ctx.getTheme()
.obtainStyledAttributes(attrs, R.styleable.CurrentSpeedView /* reuse same attrs or define new */ , 0, 0))
try (TypedArray a = ctx.getTheme().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 bd = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBorderColor, DefaultValues.BORDER_COLOR);
int tc = a.getColor(R.styleable.CurrentSpeedView_currentSpeedTextColor, DefaultValues.TEXT_COLOR);
int bg = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBackgroundColor, DefaultValues.BACKGROUND_COLOR);
int bd = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBorderColor, DefaultValues.BORDER_COLOR);
int tc = a.getColor(R.styleable.CurrentSpeedView_currentSpeedTextColor, DefaultValues.TEXT_COLOR);
setColors(bg, bd, 0, tc, 0);
if (isInEditMode())
{
mSpeedMps = a.getInt(R.styleable.CurrentSpeedView_currentSpeedEditModeCurrentSpeed, 50);
mSpeedStr = Integer.toString((int)mSpeedMps);
mSpeedMps = a.getInt(R.styleable.CurrentSpeedView_currentSpeedEditModeCurrentSpeed, 50);
mSpeedStr = Integer.toString((int) mSpeedMps);
}
}
}
@@ -47,7 +45,7 @@ public class CurrentSpeedView extends BaseSignView
}
else
{
Pair<String,String> su = StringUtils.nativeFormatSpeedAndUnits(mps);
Pair<String, String> su = StringUtils.nativeFormatSpeedAndUnits(mps);
mSpeedStr = su.first;
}
requestLayout();
@@ -70,8 +68,8 @@ public class CurrentSpeedView extends BaseSignView
private interface DefaultValues
{
int BACKGROUND_COLOR = 0xFFFFFFFF;
int BORDER_COLOR = 0xFF000000;
int TEXT_COLOR = 0xFF000000;
int BACKGROUND_COLOR = 0xFFFFFFFF;
int BORDER_COLOR = 0xFF000000;
int TEXT_COLOR = 0xFF000000;
}
}

View File

@@ -12,12 +12,10 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.core.content.ContextCompat;
import com.google.android.material.imageview.ShapeableImageView;
import com.google.android.material.textview.MaterialTextView;
import app.organicmaps.R;
import app.organicmaps.util.UiUtils;
import com.google.android.material.imageview.ShapeableImageView;
import com.google.android.material.textview.MaterialTextView;
public class PlaceholderView extends LinearLayout
{

View File

@@ -5,16 +5,14 @@ import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import androidx.annotation.Nullable;
import app.organicmaps.R;
public class SpeedLimitView extends BaseSignView
{
private int mSpeedLimit = -1;
private boolean mAlert = false;
private String mSpeedStr = "-1";
private int mSpeedLimit = -1;
private boolean mAlert = false;
private String mSpeedStr = "-1";
private final int unlimitedBorderColor;
private final int unlimitedStripeColor;
@@ -27,15 +25,22 @@ public class SpeedLimitView extends BaseSignView
try (TypedArray styleAttrs = ctx.getTheme().obtainStyledAttributes(attrs, R.styleable.SpeedLimitView, 0, 0))
{
final int bgColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBackgroundColor, DefaultValues.BACKGROUND_COLOR);
final int borderColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBorderColor, DefaultValues.BORDER_COLOR);
final int alertColor = 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);
final int bgColor =
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBackgroundColor, DefaultValues.BACKGROUND_COLOR);
final int borderColor =
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBorderColor, DefaultValues.BORDER_COLOR);
final int alertColor =
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);
unlimitedBorderColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedBorderColor, DefaultValues.UNLIMITED_BORDER_COLOR);
unlimitedStripeColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedStripeColor, DefaultValues.UNLIMITED_STRIPE_COLOR);
unlimitedBorderColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedBorderColor,
DefaultValues.UNLIMITED_BORDER_COLOR);
unlimitedStripeColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedStripeColor,
DefaultValues.UNLIMITED_STRIPE_COLOR);
if (isInEditMode())
{
@@ -51,7 +56,7 @@ public class SpeedLimitView extends BaseSignView
if (mSpeedLimit != limit)
{
mSpeedLimit = limit;
mSpeedStr = Integer.toString(limit);
mSpeedStr = Integer.toString(limit);
requestLayout();
}
mAlert = alert;
@@ -75,7 +80,7 @@ public class SpeedLimitView extends BaseSignView
@Override
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)
{
@@ -105,7 +110,7 @@ public class SpeedLimitView extends BaseSignView
stripe.setStrokeWidth(mBorderWidth * 0.4f);
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 px = -dy, py = +dx; // Perpendicular
final float step = radius * 0.15f; // Spacing
@@ -122,14 +127,13 @@ public class SpeedLimitView extends BaseSignView
}
}
private interface DefaultValues
{
int BACKGROUND_COLOR = 0xFFFFFFFF;
int BORDER_COLOR = 0xFFFF0000;
int ALERT_COLOR = 0xFFFF0000;
int TEXT_COLOR = 0xFF000000;
int TEXT_ALERT_COLOR = 0xFFFFFFFF;
int BACKGROUND_COLOR = 0xFFFFFFFF;
int BORDER_COLOR = 0xFFFF0000;
int ALERT_COLOR = 0xFFFF0000;
int TEXT_COLOR = 0xFF000000;
int TEXT_ALERT_COLOR = 0xFFFFFFFF;
int UNLIMITED_BORDER_COLOR = 0xFF000000;
int UNLIMITED_STRIPE_COLOR = 0xFF000000;
}

View File

@@ -61,6 +61,7 @@ public class StackedButtonsDialog extends AppCompatDialog implements View.OnClic
setCancelable(mCancelable);
setOnCancelListener(mCancelListener);
setContentView(R.layout.dialog_stacked_buttons);
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
TextView title = findViewById(R.id.tv__title);
UiUtils.setTextAndHideIfEmpty(title, mTitle);

View File

@@ -72,7 +72,7 @@ public class MyPositionButton
case LocationState.FOLLOW_AND_ROTATE -> R.drawable.ic_follow_and_rotate;
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);
}

View File

@@ -1,9 +1,9 @@
package app.organicmaps.widget.placepage;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import app.organicmaps.sdk.util.StringUtils;
import com.github.mikephil.charting.charts.BarLineChartBase;
import androidx.annotation.Nullable;
import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;

View File

@@ -105,7 +105,8 @@ public class EditBookmarkFragment extends BaseMwmDialogFragment implements View.
public EditBookmarkFragment() {}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
public void onCreate(@Nullable Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setStyle(DialogFragment.STYLE_NORMAL, R.style.MwmTheme_FullScreenDialog);
}
@@ -184,10 +185,9 @@ public class EditBookmarkFragment extends BaseMwmDialogFragment implements View.
{
super.onStart();
Dialog dialog = getDialog();
if (dialog != null) {
dialog.getWindow().setLayout(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT);
if (dialog != null)
{
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
}
// Focus name and show keyboard for "Unknown Place" bookmarks

View File

@@ -6,9 +6,6 @@ import android.widget.RelativeLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.widget.NestedScrollView;
import com.google.android.material.textview.MaterialTextView;
import app.organicmaps.ChartController;
import app.organicmaps.R;
import app.organicmaps.sdk.Framework;
@@ -17,6 +14,7 @@ import app.organicmaps.sdk.bookmarks.data.Track;
import app.organicmaps.sdk.bookmarks.data.TrackStatistics;
import app.organicmaps.util.UiUtils;
import app.organicmaps.util.Utils;
import com.google.android.material.textview.MaterialTextView;
import java.util.Objects;
public class ElevationProfileViewRenderer implements PlacePageStateListener

View File

@@ -14,7 +14,8 @@ public class OpenStateTextFormatter
return String.format(Locale.ROOT, "%02d:%02d", hour, minute);
int h = hour % 12;
if (h == 0) h = 12;
if (h == 0)
h = 12;
String ampm = (hour < 12) ? "AM" : "PM";
return String.format(Locale.ROOT, "%d:%02d %s", h, minute, ampm);
}
@@ -29,21 +30,13 @@ public class OpenStateTextFormatter
return t.getDayOfWeek().getDisplayName(TextStyle.SHORT, locale);
}
static String buildAtLabel(
boolean opens,
boolean isToday,
String dayShort,
String time,
String opensAtLocalized,
String closesAtLocalized,
String opensDayAtLocalized,
String closesDayAtLocalized
)
static String buildAtLabel(boolean opens, boolean isToday, String dayShort, String time, String opensAtLocalized,
String closesAtLocalized, String opensDayAtLocalized, String closesDayAtLocalized)
{
if (isToday)
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
: String.format(Locale.ROOT, closesDayAtLocalized, dayShort, time); // Closes %s at %s
: String.format(Locale.ROOT, closesDayAtLocalized, dayShort, time); // Closes %s at %s
}
}

View File

@@ -80,6 +80,6 @@ public class PlacePageButtonFactory
yield R.drawable.ic_more;
}
};
return new PlacePageButton(titleId, iconId, buttonType);
return new PlacePageButton(titleId, iconId, buttonType);
}
}

View File

@@ -31,7 +31,6 @@ import androidx.fragment.app.FragmentFactory;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import app.organicmaps.MwmActivity;
import app.organicmaps.MwmApplication;
import app.organicmaps.R;
@@ -428,8 +427,9 @@ public class PlacePageView extends Fragment
private void updateBookmarkView()
{
boolean enabled = mMapObject.isBookmark() || mMapObject.isTrack();
updateViewFragment(PlacePageBookmarkFragment.class, BOOKMARK_FRAGMENT_TAG, R.id.place_page_bookmark_fragment,
mMapObject.isBookmark());
enabled);
}
private void updateTrackView()
@@ -714,12 +714,10 @@ public class PlacePageView extends Fragment
// 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);
});
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);
@@ -764,9 +762,7 @@ public class PlacePageView extends Fragment
mTvAddPlace.setTextColor(editButtonColor);
mTvEditPlace.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();
updateOpeningHoursView();
@@ -867,10 +863,9 @@ public class PlacePageView extends Fragment
}
// 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 =
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));
// Get next state info
@@ -896,13 +891,12 @@ public class PlacePageView extends Fragment
if (nextStateTime > 0 && nextStateTime < Long.MAX_VALUE / 2)
{
// 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;
}
}
catch (Throwable ignored) {}
catch (Throwable ignored)
{}
}
if (!hasFiniteNextChange) // No valid next change
@@ -917,7 +911,7 @@ public class PlacePageView extends Fragment
}
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 shortHorizonOpening = !isOpen && minsToNextState >= 0 && minsToNextState <= SHORT_HORIZON_OPEN_MIN;
@@ -925,12 +919,12 @@ public class PlacePageView extends Fragment
if (shortHorizonClosing || shortHorizonOpening) // POI Opens/Closes in 60 mins • at 18:00
{
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);
openStateString.append(nextChangeFormatted, colorYellow, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
.append("") // Add spacer
.append(getString(R.string.at, localizedTimeString));
.append("") // Add spacer
.append(getString(R.string.at, localizedTimeString));
}
else
{
@@ -940,18 +934,16 @@ public class PlacePageView extends Fragment
final String closesDayAtStr = getString(R.string.closes_day_at); // "Closes %1$s at %2$s"
final boolean isToday =
OpenStateTextFormatter.isSameLocalDate(nextChangeLocal, ZonedDateTime.now(nextChangeLocal.getZone()));
OpenStateTextFormatter.isSameLocalDate(nextChangeLocal, ZonedDateTime.now(nextChangeLocal.getZone()));
// 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”
{
openStateString.append(getString(R.string.open_now), colorGreen, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
final String atLabel =
OpenStateTextFormatter.buildAtLabel(false, isToday, dayName, localizedTimeString,
opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
final String atLabel = OpenStateTextFormatter.buildAtLabel(
false, isToday, dayName, localizedTimeString, opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
if (!TextUtils.isEmpty(atLabel))
openStateString.append("").append(atLabel);
@@ -960,9 +952,8 @@ public class PlacePageView extends Fragment
{
openStateString.append(getString(R.string.closed_now), colorRed, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
final String atLabel =
OpenStateTextFormatter.buildAtLabel(true, isToday, dayName, localizedTimeString,
opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
final String atLabel = OpenStateTextFormatter.buildAtLabel(
true, isToday, dayName, localizedTimeString, opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
if (!TextUtils.isEmpty(atLabel))
openStateString.append("").append(atLabel);

View File

@@ -3,9 +3,7 @@ package app.organicmaps.widget.placepage;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import app.organicmaps.sdk.bookmarks.data.MapObject;
import java.util.List;
public class PlacePageViewModel extends ViewModel

View File

@@ -23,6 +23,7 @@ import app.organicmaps.R;
import app.organicmaps.sdk.bookmarks.data.Bookmark;
import app.organicmaps.sdk.bookmarks.data.BookmarkManager;
import app.organicmaps.sdk.bookmarks.data.MapObject;
import app.organicmaps.sdk.bookmarks.data.Track;
import app.organicmaps.sdk.util.StringUtils;
import app.organicmaps.util.UiUtils;
import app.organicmaps.util.Utils;
@@ -31,7 +32,8 @@ import app.organicmaps.widget.placepage.PlacePageViewModel;
import com.google.android.material.textview.MaterialTextView;
public class PlacePageBookmarkFragment extends Fragment implements View.OnClickListener, View.OnLongClickListener,
Observer<MapObject>, EditBookmarkFragment.EditBookmarkListener
Observer<MapObject>,
EditBookmarkFragment.EditBookmarkListener
{
private View mFrame;
private MaterialTextView mTvBookmarkNote;
@@ -41,6 +43,7 @@ public class PlacePageBookmarkFragment extends Fragment implements View.OnClickL
private PlacePageViewModel mViewModel;
private Bookmark currentBookmark;
private Track currentTrack;
@Nullable
@Override
@@ -88,7 +91,15 @@ public class PlacePageBookmarkFragment extends Fragment implements View.OnClickL
private void updateBookmarkDetails()
{
final String notes = currentBookmark.getBookmarkDescription();
String notes = null;
if (currentBookmark != null)
{
notes = currentBookmark.getBookmarkDescription();
}
if (currentTrack != null)
{
notes = currentTrack.getTrackDescription();
}
if (TextUtils.isEmpty(notes))
{
UiUtils.hide(mTvBookmarkNote);
@@ -120,8 +131,16 @@ public class PlacePageBookmarkFragment extends Fragment implements View.OnClickL
public void onClick(View v)
{
final FragmentActivity activity = requireActivity();
EditBookmarkFragment.editBookmark(currentBookmark.getCategoryId(), currentBookmark.getBookmarkId(), activity,
getChildFragmentManager(), PlacePageBookmarkFragment.this);
if (currentBookmark != null)
{
EditBookmarkFragment.editBookmark(currentBookmark.getCategoryId(), currentBookmark.getBookmarkId(), activity,
getChildFragmentManager(), PlacePageBookmarkFragment.this);
}
else if (currentTrack != null)
{
EditBookmarkFragment.editBookmark(currentTrack.getCategoryId(), currentTrack.getTrackId(), activity,
getChildFragmentManager(), PlacePageBookmarkFragment.this);
}
}
@Override
@@ -152,6 +171,11 @@ public class PlacePageBookmarkFragment extends Fragment implements View.OnClickL
currentBookmark = (Bookmark) mapObject;
updateBookmarkDetails();
}
if (mapObject != null && mapObject.isTrack())
{
currentTrack = (Track) mapObject;
updateBookmarkDetails();
}
}
@Override

View File

@@ -13,15 +13,13 @@ import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
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.sdk.Framework;
import app.organicmaps.sdk.bookmarks.data.ChargeSocketDescriptor;
import app.organicmaps.sdk.bookmarks.data.MapObject;
import app.organicmaps.widget.placepage.PlacePageViewModel;
import com.google.android.material.imageview.ShapeableImageView;
import com.google.android.material.textview.MaterialTextView;
import java.text.DecimalFormat;
public class PlacePageChargeSocketsFragment extends Fragment implements Observer<MapObject>
@@ -96,8 +94,8 @@ public class PlacePageChargeSocketsFragment extends Fragment implements Observer
}
@SuppressLint("DiscouragedApi")
int resTypeId =
getResources().getIdentifier("charge_socket_" + socket.visualType(), "string", requireContext().getPackageName());
int resTypeId = getResources().getIdentifier("charge_socket_" + socket.visualType(), "string",
requireContext().getPackageName());
if (resTypeId != 0)
{
type.setText(resTypeId);
@@ -108,7 +106,8 @@ public class PlacePageChargeSocketsFragment extends Fragment implements Observer
DecimalFormat df = new DecimalFormat("#.##");
power.setText(getString(R.string.kw_label, df.format(socket.power())));
}
else if (socket.ignorePower()) {
else if (socket.ignorePower())
{
power.setVisibility(INVISIBLE);
}

View File

@@ -191,8 +191,9 @@ 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.
default -> mMapObject.getMetadata(type);
};
// Add user names for social media if available
if (!TextUtils.isEmpty(title) && !title.equals(url) && !title.contains("/")) items.add(title);
// Add user names for social media if available
if (!TextUtils.isEmpty(title) && !title.equals(url) && !title.contains("/"))
items.add(title);
if (items.size() == 1)
PlacePageUtils.copyToClipboard(requireContext(), mFrame, items.get(0));

View File

@@ -41,5 +41,5 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_gravity="bottom|start"
android:background="?cardBackground"/>
android:background="?colorSurfaceContainerLow"/>
</FrameLayout>

View File

@@ -8,7 +8,6 @@
android:paddingStart="@dimen/margin_base"
android:paddingEnd="@dimen/margin_base"
android:gravity="center_vertical"
android:background="?clickableBackground"
android:orientation="horizontal">
<com.google.android.material.imageview.ShapeableImageView

View File

@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.Material3.CardView.Filled"
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
app:cardCornerRadius="28dp">
<LinearLayout
android:orientation="vertical"
android:background="?cardBackground"
android:minWidth="@dimen/bookmark_purchase_img_width"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -21,9 +27,11 @@
android:layout_marginEnd="@dimen/margin_base_plus"
android:layout_marginStart="@dimen/margin_base_plus"
tools:text="Select list"/>
<include
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler"
android:layout_marginTop="@dimen/margin_base"
android:layout_height="wrap_content"
android:layout_width="match_parent"
layout="@layout/recycler_default"/>
android:scrollbars="vertical"/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

View File

@@ -20,8 +20,8 @@
android:gravity="center"
android:layout_gravity="end|center_vertical"
android:background="?selectableItemBackgroundBorderless"
android:textSize="@dimen/text_size_toolbar"
android:padding="@dimen/margin_half"
android:textAppearance="@style/MwmTextAppearance.Toolbar.Title"
android:text="@string/editor_report_problem_send_button"/>
</com.google.android.material.appbar.MaterialToolbar>

View File

@@ -9,7 +9,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/margin_half"
android:background="?cardBackground"
android:paddingStart="@dimen/margin_half_plus"
android:paddingEnd="@dimen/margin_half_plus">

View File

@@ -40,5 +40,5 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_gravity="bottom|center"
android:background="?cardBackground"/>
android:background="?colorSurfaceContainerLow"/>
</FrameLayout>

View File

@@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"
android:background="?cardBackground"
android:orientation="vertical">
<include
android:id="@+id/pp__preview"

View File

@@ -15,15 +15,8 @@
android:theme="@style/MwmWidget.ToolbarTheme"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/margin_half"
android:text="@string/editor_add_select_location"
android:textAppearance="@style/MwmTextAppearance.Toolbar.Title"/>
app:layout_constraintTop_toTopOf="parent"
app:title="@string/editor_add_select_location">
</com.google.android.material.appbar.MaterialToolbar>
<com.google.android.material.textview.MaterialTextView

View File

@@ -315,4 +315,22 @@
<string name="error_enter_correct_web">সঠিক ওয়েব এড্রেস দিন</string>
<string name="error_enter_correct_email">সঠিক ইমেইল দিন</string>
<string name="placepage_add_place_button">OpenStreetMap এ স্থান যোগ করুন</string>
<string name="editor_zip_code">ডাক কোড</string>
<string name="error_enter_correct_zip_code">সঠিক ডাক কোড প্রদান করুন</string>
<string name="editor_reset_edits_button">পরিবর্তনগুলো বাতিল করুন</string>
<plurals name="bookmarks_places">
<item quantity="one">%dটি বুকমার্ক</item>
<item quantity="other">%dটি বুকমার্ক</item>
</plurals>
<plurals name="bookmarks_detect_message">
<item quantity="one">%dটি ফাইল পাওয়া গেছে। রূপান্তরের পর আপনি এটি দেখতে পারবেন।</item>
<item quantity="other">%dটি ফাইল পাওয়া গেছে। রূপান্তরের পর আপনি সেগুলো দেখতে পারবেন।</item>
</plurals>
<plurals name="tracks">
<item quantity="one">%dটি ট্র্যাক</item>
<item quantity="other">%dটি ট্র্যাক</item>
</plurals>
<string name="app_tip_06">আপনি আমাদের অ্যাপটি আপনার ভাষায় অনুবাদ করতে সাহায্য করতে পারেন।</string>
<string name="offline_explanation_title">অফলাইন মানচিত্র</string>
<string name="offline_explanation_text">এলাকাটি দেখতে এবং নেভিগেট করতে একটি মানচিত্র ডাউনলোড করতে হবে।\nআপনি যেসব এলাকায় ভ্রমণ করতে চান সেগুলোর মানচিত্র ডাউনলোড করুন।</string>
</resources>

View File

@@ -924,5 +924,5 @@
<string name="download_resources_custom_url_title">Servidor de Mapes Personalitzat</string>
<string name="download_resources_custom_url_message">Sobreescriu el servidor de descàrrega de mapes per defecte. Deixa en blanc per a emprar el servidor per defecte de CoMaps.</string>
<string name="download_resources_custom_url_summary_none">No establert</string>
<string name="download_resources_custom_url_error_scheme">Per favor introdueix una URL completa que comence amb https:// i acabe amb /</string>
<string name="download_resources_custom_url_error_scheme">Per favor introdueix una URL que comence amb http:// o https://</string>
</resources>

View File

@@ -915,7 +915,7 @@
<string name="navigation_start_tts_disabled_message">Hlasové pokyny vypnuty: služba TTS není dostupná</string>
<string name="download_resources_custom_url_title">Vlastní mapový server</string>
<string name="download_resources_custom_url_message">Přepsat výchozí server používaný ke stahování map. Nechte pole prázdné, pokud chcete použít výchozí server CoMaps.</string>
<string name="download_resources_custom_url_error_scheme">Zadejte prosím celou adresu URL začínající na https:// a končící s /</string>
<string name="download_resources_custom_url_error_scheme">Zadejte prosím celou adresu URL začínající na http:// nebo https://</string>
<string name="advanced">Pokročilé</string>
<string name="download_resources_custom_url_summary_none">Není nastaveno</string>
</resources>

View File

@@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_site_url">https://comaps.app/</string>
<string name="back">Back</string>
<string name="cancel">Cancel</string>
<string name="delete">Delete</string>
<string name="download_maps">Download Maps</string>
<string name="download_has_failed">Download failed, tap to try again</string>
<string name="downloading">Downloading…</string>
<string name="kilometres">Kilometres</string>
<string name="miles">Miles</string>
<string name="later">Later</string>
<string name="search">Search</string>
<string name="search_map">Search Map</string>
<string name="location_is_disabled_long_text">You currently have all Location Services for this device or application disabled. Please enable them in Settings.</string>
<string name="limited_accuracy">Limited Accuracy</string>
<string name="choose_color">Choose Colour</string>
<string name="bookmark_color">Bookmark colour</string>
<string name="precise_location_is_disabled_long_text">To ensure accurate navigation enable Precise Location in settings</string>
<string name="zoom_to_country">Show on the map</string>
<string name="country_status_download_failed">Download failed</string>
<string name="try_again">Try Again</string>
<string name="about_menu_title">About CoMaps</string>
<string name="about_headline">Open project powered by the community</string>
<string name="about_proposition_1">• Easy to use and polished</string>
<string name="about_proposition_2">• Privacy focused and ad-free</string>
<string name="about_proposition_3">• Offline, fast and compact</string>
<string name="about_developed_by_enthusiasts">Fully open source, not for profit, transparent decision-making and finances.</string>
<string name="location_settings">Location Settings</string>
<string name="close">Close</string>
<string name="unsupported_phone">The app requires hardware accelerated OpenGL. Unfortunately, your device is not supported.</string>
<string name="download">Download</string>
<string name="disconnect_usb_cable">Please disconnect USB cable or insert a memory card to use CoMaps</string>
<string name="not_enough_free_space_on_sdcard">Please free up some space on the SD card or USB storage first in order to use the app</string>
<string name="download_resources">Before you start using the app, please download the world overview map to your device. \nIt will use %s of storage.</string>
<string name="download_resources_continue">Go to Map</string>
<string name="downloading_country_can_proceed">Downloading %1$s (%2$s). You can now \nproceed to the map.</string>
<string name="download_country_ask">Download %1$s? (%2$s)</string>
<string name="update_country_ask">Update %1$s? (%2$s)</string>
<string name="download_country_failed">%s download has failed</string>
<string name="add_new_set">Add a new list</string>
<string name="bookmarks">Bookmarks</string>
<string name="bookmarks_and_tracks">Bookmarks and Tracks</string>
<string name="name">Name</string>
<string name="address">Address</string>
<string name="list">List</string>
<string name="settings">Settings</string>
<string name="maps_storage">Save maps to</string>
<string name="maps_storage_summary">Select the folder to download maps to</string>
<string name="maps_storage_downloaded">Downloaded maps</string>
<string name="maps_storage_free_size">%1$s free of %2$s</string>
<string name="move_maps">Move maps?</string>
<string name="move_maps_error">Error moving map files</string>
<string name="wait_several_minutes">This might take several minutes. \nPlease wait…</string>
<string name="measurement_units">Unit of measurement</string>
<string name="description">Notes</string>
<string name="share_bookmarks_email_subject">CoMaps bookmarks were shared with you</string>
<string name="share_bookmarks_email_body">Hello! \n \nAttached are my bookmarks; please open them in CoMaps. If you don\'t have it installed you can download it here: https://www.comaps.app/download/ \n \nEnjoy travelling with CoMaps!</string>
<string name="load_kmz_title">Loading Bookmarks</string>
<string name="load_kmz_successful">Bookmarks loaded successfully! You can find them on the map or in the Bookmarks Manager screen.</string>
<string name="load_kmz_failed">Failed to load bookmarks. The file may be corrupted.</string>
<string name="failed_to_open_file">Failed to open file %1$s \n \n%2$s</string>
<string name="edit">Edit</string>
<string name="unknown_current_position">Your location hasn\'t been determined yet</string>
<string name="cant_change_this_setting">Sorry, Map Storage settings are currently disabled</string>
<string name="downloading_is_active">Map download is in progress now</string>
<string name="my_position_share_sms">Check out my current location in CoMaps! %1$s or %2$s Don\'t have offline maps? Download here: https://www.comaps.app/download/</string>
<string name="share">Share</string>
<string name="email">Email</string>
<string name="copied_to_clipboard">Copied to clipboard: %s</string>
<string name="done">Done</string>
<string name="tracks_title">Tracks</string>
<string name="length">Length</string>
<string name="share_my_location">Share My Location</string>
<string name="prefs_group_general">General settings</string>
<string name="prefs_group_information">Information</string>
<string name="prefs_group_route">Navigation</string>
<string name="pref_zoom_title">Zoom buttons</string>
<string name="pref_zoom_summary">Display on the map</string>
<string name="pref_map_style_title">Night Mode</string>
<string name="off">Off</string>
<string name="on">On</string>
<string name="auto">Auto</string>
<string name="pref_map_3d_title">Perspective view</string>
<string name="pref_map_3d_buildings_disabled_summary">3D buildings are disabled in power saving mode</string>
<string name="pref_tts_enable_title">Voice Instructions</string>
<string name="pref_tts_street_names_title">Announce Street Names</string>
<string name="pref_tts_street_names_description">When enabled, the name of the street or exit to turn onto will be spoken aloud.</string>
<string name="pref_tts_language_title">Voice Language</string>
<string name="pref_tts_test_voice_title">Test Voice Directions</string>
<string name="pref_tts_playing_test_voice">Check the volume or system Text-To-Speech settings if you don\'t hear the voice now</string>
<string name="pref_tts_unavailable">Not Available</string>
<string name="pref_map_auto_zoom">Auto zoom</string>
<string name="placepage_distance">Distance</string>
<string name="search_show_on_map">View on map</string>
<string name="menu">Menu</string>
<string name="website">Website</string>
<string name="news">News</string>
<string name="panoramax">Panoramax Picture</string>
<string name="feedback">Feedback</string>
<string name="rate_the_app">Rate the app</string>
<string name="help">Help</string>
<string name="faq">Frequently Asked Questions</string>
<string name="donate">Donate</string>
<string name="how_to_support_us">Volunteer and improve CoMaps</string>
<string name="copyright">Copyright</string>
<string name="report_a_bug">Report a bug</string>
<string name="compass_calibration_recommended">Improve arrow direction by moving the phone in a figure-eight motion to calibrate the compass.</string>
<string name="compass_calibration_required">Move the phone in a figure-eight motion to calibrate the compass and fix the arrow direction on the map.</string>
<string name="long_tap_toast">Long-tap on the map again to see the interface</string>
<string name="downloader_update_all_button">Update All</string>
<string name="downloader_cancel_all">Cancel All</string>
<string name="downloader_downloaded_subtitle">Downloaded</string>
<string name="downloader_queued">Queued</string>
<string name="downloader_near_me_subtitle">Near me</string>
<string name="downloader_status_maps">Maps</string>
<string name="downloader_download_all_button">Download All</string>
<string name="downloader_downloading">Downloading:</string>
<string name="downloader_delete_map_while_routing_dialog">To delete map, please stop navigation</string>
<string name="downloader_download_map">Download map</string>
<string name="downloader_retry">Retry</string>
<string name="downloader_delete_map">Delete Map</string>
<string name="downloader_update_map">Update Map</string>
<string name="google_play_services">Google Fused Location Service</string>
<string name="pref_use_google_play">A proprietary service that combines GPS, WiFi, cellular networks etc. to determine your location more accurately. It may connect to Google servers.</string>
<string name="routing_requires_all_map">In order to create a route, we need to download and update all the maps from your location to your destination.</string>
<string name="routing_not_enough_space">Not enough space</string>
<string name="enable_location_services">Please enable Location Services</string>
<string name="save">Save</string>
<string name="create">Create</string>
<string name="red">Red</string>
<string name="yellow">Yellow</string>
<string name="blue">Blue</string>
<string name="green">Green</string>
<string name="purple">Purple</string>
<string name="orange">Orange</string>
<string name="brown">Brown</string>
<string name="pink">Pink</string>
<string name="deep_purple">Deep Purple</string>
<string name="light_blue">Light Blue</string>
<string name="cyan">Cyan</string>
<string name="teal">Teal</string>
<string name="lime">Lime</string>
<string name="deep_orange">Deep Orange</string>
<string name="gray">Grey</string>
<string name="blue_gray">Blue Grey</string>
<string name="dialog_routing_disclaimer_title">When following the route, please keep in mind:</string>
<string name="dialog_routing_disclaimer_priority">— Road conditions, traffic laws, and road signs always take priority over navigation hints;</string>
<string name="dialog_routing_disclaimer_precision">— The map might be inaccurate, and the suggested route might not always be the most optimal way to reach the destination;</string>
<string name="dialog_routing_disclaimer_recommendations">— Suggested routes should only be understood as recommendations;</string>
<string name="dialog_routing_disclaimer_borders">— Exercise caution with routes in border zones: the routes created by our app may sometimes cross country borders in unauthorised places.</string>
<string name="dialog_routing_disclaimer_beware">Please stay alert and safe on the roads!</string>
<string name="dialog_routing_check_gps">Check GPS signal</string>
<string name="dialog_routing_error_location_not_found">Unable to create route. Current GPS coordinates could not be identified.</string>
<string name="dialog_routing_location_turn_wifi">Please check your GPS signal. Enabling WiFi will improve your location accuracy.</string>
<string name="dialog_routing_location_turn_on">Enable location services</string>
<string name="dialog_routing_location_unknown_turn_on">Unable to locate current GPS coordinates. Enable location services to calculate route.</string>
<string name="dialog_routing_unable_locate_route">Unable to locate route</string>
<string name="dialog_routing_cant_build_route">Unable to create route</string>
<string name="dialog_routing_change_start_or_end">Please change your starting point or destination.</string>
<string name="dialog_routing_change_start">Change starting point</string>
<string name="dialog_routing_start_not_determined">Route was not created. Unable to locate starting point.</string>
</resources>

View File

@@ -19,8 +19,8 @@
<string name="editor_zip_code">Postcode</string>
<string name="error_enter_correct_zip_code">Enter a valid postcode</string>
<plurals name="bookmarks_places">
<item quantity="one">%d bookmark</item>
<item quantity="other">%d bookmarks</item>
<item quantity="one">%d place</item>
<item quantity="other">%d places</item>
</plurals>
<plurals name="bookmarks_detect_message">
<item quantity="one">%d file was found. You can see it after conversion.</item>

View File

@@ -915,5 +915,5 @@
<string name="advanced">Täiendavad seadistused</string>
<string name="download_resources_custom_url_title">Sinu oma kaardiserver</string>
<string name="download_resources_custom_url_message">Kui tahad kasutada oma kaardiserverit, siis lisa ta siia. CoMapsi vaikimisi serveri kasutamiseks jäta tühjaks.</string>
<string name="download_resources_custom_url_error_scheme">Palun sisesta täismahuline võrguaadress, mille alguses on https:// ja lõpus /</string>
<string name="download_resources_custom_url_error_scheme">Palun sisesta täismahuline võrguaadress, mille alguses on http:// või https://</string>
</resources>

View File

@@ -31,7 +31,7 @@
<string name="editor_time_from">De</string>
<string name="daily">Diario</string>
<string name="details">Detalles</string>
<string name="editor_reset_edits_button">Restablecer</string>
<string name="editor_reset_edits_button">Desbotar cambios</string>
<string name="category_parking">Aparcamento</string>
<string name="instagram_url">https://www.instagram.com/comaps.app/</string>
<string name="tts_info_link">https://www.comaps.app/support/tts-configuration-guide-for-android/</string>
@@ -57,8 +57,8 @@
<string name="editor_time_title">Horario de apertura</string>
<string name="editor_zip_code">Código postal</string>
<string name="editor_share_to_all_dialog_title">Quere envialo a todos os usuarios?</string>
<string name="editor_share_to_all_dialog_message_1">Comprobe que non escribeu ningún dato privado ou persoal</string>
<string name="editor_share_to_all_dialog_message_2">Os editores de OpenStreetMap comprobarán os cambios e poñeranse en contacto con vostede se teñen algunha pregunta</string>
<string name="editor_share_to_all_dialog_message_1">Comproba que non escribiches ningún dato privado ou persoal</string>
<string name="editor_share_to_all_dialog_message_2">Desde OpenStreetMap comprobarán os cambios e poñeranse en contacto contigo se teñen algunha pregunta.</string>
<string name="navigation_stop_button">Deter</string>
<string name="mobile_data_option_ask">Preguntar sempre</string>
<string name="traffic_update_maps_text">Para mostrar os datos de tráfico, deben actualizarse os mapas</string>
@@ -489,7 +489,7 @@
<string name="help">Axuda</string>
<string name="downloader_downloaded_subtitle">Descargado</string>
<string name="kilometers_per_hour">km/h</string>
<string name="create">crear</string>
<string name="create">Crear</string>
<string name="brown">Marrón</string>
<string name="no_available">Non</string>
<string name="categories">Categorías</string>
@@ -639,4 +639,19 @@
<string name="avoid_paved">Evitar estradas asfaltadas</string>
<string name="editor_business_vacant_button">Dispoñible para empresas</string>
<string name="editor_mark_business_vacant_title">Marcar como dispoñible para negocios</string>
<string name="place_page_map_too_old_title">Datos do mapa desactualizados</string>
<string name="place_page_map_too_old_description">Os datos do mapa son moi antigos, por favor actualiza o mapa.</string>
<string name="place_page_app_too_old_description">Os datos do mapa actual son moi antigos, actualiza a app CoMaps.</string>
<string name="place_page_update_too_old_map">Actualizar rexión do mapa</string>
<string name="place_page_too_old_to_edit">A edición de OpenStreetMap está desactivada porque o mapa é demasiado antigo.</string>
<string name="prefs_speed_cameras_information">Os avisos de radares están desactivados nos paises onde a lei local prohibe estas alertas.</string>
<string name="power_management">Xestión da enerxía</string>
<string name="navigation_start_tts_message">"Comezando a Navegación, idioma das instruccións por voz: "</string>
<string name="navigation_start_tts_disabled_message">Instruccións por voz desactivadas: non hai un motor TTS dispoñible</string>
<string name="charge_socket_schuko">Doméstico na UE</string>
<string name="advanced">Avanzado</string>
<string name="download_resources_custom_url_title">Servidor persoal do mapa</string>
<string name="download_resources_custom_url_message">Sobrescribe o servidor predefinido para descargar mapas. Deixar baleiro para usar o servidor por defecto de CoMaps.</string>
<string name="download_resources_custom_url_summary_none">Sen establecer</string>
<string name="download_resources_custom_url_error_scheme">Escribe un URL que comece por http:// ou https://</string>
</resources>

View File

@@ -71,7 +71,7 @@
<string name="pref_map_3d_buildings_title">Drehevyansow lymnys tri</string>
<string name="pref_tts_enable_title">Danvonadow dre lev</string>
<string name="pref_tts_street_names_title">Deklarya Henwyn Stretow</string>
<string name="pref_tts_language_title">Tavas Lev</string>
<string name="pref_tts_language_title">Yeth Lev</string>
<string name="pref_tts_test_voice_title">Prov Tuyow Dre Lev</string>
<string name="pref_tts_unavailable">Nakavadow</string>
<string name="search_show_on_map">Gweles war mappa</string>
@@ -158,7 +158,7 @@
<string name="login_osm">Omgelmi dhe OpenStreetMap</string>
<string name="logout">Omdenna</string>
<string name="edit_place">Golegi Le</string>
<string name="add_language">Addya unn tavas</string>
<string name="add_language">Addya unn yeth</string>
<string name="street">Stret</string>
<string name="house_number">Niver drehevyans</string>
<string name="details">Manylyon</string>
@@ -166,7 +166,7 @@
<string name="building">Drehevyans</string>
<string name="add_street">Addya unn stret</string>
<string name="empty_street_name_error">Ynworra unn hanow street mar pleg</string>
<string name="choose_language">Dewis unn tavas</string>
<string name="choose_language">Dewis unn yeth</string>
<string name="choose_street">Dewis unn stret</string>
<string name="editor_add_phone">Addya Niver Fon</string>
<string name="level">Leur</string>
@@ -175,7 +175,7 @@
<string name="downloader_search_field_hint">Kavos mappa</string>
<string name="editor_login_error_dialog">Error dres omgelmi</string>
<string name="editor_edit_place_name_hint">Hanow a an le</string>
<string name="editor_default_language_hint">Dell yw skrifys yn an tavas teythiek</string>
<string name="editor_default_language_hint">Dell yw skrifys yn an yeth teythiek</string>
<string name="editor_edit_place_category_title">Klass</string>
<string name="detailed_problem_description">Deskrifans manylys a an kudyn</string>
<string name="editor_report_problem_other_title">Kudyn dyffrans</string>
@@ -195,10 +195,10 @@
<string name="hour">o</string>
<string name="minute">mynysen</string>
<string name="placepage_more_button">Moy</string>
<string name="placepage_edit_bookmark_button">Pennskrifa Lyververk</string>
<string name="placepage_edit_bookmark_button">Golegi Lyververk</string>
<string name="placepage_personal_notes_hint">Notennow privedh (tekst bo html)</string>
<string name="editor_reset_edits_message">Dilea oll chanjyow dhywarlinen?</string>
<string name="editor_reset_edits_button">Dilea</string>
<string name="editor_reset_edits_button">Dilea chanjyow</string>
<string name="editor_remove_place_message">Dilea le keworrys?</string>
<string name="editor_remove_place_button">Dilea</string>
<string name="editor_place_doesnt_exist">Le na eksistya</string>
@@ -311,7 +311,7 @@
<string name="download_map_title">Iskarga an mappa bys simpel</string>
<string name="disk_error_title">Error plasen</string>
<string name="connection_failure">Defowt kevren</string>
<string name="change_map_locale">Tavas mappow</string>
<string name="change_map_locale">Yeth mappow</string>
<string name="splash_subtitle">Data mappow a OpenStreetMap</string>
<string name="telegram_url">https://t.me/CoMapsApp/</string>
<string name="instagram_url">https://www.instagram.com/comaps.app/</string>
@@ -321,7 +321,7 @@
<string name="app_tip_00">Meur ras rag usya a\'gan mappys drehevys gans an kemeneth!</string>
<string name="app_tip_01">Gans agas argevrohow ha skoodhyans, ni a yll gul an mappys an gwella yn an Nor!</string>
<string name="app_tip_02">Yw da genes a\'gan app? Argevri mar pleg dhe skoodhya an displegyans! Yw na da genes a\'n hwath? Mar pleg, kedhlewgh dhyn prag ha ni a ewnhe a\'n!</string>
<string name="app_tip_06">Hwi a yll gweres treylya a\'gan app yn agas tavas.</string>
<string name="app_tip_06">Ty a yll gweres treylya a\'gan app yn dhayeth.</string>
<string name="aa_connected_title">Dha vos lemmyn rosweythys dhe Android Auto</string>
<string name="aa_grant_permissions">Grontya grontys</string>
<string name="button_layer_outdoor">Yn-mes</string>
@@ -375,4 +375,299 @@
<string name="edit">Golegi</string>
<string name="downloader_no_space_title">Nyns eus lowr dalghuster</string>
<string name="translated_om_site_url">https://comaps.app/</string>
<string name="download_has_failed">Y fyllis an iskarg, tava dhe dasassaya</string>
<string name="downloading">Iskargaow…</string>
<string name="location_is_disabled_long_text">Hwi ungallosegi y\'n eur ma oll Gonisyow GPS rag an devis po app ma. Mar pleg, gallosegi y\'s yn Settyansow.</string>
<string name="precise_location_is_disabled_long_text">Rag surhe navygacyon ewn, gallosegi GPS Kewar yn Settyansow</string>
<string name="country_status_download_failed">Yn fyllis iskarg</string>
<string name="about_headline">Ragdres poblek selys war an kementh</string>
<string name="about_proposition_1">• Es y us ha polsys</string>
<string name="about_proposition_2">• Fogellys war privetter ha heb argemynnow</string>
<string name="about_developed_by_enthusiasts">Kod poblek yn leun, heb budh, erviransow treusweladow ha arghansereth.</string>
<string name="unsupported_phone">An app rekwirya OpenGL gans uskisheans kalesweyth. Soweth, gas devis na skoodhys.</string>
<string name="disconnect_usb_cable">Mar pleg, unjunya an korsen USB po ynworra kyf kov dhe devnydhya CoMaps</string>
<string name="not_enough_free_space_on_sdcard">Mar pleg, gul neb dalghuster yn an karten SD/kyf kov kyns dhe devnydhya an app</string>
<string name="download_resources">Dherag hwi dalleth devnydhya an app, mar pleg iskarga an mappa ollvysel sempel dhe gas devis.\nY devnydhya %s a dalghuster.</string>
<string name="downloading_country_can_proceed">Iskargaow %1$s (%2$s). Hwi gallos\nprocedya dhe an mappa.</string>
<string name="download_country_failed">%s iskarg yw fyllis</string>
<string name="add_new_set">Addya unn Rol Nowydh</string>
<string name="bookmark_set_name">Hanow Rol Lyververkys</string>
<string name="maps_storage">Sawya mappys dhe</string>
<string name="maps_storage_summary">Dewis an restrenva dhe iskarga mappys dhe</string>
<string name="maps_storage_downloaded">Mappys iskargys</string>
<string name="maps_storage_free_size">%1$s kavadow yn-mes a %2$s</string>
<string name="move_maps_error">Error dres gwaya restrennow mappa</string>
<string name="wait_several_minutes">An argerdh ma re durya meur a mynysen.\nGortewgh mar pleg…</string>
<string name="category_eat">Leow rag dybri</string>
<string name="category_secondhand">Gwarennow Wortaswerth</string>
<string name="category_nightlife">Delit dres Nos</string>
<string name="share_bookmarks_email_subject">Lyververkys CoMaps yw kevrennys gans ty</string>
<string name="share_bookmarks_email_body">Dydh da!\n\nOw lyververkys yw stag; mar pleg, ygeri y\'s yn CoMaps. A hwi kavos y na leys, hwi gallos iskarga y omma: https://www.comaps.app/download/ \n\nEnjoya travalya gans CoMaps!</string>
<string name="load_kmz_successful">Lyververkys kargys yn sewen! Hwi gallos kavos y\'s war an mappa po yn an skrin Dyghtyer Lyververkys.</string>
<string name="load_kmz_failed">Y fyllis an karga lyververkys. An restren re bos anewn.</string>
<string name="unknown_file_type">An eghen restren yw anaswonys gans an app:\n%1$s</string>
<string name="failed_to_open_file">Y fyllis ygeri restren %1$s \n\n%2$s</string>
<string name="unknown_current_position">Dhe tyller yw determys na hwath</string>
<string name="cant_change_this_setting">Drog yw genev, settyansyow Gwithyans Mappa yw marow y\'n eur ma</string>
<string name="downloading_is_active">Iskarg mappa hwarvos lemmyn</string>
<string name="my_position_share_sms">Mires orth ow tyller y\'n eur ma yn CoMaps! %1$s po %2$s Na kavos mappys dhywarlinen? Iskarga omma: https://www.comaps.app/download/</string>
<string name="my_position_share_email">Hou,\n\nOv omma lemmyn: %1$s. Klyckya an gorgevren ma %2$s po an unn ma %3$s dhe gweles an tyller war an mappa.\n\nMeur ras.</string>
<string name="copied_to_clipboard">Kopys dhe astel glypp: %s</string>
<string name="pref_zoom_title">Botonyow brashe</string>
<string name="off">Marow</string>
<string name="on">Byw</string>
<string name="pref_map_3d_buildings_disabled_summary">Drehevyansow 3D yw ungallosegi yn fordh erbysyon batri</string>
<string name="pref_tts_street_names_description">Pan gallosegys, an hanow a an stret po fordh \'mes rag mos yn-mes yw lenna.</string>
<string name="pref_tts_playing_test_voice">Checkya an ughelder po settyansow system Tekst-dhe-Areth a hwi na klewes an lev lemmyn</string>
<string name="pref_map_auto_zoom">Brashe yn awtomatek</string>
<string name="placepage_distance">Pellder</string>
<string name="how_to_support_us">Bodhegi ha gwellhe CoMaps</string>
<string name="compass_calibration_recommended">Gwellhe tu seth gans gwaya an kellgowser yn unn gwayans niver eth dhe selya an mornaswydh.</string>
<string name="compass_calibration_required">Gwaya an kellgowser yn unn gwayans niver eth dhe selya an mornaswydh ha ewna an tu seth war an mappa.</string>
<string name="long_tap_toast">Tava hir war an mappa arta dhe gweles an ynterfas</string>
<string name="downloader_downloaded_subtitle">Iskargys</string>
<string name="downloader_queued">Lostys</string>
<string name="downloader_downloading">Iskargaow:</string>
<string name="downloader_delete_map_while_routing_dialog">Dhe dilea mappa, hedhi navygacyon, mar pleg</string>
<string name="routing_failed_cross_mwm_building">Kerdhow gallos gul yw kontaynys yn leun a-berth yn unn mappa a unn pow hepken.</string>
<string name="pref_use_google_play">Unn gonis perghenogel may kesunya GPS, Wi-fi, rosweythyow kellgowser h.e. rag determya dhe tyller yn kewar. Y re junya dhe servellow Google.</string>
<string name="routing_download_maps_along">Iskarga oll mappys a-hys gas kerdh</string>
<string name="routing_requires_all_map">Rag gul unn kerdh, ni res iskarga ha nowedhi oll mappys a gas tyller dhe gas penn an fordh.</string>
<string name="save">Sawya</string>
<string name="cyan">Blou</string>
<string name="dialog_routing_disclaimer_title">Pan holya an hyns, kofhe mar pleg:</string>
<string name="dialog_routing_disclaimer_priority">— Studh fordh, laghys traffik, ha arwodhyow kavos ragwir pub eur a-ugh dhe hyntys navygacyon;</string>
<string name="dialog_routing_disclaimer_precision">— An mappa re bos ankewar, ha an kussul hyns re na bos an method gwella dhe drehedhes an penn an fordh;</string>
<string name="dialog_routing_disclaimer_recommendations">— Kussus kyns yw komendyansow hepken;</string>
<string name="dialog_routing_disclaimer_borders">— Gul rach gans hyns ogas emlow: an kerdhow gulys gans agan app re tremena treweythyow emlow keswlasek yn tylleryow anreythhes.</string>
<string name="dialog_routing_disclaimer_beware">Mar pleg, gortos hewol ha saw war an fordhow!</string>
<string name="dialog_routing_error_location_not_found">Anabel dhe gul kerdh. Kesordenogyon GPS na gallos determys.</string>
<string name="dialog_routing_location_turn_wifi">Mar pleg, checkya gas sinell GPS. Gallosegi Wi-Fi re gwellhe gas kewerder GPS.</string>
<string name="dialog_routing_location_unknown_turn_on">Anabel dhe desedha kesordenogyon GPS. Gallosegi gonisyow GPS dhe kalkya kerdh.</string>
<string name="dialog_routing_unable_locate_route">Anabel dhe desedha kerdh</string>
<string name="dialog_routing_cant_build_route">Anabel dhe gul kerdh</string>
<string name="dialog_routing_change_start_or_end">Mar pleg, chanjya gas tyller dalleth po penn an fordh.</string>
<string name="dialog_routing_change_start">Chanjya tyller dalleth</string>
<string name="dialog_routing_start_not_determined">Kerdh na gulys. Anabel dhe desedha tyller dalleth.</string>
<string name="dialog_routing_select_closer_start">Mar pleg, dewis unn tyller dalleth yn-nes dhe unn fordh.</string>
<string name="dialog_routing_end_not_determined">Kerdh na gulys. Anabel dhe desedha an penn an fordh.</string>
<string name="dialog_routing_select_closer_end">Mar pleg, dewis unn penn an fordh yn-nes dhe unn fordh</string>
<string name="dialog_routing_change_intermediate">Anabel dhe desedha an tyller kres</string>
<string name="dialog_routing_intermediate_not_determined">Mar pleg, chanjya gas tyller kres</string>
<string name="dialog_routing_application_error">Anabel dhe gul kerdh drefen unn error app</string>
<string name="dialog_routing_download_and_build_cross_route">A vynnsowgh iskarga an mappa ha gul unn kerdh gwell a-dreus moy ages unn mappa?</string>
<string name="dialog_routing_download_cross_route">Iskarga mappys keworransel dhe gul unn kerdh gwell a-dreus moy ages unn mappa.</string>
<string name="search_without_internet_advertisement">Rag dalleth hwilas ha gul kerdhow, iskarga an mappa, mar pleg. Wosa henna, hwi na fella res unn junyans kesrosweyth.</string>
<string name="search_not_found">Soweth, sewyansow kavos vyth</string>
<string name="search_not_found_query">Iskarga an pow py tyller hwi hwilas po assaya addya unn hanow tre/gwig yn ogas.</string>
<string name="search_history_text">Gweles gas hwithransow a-dhiwedhes</string>
<string name="p2p_from_here">Mos dhyworth</string>
<string name="p2p_to_here">Mos war-tu</string>
<string name="p2p_only_from_current">Navygacyon yw kavadow hepken dhyworth gas tyller a\'n jydh</string>
<string name="p2p_reroute_from_current">A vynn\'ta devisya unn kerdh dhyworth gas tyller a\'n jydh?</string>
<string name="editor_time_from">Dhyworth</string>
<string name="editor_time_to">Bys</string>
<string name="editor_example_values">Niverow Ensampel</string>
<string name="editor_report_problem_desription_1">Mar pleg, deskrifa an kudyn yn manylyon rag may an kemeneth OpenStreetMap gallos ewnhe y.</string>
<string name="editor_report_problem_desription_2">Po gul y dha honan yn https://www.openstreetmap.org/</string>
<string name="editor_report_problem_no_place_title">An le ma na eksistya</string>
<string name="editor_report_problem_under_construction_title">Deges rag mentons</string>
<string name="editor_report_problem_duplicate_place_title">Le dewblek</string>
<string name="autodownload">Iskarga mappys yn awtomatek</string>
<string name="opens_in">Ygeri yn %s</string>
<string name="closes_in">Degea yn %s</string>
<string name="opens_at">Ygeri dhe %s</string>
<string name="closes_at">Degea dhe %s</string>
<string name="opens_day_at">Ygeri war %1$s dhe %2$s</string>
<string name="closes_day_at">Degea war %1$s dhe %2$s</string>
<plurals name="minutes_short">
<item quantity="zero">%d mynysennow</item>
<item quantity="one">%d mynysen</item>
<item quantity="two">%d mynysennow</item>
<item quantity="few">%d mynysennow</item>
<item quantity="many">%d mynysennow</item>
<item quantity="other">%d mynysennow</item>
</plurals>
<string name="hours_confirmed_time_ago">Komfirmys %s</string>
<string name="existence_confirmed_time_ago">Bosva konfirmys %s</string>
<string name="not_signed_in">Na omgelmys</string>
<string name="cuisine">Eghen Boos</string>
<string name="select_cuisine">Dewis eghen boos</string>
<string name="downloader_delete_map_dialog">Oll gas chanjyow mappa a vydh dileys a-barth an mappa</string>
<string name="downloader_mwm_migration_dialog">Rag gul unn kerdh, hwi res nowedhi oll mappys ha dhanna devisya an kerdh arta.</string>
<string name="common_check_internet_connection_dialog">Mar pleg, surhe gas devis yw rosweythys dhe an kesrosweyth</string>
<string name="downloader_no_space_message">Mar pleg, dilea neb data heb res</string>
<string name="editor_profile_changes">Chanjyow Gwirhys</string>
<string name="editor_focus_map_on_location">Draylya an mappa rag settya an krows yn an tyller a an le po negys.</string>
<string name="editor_edit_place_title">Golegi</string>
<string name="editor_add_place_title">Addya</string>
<string name="message_invalid_feature_position">Tra vyth gallos bos desedhys omma</string>
<string name="osm_presentation">Data OpenStreetMap gulys gans an kemeneth dhyworth %s. Dyski moy a-dro fatel golegi ha nowedhi an mappa yn OpenStreetMap.org</string>
<string name="login_osm_presentation">OpenStreetMap.org (OSM) yw unn ragdres kemeneth dhe byldya unn mappa rydh ha apert. Y yw an devedhyans chif a data mappa yn CoMaps ha oberi haval dhe Wikipedya. Hwi gallos addya po golegi leow ha i bos kavadow dhe milvilyow usyoryon dres oll an bys.\nOmjunya an kemeneth ha gweres gul unn mappa gwell rag keniver!</string>
<string name="login_to_make_edits_visible">Gul unn akont OpenStreetMap po omgelmi dhe dyllo gas chanjyow dhe an bys</string>
<string name="downloader_of">%1$d a %2$d</string>
<string name="download_over_mobile_message">Y re bos kostek meur lowr war nebes towlow po a tramor</string>
<string name="error_enter_correct_storey_number">An niver a leuryow res na eksedya %d</string>
<string name="editor_note_hint">Deskrifa errors war an mappa po pyth may na golegys yn CoMaps</string>
<string name="editor_about_osm">Gas chanjyow yw ughkargys dhe an sel dherivadow <a href="https://wiki.openstreetmap.org/wiki/About_OpenStreetMap">OpenStreetMap</a> poblek. Mar pleg, addya kudhlow privedh po gwirbryntys vyth.</string>
<string name="editor_category_unsuitable_title">Na gallos kavos unn klass fytti?</string>
<string name="editor_category_unsuitable_text">CoMaps alowa hwi addya klassys sempel hepken, rag henna trevow, fordhow, lynnyn, drehevyansow, h.e. vyth. Mar pleg, addya a\'n par na klassys dhe <a href="https://www.openstreetmap.org">OpenStreetMap</a>. Checkya agan <a href="https://www.openstreetmap.org">kowethlyver</a> rag danvonadow kamm ha kamm manylys.</string>
<string name="downloader_no_downloaded_maps_title">Hwi na iskargys neb mappys</string>
<string name="downloader_no_downloaded_maps_message">Iskarga mappys dhe hwilas ha viajya dhywarlinen</string>
<string name="current_location_unknown_error_title">Tyller a\'n jydh yw ankoth</string>
<string name="day">d</string>
<string name="editor_place_doesnt_exist_description">Deskrifa an studh lemmyn dhe danvon unn noten error dhe an kemeneth OpenStreetMap</string>
<string name="editor_mark_business_vacant_description">Devnydhya ma a an negys re movys ha an spas yw gwag ha parys rag unn gobrener nowydh.</string>
<string name="place_page_map_too_old_title">Data mappa anterrus</string>
<string name="place_page_map_too_old_description">Gas data mappa a\'n jydh yw pur koth, nowedhi an mappa mar pleg.</string>
<string name="place_page_app_too_old_description">Gas data mappa a\'n jydh yw pur koth, nowedhi an app CoMaps.</string>
<string name="place_page_update_too_old_map">Nowedhi pow mappa</string>
<string name="place_page_too_old_to_edit">Golegi OpenStreetMap yw ungallosegi dre reson an data mappa yw re koth.</string>
<string name="editor_share_to_all_dialog_message_1">Surhe hwi na ynworra neb kudhlow privedh po personel.</string>
<string name="editor_share_to_all_dialog_message_2">Pennskriforyon OpenStreetMap a wra checkya an chanjyow ha kestava hwi a i kavos neb kwestyons.</string>
<string name="mobile_data_dialog">Devnydhya junyans kellgowser dhe diskwedhes kudhlow manylys?</string>
<string name="mobile_data_option_always">Devnydhya Pub Prys</string>
<string name="mobile_data_option_not_today">Na Devnydhya Hedhyw</string>
<string name="mobile_data">Junyans Kellgowser</string>
<string name="mobile_data_description">Junyans kellgowser yw res rag messajys nowedhyans mappa ha ughkarga chanjyow</string>
<string name="mobile_data_option_never">Devnydhya Bynner</string>
<string name="mobile_data_option_ask">Govyn Pub Prys</string>
<string name="traffic_update_maps_text">Rag diskwedhes data daromdak, mappys res bos nowedhys</string>
<string name="big_font">Moghhe braster a labelyow mappa</string>
<string name="traffic_data_unavailable">Data daromdak ankavadow</string>
<string name="enable_logging">Gallosegi kovadhow</string>
<string name="prefs_languages_information">Ni devnydhya lev system rag danvonadow a dros. Lies devisyow Android devnydhya TTS Google, hwi gallos iskarga po nowedhi y yn Google Play (https://play.google.com/store/apps/details?id=com.google.android.tts)</string>
<string name="prefs_languages_information_off">Rag nebes yethow, hwi res lea unn synthesyer kows po unn fardel yeth keworransel yn an gwerthji appys (Google Play, Galaxy Store, App Gallery, FDroid). \nYgeri gas settyansyow devis → Yeth ha ynworrans → Areth → Eskorrans tekst dhe areth. \nHwi gallos dyghtya omma settyansow rag synthesyans kows (rag ensampel, iskarga fardel yeth dhe devnydh dhywarlinen) ha dewis jynn tekst-dhe-areth aral.</string>
<string name="prefs_languages_information_off_link">Rag moy kudhlow checkya an kowethlyver ma</string>
<string name="prefs_speed_cameras_information">Gwarnyans kamera tooth yw marow yn broyow le may gwarnyansow yw difennys erbynn lagha leel.</string>
<string name="transliteration_title">Treylya yn lytherennans Latin</string>
<string name="routing_add_start_point">Devnydhya hwithrans po tava war an mappa rag addya unn tyller dalleth</string>
<string name="routing_add_finish_point">Devnydhya hwithrans po tava war an mappa rag addya unn penn an fordh</string>
<string name="planning_route_manage_route">Dyghtya Kerdh</string>
<string name="saved">Sawys</string>
<string name="dialog_error_storage_title">Kudyn hedhas dalghuster</string>
<string name="dialog_error_storage_message">Dalghuster a-ves ankavadow. An karten SD re bos removys, shyndys, po an system restrennow yw redya-hepken. Mar pleg, checkya gas karten SD po kestava ni gans support@comaps.app</string>
<string name="setting_emulate_bad_storage">Hevelebya dalghuster drog</string>
<plurals name="bookmarks_places">
<item quantity="zero">%d lyververkys</item>
<item quantity="one">%d lyververk</item>
<item quantity="two">%d lyververkys</item>
<item quantity="few">%d lyververkys</item>
<item quantity="many">%d lyververkys</item>
<item quantity="other">%d lyververkys</item>
</plurals>
<string name="bookmarks_error_message_share_general">Anabel dhe kevrenna awos unn error app</string>
<string name="bookmarks_error_title_share_empty">Error dres kevrenna</string>
<string name="bookmarks_error_message_share_empty">Na gallos kevrenna unn rol gwag</string>
<string name="bookmarks_error_title_empty_list_name">Hanow a res</string>
<plurals name="bookmarks_detect_message">
<item quantity="zero">%d restrennow kavos. Hwi gallos gweles y\'s wosa treylyans.</item>
<item quantity="one">%d restrenn kavos. Hwi gallos gweles y wosa treylyans.</item>
<item quantity="two">%d restrennow kavos. Hwi gallos gweles y\'s wosa treylyans.</item>
<item quantity="few">%d restrennow kavos. Hwi gallos gweles y\'s wosa treylyans.</item>
<item quantity="many">%d restrennow kavos. Hwi gallos gweles y\'s wosa treylyans.</item>
<item quantity="other">%d restrennow kavos. Hwi gallos gweles y\'s wosa treylyans.</item>
</plurals>
<plurals name="tracks">
<item quantity="zero">%d lerghow</item>
<item quantity="one">%d lergh</item>
<item quantity="two">%d lerghow</item>
<item quantity="few">%d lerghow</item>
<item quantity="many">%d lerghow</item>
<item quantity="other">%d lerghow</item>
</plurals>
<string name="bookmarks_empty_list_message">Rag addya unn lyververk, tava unn le war an mappa ha tava an arwodik steren</string>
<string name="notification_channel_downloader">Iskarger mappa</string>
<string name="pref_tts_speedcams_always">Gwarnya pub prys</string>
<string name="pref_tts_speedcams_never">Gwarnya bynner</string>
<string name="power_managment_title">Fordh erbysyon batri</string>
<string name="power_managment_description">Assaya lehe usadow batri yn despit dhe nebes nasyow</string>
<string name="power_managment_setting_never">Bynner</string>
<string name="power_managment_setting_auto">Pan batri yw isel</string>
<string name="power_managment_setting_manual_max">Pub prys</string>
<string name="enable_logging_warning_message">Gallosegi yn servadow an dewis ma rag rekordya ha danvon dre dhorn kovadhow manylys a-dro gas kudyn dhe ni gans \"Derivas unn kudyn\" yn an folen Gweres. Kovadhow re komprehendya kudhlow GPS.</string>
<string name="driving_options_title">Dewisyow kerdh</string>
<string name="avoid_tolls">Goheles tollow</string>
<string name="avoid_unpaved">Goheles fordh ankonsys</string>
<string name="avoid_ferry">Goheles kowbalow</string>
<string name="avoid_motorways">Goheles gorfordhow</string>
<string name="avoid_steps">Goheles stayrys</string>
<string name="avoid_paved">Goheles fordh konsys</string>
<string name="unable_to_calc_alert_title">Anabel kalkya kerdh</string>
<string name="unable_to_calc_alert_subtitle">Unn kerdh na gallos kavosys. Ma re bos drefen gas dewisyow kerdh po data OpenStreetMap andhien. Mar pleg chanjya gas dewisyow kerdh ha dasassaya.</string>
<string name="change_driving_options_btn">Dewisyow kerdh gallosegys</string>
<string name="week_ago_sorttype">Nans yw unn seythen</string>
<string name="month_ago_sorttype">Nans yw unn mis</string>
<string name="moremonth_ago_sorttype">Moy ages nans yw unn mis</string>
<string name="moreyear_ago_sorttype">Moy ages nans yw unn bledhen</string>
<string name="dialog_pedestrian_route_is_long_header">Kerdh metro kavosys vyth</string>
<string name="dialog_pedestrian_route_is_long_message">Mar pleg, dewis unn tyller dalleth po penn an fordh yn-nes unn gorvas metro</string>
<string name="isolines_activation_error_dialog">Bywhe linen kettresow res iskargaow data mappa rag an arenebedh ma</string>
<string name="isolines_location_error_dialog">Linen kettresow yw kavadow yn an arenebedh ma na hwath</string>
<string name="elevation_profile_ascent">Ascendyans</string>
<string name="elevation_profile_descent">Diyskynnys</string>
<string name="downloader_loading_ios">Iskargaow</string>
<string name="disk_error">Anabel dhe gul restrenva ha gwaya restrennow war devis kov po sdcard</string>
<string name="disconnect_usb_cable_title">Unjunya korsen USB</string>
<string name="enable_keep_screen_on">Gwitha an skrin byw</string>
<string name="enable_keep_screen_on_description">A gallosegys, an skrin yw bos byw pub prys dres diskwedhes an mappa.</string>
<string name="enable_show_on_lock_screen">Diskwedhes war an skrin floren</string>
<string name="enable_show_on_lock_screen_description">A gallosegys, an app yw diskwedhes war an skrin floren pan an devis yw alhwedhys hwath.</string>
<string name="app_tip_03">A hwi aswon unn gwrier medhelweyth, hwi gallos peji ga kowlwul unn nas may hwi res.</string>
<string name="app_tip_04">Tava yn neb le war an mappa dhe dewis neb tra. Unn tava hir yw rag kudha ha diskwedhes an ynterfas.</string>
<string name="app_tip_05">A wodhowgh gas tyller a\'n jydh war an mappa gallos dewisys?</string>
<string name="app_tip_07">Agan app yw gul gans nebes diwysygyon ha an kemeneth.</string>
<string name="app_tip_08">Hwi gallos ewnhe ha gwellhe yn es an data map.</string>
<string name="app_tip_09">Agan amkan chif yw byldya mappys uskis, privedh, ha es may hwi a wra kara.</string>
<string name="car_used_on_the_phone_screen">Hwi devnydhya lemmyn CoMaps war an skrin kellgowser</string>
<string name="car_used_on_the_car_screen">Hwi devnydhya lemmyn CoMaps war an skrin karr</string>
<string name="car_continue_on_the_phone">Pesya war an kellgowser</string>
<string name="car_continue_in_the_car">Dhe an skrin karr</string>
<string name="aa_location_permissions_request">CoMaps res hedhas GPS. Pan y yw saw, checkya an messach war gas kellgowser.</string>
<string name="aa_request_permission_notification">An app ma res gas gront</string>
<string name="aa_request_permission_activity_text">CoMaps yn Android Auto res grontys GPS rag oberyans effeythus</string>
<string name="pref_tts_open_system_settings">Settyansow system tekst-dhe-areth</string>
<string name="pref_tts_no_system_tts">Settyansow tekst-dhe-areth na kavosys, Os ta sur gas devis skoodhya y?</string>
<string name="drive_through">Drivya-dredh</string>
<string name="self_service">Omgonis</string>
<string name="power_save_dialog_summary">Rag navygacyon moggha, ni komendya ungallosegi fordh batri yn settyansow kellgowser batri.</string>
<string name="stop_track_recording">Finsya Rekordyans Lergh</string>
<string name="stop_without_saving">Hedhi Rekordyans Lergh</string>
<string name="continue_recording">Pesya Rekordya</string>
<string name="track_recording_alert_title">Sawya yn Lyververkys ha Lerghow?</string>
<string name="track_recording_toast_nothing_to_save">Lergh yw gwag - mann rag sawyans</string>
<string name="error_no_file_manager_app">Anabel diskwedhes fenester dewis restrenva dre reson app fytti vyth yw leys war gas devis. Mar pleg, lea unn dyghtyer restrennow ha dasassaya.</string>
<string name="uri_open_location_failed">App leys vyth may gallos ygeri an tyller</string>
<string name="pref_left_button_disable">Ungallosegi</string>
<string name="pref_backup_title">Fardel ewnans gans lyververkys ha lerghow</string>
<string name="pref_backup_summary">Gul yn awtomatek unn fardel gans data rag ewnans yn unn restrenva war gas devis</string>
<string name="pref_backup_now_title">Gul y lemmyn</string>
<string name="pref_backup_now_summary">Gul a\'n par na fardel a-dhesempis</string>
<string name="pref_backup_now_summary_progress">Yn avonsyans…</string>
<string name="pref_backup_now_summary_ok">Sewena</string>
<string name="pref_backup_now_summary_empty_lists">Lyververkys ha lerghow vyth rag gul unn fardel</string>
<string name="pref_backup_now_summary_failed">Y fyllis gul unn fardel</string>
<string name="pref_backup_now_summary_folder_unavailable">An restrenva dewisys yw ankavadow</string>
<string name="pref_backup_status_summary_success">Gwrians sewen a-dhiwedhes</string>
<string name="pref_backup_location_title">Tyller</string>
<string name="pref_backup_location_summary_initial">Mar pleg, dewis unn restrenva a-dherag ha grontya gront</string>
<string name="pref_backup_history_title">Niver a fardellow dhe gwitha</string>
<string name="pref_backup_interval_title">Gul fardellow yn awtomatek</string>
<string name="backup_interval_manual_only">Marow (dre dhorn hepken)</string>
<string name="dialog_report_error_missing_folder">An tyller dewisys yw ankavadow po redya-hepken. Dewis unn tyller aral, mar pleg.</string>
<string name="dialog_report_error_with_logs">Mar pleg danvon unn derivas error dhe ni:\n - \"Gallosegi kovadhow\" yn an settyansow\n - Dasleverel yn diogel an kudyn\n - yn an skrin \"A-dro ha Gweres\", levna an boton \"Derivas unn kudyn\" ha danvon der ebost po keskows\n - ungallosegi kovadhow</string>
<string name="route_type">Eghen kerdh</string>
<string name="open_now">Ygeri lemmyn</string>
<string name="closed_now">Degeys lemmyn</string>
<string name="at">dhe %s</string>
<string name="pref_tts_no_system_tts_short">Jynn tekst-dhe-areth kavosys vyth, checkya an settyansow app</string>
<string name="navigation_start_tts_message">"Dalleth navygacyon, yeth lev: "</string>
<string name="navigation_start_tts_disabled_message">Lenna danvonadow marow: jynn tekst-dhe-areth ankavadow</string>
<string name="offline_explanation_text">Unn mappa res iskargys rag gweles ha viajya an arenebedh.\nIskarga mappys rag arenebedhow may hwi mynnes viajya dhe.</string>
<string name="list_description_empty">Golegi an rol rag addya unn deskrifans</string>
<string name="advanced">Avonsys</string>
<string name="download_resources_custom_url_title">Servell Mappa Personel</string>
<string name="download_resources_custom_url_message">Aslea an servell defowt devnydhys rag iskargow mappa. Gwitha gwag rag devnydhya an servell CoMaps defowt.</string>
<string name="download_resources_custom_url_summary_none">Anavleythys</string>
<string name="download_resources_custom_url_error_scheme">Mar pleg, ynworra unn URL may dalleth gans http:// po https://</string>
</resources>

View File

@@ -900,5 +900,5 @@
<string name="download_resources_custom_url_title">Pasirinktinis žemėlapių serveris</string>
<string name="download_resources_custom_url_message">Žemėlapiams parsisiųsti galite nurodyti kitą, nei numatytasis, serverį. Palikite lauką tuščią, jei norite naudoti numatytąjį „CoMaps“ serverį.</string>
<string name="download_resources_custom_url_summary_none">Nenurodytas</string>
<string name="download_resources_custom_url_error_scheme">Įveskite visą URL adresą, pradedant „https://“ ir baigiant „/“</string>
<string name="download_resources_custom_url_error_scheme">Įveskite URL adresą, prasidedantį „http://“ arba „https://“</string>
</resources>

View File

@@ -15,6 +15,7 @@
<color name="bg_cards">#FF3C4044</color>
<color name="bg_panel">@color/bg_window</color>
<color name="bg_primary_dark">#FF588157</color>
<color name="bg_app">#10140F</color>
<color name="bg_menu">#CC2D3237</color>

View File

@@ -897,5 +897,5 @@
<string name="download_resources_custom_url_title">Servidor de Mapas Personalizado</string>
<string name="download_resources_custom_url_message">Substitua o servidor padrão usado para baixar mapas. Deixe em branco para usar o servidor padrão do CoMaps.</string>
<string name="download_resources_custom_url_summary_none">Não definido</string>
<string name="download_resources_custom_url_error_scheme">Insira um URL completo começando com https:// e terminando com /</string>
<string name="download_resources_custom_url_error_scheme">Insira uma URL começando com http:// ou https://</string>
</resources>

View File

@@ -913,5 +913,5 @@
<string name="download_resources_custom_url_title">Servidor de Mapa Personalizado</string>
<string name="download_resources_custom_url_message">Substitui o servidor de download de mapas normal. Deixe em branco para usar o servidor do CoMaps padrão.</string>
<string name="download_resources_custom_url_summary_none">Indefinido</string>
<string name="download_resources_custom_url_error_scheme">Por favor insira um URL inteiro começando com https:// e acabando com /</string>
<string name="download_resources_custom_url_error_scheme">Por favor, insira um URL começando com http:// ou https://</string>
</resources>

View File

@@ -73,11 +73,11 @@
<!-- "Add new bookmark list" dialog title -->
<string name="add_new_set">Add a New List</string>
<!-- Add Bookmark list dialog - hint when the list name is empty -->
<string name="bookmark_set_name">Bookmark List Name</string>
<string name="bookmark_set_name">List Name</string>
<!-- Should be used in the bookmarks-only context, see bookmarks_and_tracks if tracks are also implied. -->
<string name="bookmarks">Bookmarks</string>
<string name="bookmarks">Places</string>
<!-- "Bookmarks and Tracks" dialog title, also sync it with iphone/plist.txt -->
<string name="bookmarks_and_tracks">Bookmarks and Tracks</string>
<string name="bookmarks_and_tracks">Favorites</string>
<!-- Add bookmark dialog - bookmark name -->
<string name="name">Name</string>
<!-- Editor title above street and house number, duplicates [type.building.address] in types_strings.txt -->
@@ -156,18 +156,18 @@
<!-- Notes field in Bookmarks view -->
<string name="description">Notes</string>
<!-- Email Subject when sharing bookmark list -->
<string name="share_bookmarks_email_subject">CoMaps bookmarks were shared with you</string>
<string name="share_bookmarks_email_subject">My CoMaps Favorites</string>
<string name="share_bookmarks_email_body">Hello!
\n
\nAttached are my bookmarks; please open them in CoMaps. If you don\'t have it installed you can download it here: https://www.comaps.app/download/
\nAttached are my favorites; please open them in CoMaps. If you don\'t have it installed you can download it here: https://www.comaps.app/download/
\n
\nEnjoy travelling with CoMaps!</string>
<!-- message title of loading file -->
<string name="load_kmz_title">Loading Bookmarks</string>
<string name="load_kmz_title">Loading Favorites</string>
<!-- Kmz file successful loading -->
<string name="load_kmz_successful">Bookmarks loaded successfully! You can find them on the map or on the Bookmarks Manager screen.</string>
<string name="load_kmz_successful">Favorites loaded successfully! You can find them on the map or on the Favorites Manager screen.</string>
<!-- Kml file loading failed -->
<string name="load_kmz_failed">Failed to load bookmarks. The file may be corrupted or defective.</string>
<string name="load_kmz_failed">Failed to load favorites. The file may be corrupted or defective.</string>
<!-- Failed to recognize the format of a bookmarks or tracks file. -->
<string name="unknown_file_type">The file type is not recognized by the app:
\n%1$s</string>
@@ -541,7 +541,7 @@
<string name="minute">min</string>
<string name="day">d</string>
<string name="placepage_more_button">More</string>
<string name="placepage_edit_bookmark_button">Edit Bookmark</string>
<string name="placepage_edit_bookmark_button">Edit Saved Place</string>
<string name="placepage_personal_notes_hint">Personal notes (text or html)</string>
<string name="editor_reset_edits_message">Discard all local changes?</string>
<string name="editor_reset_edits_button">Discard changes</string>
@@ -635,17 +635,17 @@
<string name="dialog_error_storage_message">External storage is not accessible. The SD card may have been removed, damaged, or the file system is read-only. Please, check your SD card or contact us at support@comaps.app</string>
<string name="setting_emulate_bad_storage">Emulate bad storage</string>
<string name="error_enter_correct_name">Please enter a correct name</string>
<string name="bookmark_lists">Lists</string>
<string name="bookmark_lists">Favorite Lists</string>
<!-- Do not display all bookmark lists on the map -->
<string name="bookmark_lists_hide_all">Hide all</string>
<string name="bookmark_lists_show_all">Show all</string>
<plurals name="bookmarks_places">
<item quantity="one">%d bookmark</item>
<item quantity="other">%d bookmarks</item>
<item quantity="one">%d saved place</item>
<item quantity="other">%d saved places</item>
</plurals>
<string name="bookmarks_create_new_group">Create a new list</string>
<!-- Bookmark categories screen, button that opens folder selection dialog to import KML/KMZ/GPX/KMB files -->
<string name="bookmarks_import">Import Bookmarks and Tracks</string>
<string name="bookmarks_import">Import Favorites</string>
<string name="bookmarks_error_message_share_general">Unable to share due to an application error</string>
<string name="bookmarks_error_title_share_empty">Sharing error</string>
<string name="bookmarks_error_message_share_empty">Cannot share an empty list</string>
@@ -675,7 +675,7 @@
<string name="subway">Subway</string>
<string name="layers_title">Map Styles and Layers</string>
<string name="bookmarks_empty_list_title">This list is empty</string>
<string name="bookmarks_empty_list_message">To add a bookmark, tap a place on the map and then tap the star icon</string>
<string name="bookmarks_empty_list_message">To save a place, tap a place on the map and then tap the star icon</string>
<string name="category_desc_more">…more</string>
<string name="export_file">Export KMZ</string>
<string name="export_file_gpx">Export GPX</string>
@@ -730,7 +730,7 @@
<!-- max. 10 symbols, both iOS and Android -->
<string name="sort">Sort…</string>
<!-- Android, title, max 20-22 symbols -->
<string name="sort_bookmarks">Sort bookmarks</string>
<string name="sort_bookmarks">Sort favorites</string>
<!-- Android -->
<string name="by_default">By default</string>
<!-- Android -->
@@ -797,8 +797,10 @@
<string name="enable_show_on_lock_screen">Show on the lock screen</string>
<!-- Description in preferences -->
<string name="enable_show_on_lock_screen_description">When enabled, the app will work on the lockscreen even when the device is locked.</string>
<!-- Current language of the map! -->
<!-- Current language of the map -->
<string name="change_map_locale">Map language</string>
<!-- Local language -->
<string name="pref_maplanguage_local">Local Language</string>
<!-- OpenStreetMap text on splash screen -->
<string name="splash_subtitle">Map data from OpenStreetMap</string>
<!-- Telegram group url for the "?" About page -->
@@ -811,7 +813,7 @@
<string name="translated_om_site_url">https://comaps.app/</string>
<!-- Link to OSM wiki for Editor, Profile and About pages -->
<string name="osm_wiki_about_url">https://wiki.openstreetmap.org/wiki/About_OpenStreetMap</string>
<!-- A number of bookmarks and a number of tracks, separated by comma, like: 1 bookmark, 5 tracks -->
<!-- A number of bookmarks and a number of tracks, separated by comma, like: 1 saved place, 5 tracks -->
<string name="comma_separated_pair">%1$s, %2$s</string>
<!-- App Tip #00 -->
<string name="app_tip_00">Thank you for using our community-built maps!</string>
@@ -857,7 +859,7 @@
<string name="browser_not_available">Web browser is not available</string>
<string name="volume">Volume</string>
<!-- Bookmark categories screen, button that opens share dialog to export all bookmarks and tracks -->
<string name="bookmarks_export">Export all Bookmarks and Tracks</string>
<string name="bookmarks_export">Export all Places and Tracks</string>
<!-- button in (app) TTS settings, to open the system TTS settings. -->
<string name="pref_tts_open_system_settings">Speech synthesis system settings</string>
<!-- toast displayed when pressing the "Speech synthesis system settings" button, and the system settings aren't found. -->
@@ -889,7 +891,7 @@
<!-- Title for the "Stop Without Saving" action for the alert when saving a track recording. -->
<string name="continue_recording">Continue Recording</string>
<!-- Title for the alert when saving a track recording. -->
<string name="track_recording_alert_title">Save into Bookmarks and Tracks?</string>
<string name="track_recording_alert_title">Save into Favorites?</string>
<!-- Message for the toast when saving the track recording is finished but nothing to save. -->
<string name="track_recording_toast_nothing_to_save">Track is empty - nothing to save</string>
<!-- Error message when there are no File Manager apps installed to select a folder when importing Bookmarks and Tracks -->
@@ -903,13 +905,13 @@
<string name="pref_left_button_disable">Disable</string>
<!-- Settings "Backup" category: "Backup" title -->
<string name="pref_backup_title">Bookmarks and tracks backup</string>
<string name="pref_backup_title">Backup favorites</string>
<string name="pref_backup_summary">Automatically backup to a folder on your device</string>
<string name="pref_backup_now_title">Backup now</string>
<string name="pref_backup_now_summary">Create a backup immediately</string>
<string name="pref_backup_now_summary_progress">Backup in progress…</string>
<string name="pref_backup_now_summary_ok">Backup completed successfully</string>
<string name="pref_backup_now_summary_empty_lists">No bookmarks and tracks to backup</string>
<string name="pref_backup_now_summary_empty_lists">No places and tracks to backup</string>
<string name="pref_backup_now_summary_failed">Backup failed</string>
<string name="pref_backup_now_summary_folder_unavailable">The backup folder is not available</string>
<string name="pref_backup_status_summary_success">Last successful backup</string>
@@ -933,7 +935,7 @@
<string name="pedestrian">Pedestrian</string>
<string name="bicycle">Bicycle</string>
<string name="ruler">Ruler</string>
<string name="bookmark_color">Bookmark color</string>
<string name="bookmark_color">Color for Favorite</string>
<string name="about_help">About &amp; Help</string>
<string name="open_now">Open now</string>
<string name="closed_now">Closed now</string>

View File

@@ -98,16 +98,6 @@
<item name="android:textColorHint">@color/text_light_hint</item>
</style>
<style name="MwmTextAppearance.Toolbar.Title" parent="android:TextAppearance.Material.Widget.ActionBar.Title">
<item name="android:textSize">@dimen/text_size_toolbar</item>
<item name="android:textColor">@color/text_light</item>
<item name="android:textColorHint">@color/text_light_hint</item>
</style>
<style name="MwmTextAppearance.Toolbar.Title.Light">
<item name="android:textColor">@color/bg_cards</item>
</style>
<style name="MwmTextAppearance.NavMenu">
<item name="android:textStyle">bold</item>
</style>

View File

@@ -143,8 +143,7 @@
<item name="android:background">?colorPrimary</item>
<item name="android:displayOptions">homeAsUp|showTitle</item>
<item name="contentInsetStart">0dp</item>
<item name="android:titleTextAppearance">@style/MwmTextAppearance.Toolbar.Title</item>
<item name="titleTextAppearance">@style/MwmTextAppearance.Toolbar.Title</item>
<item name="titleTextColor">@color/text_light</item>
<item name="buttonGravity">center_vertical</item>
</style>
@@ -169,9 +168,7 @@
<item name="android:cacheColorHint">@android:color/transparent</item>
</style>
<style name="MwmWidget.TextView" parent="Widget.MaterialComponents.TextView">
<item name="android:background">@android:color/transparent</item>
</style>
<style name="MwmWidget.TextView" parent="Widget.MaterialComponents.TextView" />
<style name="MwmWidget.TextView.Item">
<item name="android:layout_width">match_parent</item>
@@ -290,13 +287,13 @@
</style>
<style name="MwmWidget.BottomSheetDialog" parent="Widget.Material3.BottomSheet.Modal">
<item name="backgroundTint">?cardBackground</item>
<item name="backgroundTint">?colorSurfaceContainerLow</item>
<item name="elevationOverlayEnabled">false</item>
<item name="shapeAppearance">@style/ShapeAppearance.Material3.LargeComponent</item>
</style>
<style name="MwmWidget.BottomSheet" parent="MwmWidget.BottomSheetDialog">
<item name="android:background">?cardBackground</item>
<item name="android:background">?colorSurfaceContainerLow</item>
<item name="behavior_hideable">false</item>
</style>

View File

@@ -253,8 +253,9 @@
<item name="android:fontFamily">@string/robotoMedium</item>
</style>
<style name="MwmTheme.ProgressDialog" parent="MwmTheme.AlertDialog">
<style name="MwmTheme.ProgressDialog" parent="MwmTheme.M3.AlertDialog">
<item name="android:textColor">?textDialogTheme</item>
<item name="android:background">?attr/colorSurfaceContainerHigh</item>
</style>
<style name="MwmTheme.Downloader">

View File

@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Some languages not supported by Android require to be specified here to be applied -->
<locale android:name="en" />
<locale android:name="af" />
<locale android:name="ar" />
<locale android:name="az" />
<locale android:name="be" />
<locale android:name="bg" />
<locale android:name="bn" />
<locale android:name="ca" />
<locale android:name="cs" />
<locale android:name="da" />
@@ -20,28 +22,38 @@
<locale android:name="fi" />
<locale android:name="fr" />
<locale android:name="fr-CA" />
<locale android:name="iw" />
<locale android:name="gl" />
<locale android:name="gsw" />
<locale android:name="he" />
<locale android:name="hi" />
<locale android:name="hu" />
<locale android:name="id" />
<locale android:name="in" />
<locale android:name="is" />
<locale android:name="it" />
<locale android:name="iw" />
<locale android:name="ja" />
<locale android:name="kw" />
<locale android:name="ko" />
<locale android:name="lt" />
<locale android:name="lv" />
<locale android:name="mr" />
<locale android:name="mt" />
<locale android:name="nb" />
<locale android:name="nb-NO" />
<locale android:name="nl" />
<locale android:name="pl" />
<locale android:name="pt" />
<locale android:name="pt-BR" />
<locale android:name="ro" />
<locale android:name="ru" />
<locale android:name="sl" />
<locale android:name="sk" />
<locale android:name="sr" />
<locale android:name="sr-Cyrl" />
<locale android:name="sr-Latn" />
<locale android:name="sv" />
<locale android:name="sw" />
<locale android:name="ta" />
<locale android:name="th" />
<locale android:name="tr" />
<locale android:name="uk" />

View File

@@ -4,11 +4,10 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Locale;
import org.junit.Test;
public class OpenStateTextFormatterTest
{
@@ -36,10 +35,10 @@ public class OpenStateTextFormatterTest
@Test
public void buildAtLabel_today_open_close()
{
String open = OpenStateTextFormatter.buildAtLabel(true, true, "Sat", "09:00",
OPENS_AT, CLOSES_AT, OPENS_DAY_AT, CLOSES_DAY_AT);
String close = OpenStateTextFormatter.buildAtLabel(false, true, "Sat", "18:00",
OPENS_AT, CLOSES_AT, OPENS_DAY_AT, CLOSES_DAY_AT);
String open = OpenStateTextFormatter.buildAtLabel(true, true, "Sat", "09:00", OPENS_AT, CLOSES_AT, OPENS_DAY_AT,
CLOSES_DAY_AT);
String close = OpenStateTextFormatter.buildAtLabel(false, true, "Sat", "18:00", OPENS_AT, CLOSES_AT, OPENS_DAY_AT,
CLOSES_DAY_AT);
assertEquals("Opens at 09:00", open);
assertEquals("Closes at 18:00", close);
}
@@ -47,10 +46,10 @@ public class OpenStateTextFormatterTest
@Test
public void buildAtLabel_other_day()
{
String open = OpenStateTextFormatter.buildAtLabel(true, false, "Sat", "09:00",
OPENS_AT, CLOSES_AT, OPENS_DAY_AT, CLOSES_DAY_AT);
String close = OpenStateTextFormatter.buildAtLabel(false, false, "Tue", "18:00",
OPENS_AT, CLOSES_AT, OPENS_DAY_AT, CLOSES_DAY_AT);
String open = OpenStateTextFormatter.buildAtLabel(true, false, "Sat", "09:00", OPENS_AT, CLOSES_AT, OPENS_DAY_AT,
CLOSES_DAY_AT);
String close = OpenStateTextFormatter.buildAtLabel(false, false, "Tue", "18:00", OPENS_AT, CLOSES_AT, OPENS_DAY_AT,
CLOSES_DAY_AT);
assertEquals("Opens Sat at 09:00", open);
assertEquals("Closes Tue at 18:00", close);
}

View File

@@ -182,8 +182,7 @@ JNIEXPORT void JNICALL Java_app_organicmaps_sdk_DownloadResourcesLegacyActivity_
g_currentRequest.reset();
}
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_DownloadResourcesLegacyActivity_nativeResetMetaConfig(JNIEnv *,
jclass)
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_DownloadResourcesLegacyActivity_nativeResetMetaConfig(JNIEnv *, jclass)
{
auto & downloader = LegacyDownloader();
if (downloader)

View File

@@ -1505,20 +1505,16 @@ JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeGet3dMode(JNIEnv
env->SetBooleanField(result, buildingsField, buildings);
}
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeSetCustomMapDownloadUrl(JNIEnv * env, jclass,
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeSetCustomMapDownloadUrl(JNIEnv * env, jclass,
jstring url)
{
std::string nativeUrl = jni::ToNativeString(env, url);
GetPlatform().SetCustomMapServerUrl(nativeUrl);
if (g_framework)
{
frm()->GetStorage().ResetMapDownloadMetaConfig();
}
else
{
LOG(LINFO, ("nativeSetCustomMapDownloadUrl: framework not created yet, skipping ResetMapDownloadMetaConfig"));
}
}
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeSetAutoZoomEnabled(JNIEnv * env, jclass,

View File

@@ -18,7 +18,6 @@
#include <functional>
#include <memory>
#include <unordered_map>
#include <vector>
namespace
@@ -53,7 +52,7 @@ struct TBatchedData
jobject g_countryChangedListener = nullptr;
DECLARE_THREAD_CHECKER(g_batchingThreadChecker);
std::unordered_map<jobject, std::vector<TBatchedData>> g_batchedCallbackData;
ankerl::unordered_dense::map<jobject, std::vector<TBatchedData>> g_batchedCallbackData;
bool g_isBatched;
storage::Storage & GetStorage()
@@ -589,8 +588,9 @@ JNIEXPORT jstring JNICALL Java_app_organicmaps_sdk_downloader_MapManager_nativeG
}
// static native boolean nativeIsMapTooOldToEdit(String countryId);
JNIEXPORT jboolean JNICALL Java_app_organicmaps_sdk_downloader_MapManager_nativeIsMapTooOldToEdit(JNIEnv *env, jclass clazz,
jstring country_id)
JNIEXPORT jboolean JNICALL Java_app_organicmaps_sdk_downloader_MapManager_nativeIsMapTooOldToEdit(JNIEnv * env,
jclass clazz,
jstring country_id)
{
return GetStorage().IsMapTooOldToEdit(jni::ToNativeString(env, country_id));
}

View File

@@ -580,7 +580,8 @@ JNIEXPORT jint JNICALL Java_app_organicmaps_sdk_editor_Editor_nativeGetMapObject
return static_cast<jint>(osm::Editor::Instance().GetFeatureStatus(g_editableMapObject.GetID()));
}
JNIEXPORT jboolean JNICALL Java_app_organicmaps_sdk_editor_Editor_nativeAreSomeFeatureChangesUploaded(JNIEnv * env, jclass clazz)
JNIEXPORT jboolean JNICALL Java_app_organicmaps_sdk_editor_Editor_nativeAreSomeFeatureChangesUploaded(JNIEnv * env,
jclass clazz)
{
return osm::Editor::Instance().AreSomeFeatureChangesUploaded(g_editableMapObject.GetID().m_mwmId,
g_editableMapObject.GetID().m_index);

View File

@@ -320,7 +320,7 @@ JNIEXPORT jobject JNICALL Java_app_organicmaps_sdk_editor_OpeningHours_nativeCur
jclass ohStateClass = jni::GetGlobalClassRef(env, "app/organicmaps/sdk/editor/OhState");
jclass ruleStateClass = jni::GetGlobalClassRef(env, "app/organicmaps/sdk/editor/OhState$State");
static std::unordered_map<RuleState, char const *> const ruleState = {
static ankerl::unordered_dense::map<RuleState, char const *> const ruleState = {
{RuleState::Open, "Open"}, {RuleState::Closed, "Closed"}, {RuleState::Unknown, "Unknown"}};
jfieldID stateField =

View File

@@ -35,7 +35,8 @@ SOFTWARE.
#include <iterator>
#include <string>
#include <unordered_map>
#include "3party/ankerl/unordered_dense.h"
DECLARE_EXCEPTION(JniException, RootException);
@@ -151,7 +152,7 @@ public:
}
private:
std::unordered_map<std::string, jfieldID> m_fieldIds;
ankerl::unordered_dense::map<std::string, jfieldID> m_fieldIds;
};
} // namespace

View File

@@ -2,12 +2,10 @@ package app.organicmaps.sdk;
import android.content.Context;
import android.graphics.Bitmap;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.Size;
import app.organicmaps.sdk.api.ParsedRoutingData;
import app.organicmaps.sdk.api.ParsedSearchRequest;
import app.organicmaps.sdk.api.RequestType;
@@ -26,7 +24,6 @@ import app.organicmaps.sdk.routing.RoutingRecommendationListener;
import app.organicmaps.sdk.routing.TransitRouteInfo;
import app.organicmaps.sdk.settings.SpeedCameraMode;
import app.organicmaps.sdk.util.Constants;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

Some files were not shown because too many files have changed in this diff Show More