mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-01 02:23:45 +00:00
Compare commits
11 Commits
matheusgom
...
test/2025.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0d1abb0d1 | ||
|
|
eb28c50161 | ||
|
|
650f0ca120 | ||
|
|
882dccb87d | ||
|
|
969e1ef2da | ||
|
|
a60efa9b43 | ||
|
|
f1cf844986 | ||
|
|
f20c3bf50c | ||
|
|
e7cc602904 | ||
|
|
d473361e54 | ||
|
|
76d58e4a05 |
@@ -2,3 +2,5 @@
|
||||
480fa6c2fcf53be296504ac6ba8e6b3d70f92b42
|
||||
a6ede2b1466f0c9d8a443600ef337ba6b5832e58
|
||||
1377b81bf1cac72bb6da192da7fed6696d5d5281
|
||||
99900fad21bab3f97065d11562346c5525a31f57
|
||||
a53828154fc7aa363dfe8926affaea56237832e5
|
||||
|
||||
83
3party/ankerl/stl.h
Normal file
83
3party/ankerl/stl.h
Normal 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
|
||||
2239
3party/ankerl/unordered_dense.h
Normal file
2239
3party/ankerl/unordered_dense.h
Normal file
File diff suppressed because it is too large
Load Diff
10
android/app/src/fdroid/play/listings/de-DE/release-notes.txt
Normal file
10
android/app/src/fdroid/play/listings/de-DE/release-notes.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
• OpenStreetMap-Daten vom 9. Dezember
|
||||
• Material 3 Design
|
||||
• Im OSM-Editor können nun Ladestationen hinzugefügt werden
|
||||
• Schuko und Typ E Ladestationen hinzugefügt
|
||||
• Verbesserte Suchvorschläge
|
||||
• Litauische und lettische Sprachankündigungen
|
||||
• Die Fahranweisungen wurden vergrößert
|
||||
• Der Zoomlevel passt sich an die Distanz zur nächsten Abbiegung an
|
||||
• Neue Anordnung der Einstellungen
|
||||
Weitere Einzelheiten auf codeberg.org/comaps/comaps/releases
|
||||
@@ -1,13 +1,10 @@
|
||||
• Fixed voice directions pronouncing weird symbols in the beginning
|
||||
• OpenStreetMap data as of November 23
|
||||
|
||||
Changes in the previous release:
|
||||
• Added trees
|
||||
• Made bus stop icons smaller and show up earlier
|
||||
• Reduce visibility of entrances
|
||||
• Added several other POI types
|
||||
• Show sand areas on the map
|
||||
• Add business is vacant option to the OSM editor
|
||||
• Improved road shields in Europe
|
||||
• Avoid paved roads routing option
|
||||
• Added icons to the settings page
|
||||
• OpenStreetMap data as of December 9
|
||||
• Use Material 3 themes
|
||||
• Support charging sockets in OSM Editor
|
||||
• Added schuko/type-E charge sockets
|
||||
• Improved search results ranking
|
||||
• Enabled Lithuanian and Latvian in voice announcements
|
||||
• Improved size of driving indications
|
||||
• Base zoom level on distance to next turn
|
||||
• Reordered settings
|
||||
More details on codeberg.org/comaps/comaps/releases
|
||||
|
||||
11
android/app/src/fdroid/play/listings/es-ES/release-notes.txt
Normal file
11
android/app/src/fdroid/play/listings/es-ES/release-notes.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
• Datos de OpenStreetMap a fecha 9/12.
|
||||
• Uso de temas Material 3.
|
||||
• Compatibilidad con enchufes de recarga en Editor.
|
||||
• Se añaden enchufes de recarga schuko/tipo E.
|
||||
• Se mejora la búsqueda.
|
||||
• Se habilitan el lituano y el letón en las indicaciones de voz.
|
||||
• Se aumenta el tamaño de las indicaciones de conducción.
|
||||
• Nivel de zoom base según la distancia al siguiente giro.
|
||||
• Se han reordenado los ajustes.
|
||||
|
||||
Más detalles en codeberg.org/comaps/comaps/releases
|
||||
10
android/app/src/fdroid/play/listings/fr-FR/release-notes.txt
Normal file
10
android/app/src/fdroid/play/listings/fr-FR/release-notes.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
• Données OpenStreetMap du 9 Décembre
|
||||
• Utilisation de Material 3
|
||||
• Support de l'édition des bornes de recharge dans l'éditeur OSM
|
||||
• Ajout du type de prise schuko/type-E
|
||||
• Amélioration de l'ordre des résultats de recherche
|
||||
• Ajout du lituanien et du letton dans le guidage vocal
|
||||
• Amélioration de la taille des instructions dans la navigation
|
||||
• Niveau de zoom basé sur la distance jusqu’au prochain virage
|
||||
• Réorganisation des paramètres
|
||||
Plus de détails sur codeberg.org/comaps/comaps/releases
|
||||
10
android/app/src/fdroid/play/listings/hr/release-notes.txt
Normal file
10
android/app/src/fdroid/play/listings/hr/release-notes.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
• Podaci OpenStreetMap karte od 9. prosinca
|
||||
• Korištenje Material 3 tema
|
||||
• Podrška za utičnice za punjenje u OSM Editoru
|
||||
• Dodane šuko/tip-E utičnice
|
||||
• Poboljšano rangiranje rezultata pretraživanja
|
||||
• Omogućeni litvanski i latvijski jezici u glasovnim najavama
|
||||
• Povećana veličina indikatora vožnje
|
||||
• Razina zumiranja se mijenja ovisno o udaljenosti do sljedećeg skretanja
|
||||
• Promijenjen redoslijed postavki
|
||||
Više detalja na codeberg.org/comaps/comaps/releases
|
||||
10
android/app/src/fdroid/play/listings/pl-PL/release-notes.txt
Normal file
10
android/app/src/fdroid/play/listings/pl-PL/release-notes.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
• Dane OpenStreetMap z 9 grudnia
|
||||
• Użycie motywów Material 3
|
||||
• Obsługa gniazd ładowania w Edytorze OSM
|
||||
• Dodane gniazda ładowania schuko/type-E
|
||||
• Poprawiony ranking wyników wyszukiwania
|
||||
• Dodane litewskie i łotewskie komunikaty głosowe
|
||||
• Poprawiony rozmiar znaków drogowych
|
||||
• Poziom powiększenia oparty na odległości do następnego manewru
|
||||
• Zmieniona kolejność ustawień
|
||||
Więcej szczegółów na codeberg.org/comaps/comaps/releases
|
||||
10
android/app/src/fdroid/play/listings/pt-BR/release-notes.txt
Normal file
10
android/app/src/fdroid/play/listings/pt-BR/release-notes.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
• Dados OpenStreetMap atualizados em 9 de dezembro
|
||||
• Uso do estilo Material 3
|
||||
• Suporte para tomadas de carregamento no Editor OSM
|
||||
• Adição de tomadas de carregamento Schuko/Tipo E
|
||||
• Melhoria na classificação dos resultados de busca
|
||||
• Adição dos idiomas letão e lituano nas orientações por voz
|
||||
• Melhoria no tamanho das indicações de direção
|
||||
• Nível de zoom baseado em distância até a próxima curva
|
||||
• Configurações reordenadas
|
||||
Mais detalhes em codeberg.org/comaps/comaps/releases
|
||||
@@ -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;
|
||||
|
||||
@@ -253,7 +253,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);
|
||||
@@ -372,7 +372,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);
|
||||
@@ -424,17 +424,17 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
||||
default -> throw new AssertionError("Unexpected result code = " + result);
|
||||
};
|
||||
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(titleId)
|
||||
.setMessage(messageId)
|
||||
.setCancelable(true)
|
||||
.setOnCancelListener((dialog) -> setAction(PAUSE))
|
||||
.setPositiveButton(R.string.try_again,
|
||||
(dialog, which) -> {
|
||||
setAction(TRY_AGAIN);
|
||||
onTryAgainClicked();
|
||||
})
|
||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||
.show();
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(titleId)
|
||||
.setMessage(messageId)
|
||||
.setCancelable(true)
|
||||
.setOnCancelListener((dialog) -> setAction(PAUSE))
|
||||
.setPositiveButton(R.string.try_again,
|
||||
(dialog, which) -> {
|
||||
setAction(TRY_AGAIN);
|
||||
onTryAgainClicked();
|
||||
})
|
||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -10,7 +10,6 @@ import androidx.fragment.app.DialogFragment;
|
||||
|
||||
public class BaseMwmDialogFragment extends DialogFragment
|
||||
{
|
||||
|
||||
protected int getStyle()
|
||||
{
|
||||
return STYLE_NORMAL;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,6 @@ public final class CarAppSession extends Session implements DefaultLifecycleObse
|
||||
public void onCreate(@NonNull LifecycleOwner owner)
|
||||
{
|
||||
Logger.d(TAG);
|
||||
Framework.nativeSetCarScreenMode(true);
|
||||
mSensorsManager = new CarSensorsManager(getCarContext());
|
||||
mDisplayManager = MwmApplication.from(getCarContext()).getDisplayManager();
|
||||
mDisplayManager.addListener(DisplayType.Car, this);
|
||||
@@ -160,7 +159,6 @@ public final class CarAppSession extends Session implements DefaultLifecycleObse
|
||||
public void onDestroy(@NonNull LifecycleOwner owner)
|
||||
{
|
||||
mDisplayManager.removeListener(DisplayType.Car);
|
||||
Framework.nativeSetCarScreenMode(false);
|
||||
}
|
||||
|
||||
private void init()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
@@ -398,7 +397,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);
|
||||
|
||||
@@ -406,16 +405,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));
|
||||
@@ -463,13 +462,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);
|
||||
}
|
||||
});
|
||||
@@ -484,13 +486,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);
|
||||
}
|
||||
});
|
||||
@@ -498,74 +503,82 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
return new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.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;
|
||||
}
|
||||
@@ -585,7 +598,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]);
|
||||
@@ -603,7 +617,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];
|
||||
|
||||
@@ -614,27 +629,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);
|
||||
}
|
||||
|
||||
@@ -643,7 +661,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);
|
||||
}
|
||||
|
||||
@@ -789,9 +808,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);
|
||||
|
||||
@@ -1023,14 +1041,15 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
private void placeDisused()
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.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)
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,6 @@ public class PlacePageButtonFactory
|
||||
yield R.drawable.ic_more;
|
||||
}
|
||||
};
|
||||
return new PlacePageButton(titleId, iconId, buttonType);
|
||||
return new PlacePageButton(titleId, iconId, buttonType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -154,6 +153,7 @@ public class PlacePageView extends Fragment
|
||||
private MaterialTextView mTvLastChecked;
|
||||
private View mEditPlace;
|
||||
private View mAddPlace;
|
||||
private View mMapTooOld;
|
||||
private View mEditTopSpace;
|
||||
private ShapeableImageView mColorIcon;
|
||||
private MaterialTextView mTvCategory;
|
||||
@@ -318,6 +318,7 @@ public class PlacePageView extends Fragment
|
||||
mTvLastChecked = mFrame.findViewById(R.id.place_page_last_checked);
|
||||
mEditPlace = mFrame.findViewById(R.id.ll__place_editor);
|
||||
mAddPlace = mFrame.findViewById(R.id.ll__place_add);
|
||||
mMapTooOld = mFrame.findViewById(R.id.cv__map_too_old);
|
||||
mEditTopSpace = mFrame.findViewById(R.id.edit_top_space);
|
||||
latlon.setOnLongClickListener(this);
|
||||
address.setOnLongClickListener(this);
|
||||
@@ -684,7 +685,7 @@ public class PlacePageView extends Fragment
|
||||
|
||||
if (RoutingController.get().isNavigating() || RoutingController.get().isPlanning())
|
||||
{
|
||||
UiUtils.hide(mEditPlace, mAddPlace, mEditTopSpace);
|
||||
UiUtils.hide(mEditPlace, mAddPlace, mEditTopSpace, mMapTooOld);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -692,34 +693,58 @@ public class PlacePageView extends Fragment
|
||||
UiUtils.showIf(Editor.nativeShouldShowAddPlace(), mAddPlace);
|
||||
MaterialButton mTvEditPlace = mEditPlace.findViewById(R.id.mb__place_editor);
|
||||
MaterialButton mTvAddPlace = mAddPlace.findViewById(R.id.mb__place_add);
|
||||
mTvEditPlace.setOnClickListener(this);
|
||||
mTvAddPlace.setOnClickListener(this);
|
||||
mTvEditPlace.setEnabled(Editor.nativeShouldEnableEditPlace());
|
||||
mTvAddPlace.setEnabled(Editor.nativeShouldEnableAddPlace());
|
||||
final int editTextButtonColor =
|
||||
Editor.nativeShouldEnableEditPlace()
|
||||
|
||||
boolean shouldEnableEditPlace = Editor.nativeShouldEnableEditPlace();
|
||||
|
||||
if (shouldEnableEditPlace)
|
||||
{
|
||||
mTvEditPlace.setOnClickListener(this);
|
||||
mTvAddPlace.setOnClickListener(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
mTvEditPlace.setOnClickListener(
|
||||
(v) -> { Utils.showSnackbar(v.getContext(), v.getRootView(), R.string.place_page_too_old_to_edit); });
|
||||
mTvAddPlace.setOnClickListener(
|
||||
(v) -> { Utils.showSnackbar(v.getContext(), v.getRootView(), R.string.place_page_too_old_to_edit); });
|
||||
|
||||
CountryItem map = CountryItem.fill(MapManager.nativeGetSelectedCountry());
|
||||
|
||||
if (map.status == CountryItem.STATUS_UPDATABLE || map.status == CountryItem.STATUS_DONE
|
||||
|| map.status == CountryItem.STATUS_FAILED)
|
||||
{
|
||||
mMapTooOld.setVisibility(VISIBLE);
|
||||
MaterialButton mTvUpdateTooOldMap = mMapTooOld.findViewById(R.id.mb__update_too_old_map);
|
||||
boolean canUpdateMap = map.status != CountryItem.STATUS_DONE;
|
||||
|
||||
if (canUpdateMap)
|
||||
{
|
||||
mTvUpdateTooOldMap.setOnClickListener((v) -> {
|
||||
MapManagerHelper.warn3gAndDownload(requireActivity(), map.id, null);
|
||||
mMapTooOld.setVisibility(GONE);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
mTvUpdateTooOldMap.setVisibility(GONE);
|
||||
MaterialTextView mapTooOldDescription = mMapTooOld.findViewById(R.id.tv__map_too_old_description);
|
||||
mapTooOldDescription.setText(R.string.place_page_app_too_old_description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final int editButtonColor =
|
||||
shouldEnableEditPlace
|
||||
? ContextCompat.getColor(
|
||||
getContext(),
|
||||
UiUtils.getStyledResourceId(getContext(), com.google.android.material.R.attr.colorSecondary))
|
||||
: ContextCompat.getColor(getContext(), R.color.button_accent_text_disabled);
|
||||
final ColorStateList editStrokeButtonColor = new ColorStateList(
|
||||
new int[][]{
|
||||
new int[]{android.R.attr.state_enabled}, // enabled
|
||||
new int[]{-android.R.attr.state_enabled} // disabled
|
||||
},
|
||||
new int[]{
|
||||
ContextCompat.getColor(
|
||||
getContext(),
|
||||
UiUtils.getStyledResourceId(getContext(), com.google.android.material.R.attr.colorSecondary)),
|
||||
ContextCompat.getColor(getContext(), R.color.button_accent_text_disabled)
|
||||
});
|
||||
mTvEditPlace.setTextColor(editTextButtonColor);
|
||||
mTvAddPlace.setTextColor(editTextButtonColor);
|
||||
mTvEditPlace.setStrokeColor(editStrokeButtonColor);
|
||||
mTvAddPlace.setStrokeColor(editStrokeButtonColor);
|
||||
UiUtils.showIf(
|
||||
UiUtils.isVisible(mEditPlace) || UiUtils.isVisible(mAddPlace),
|
||||
mEditTopSpace);
|
||||
|
||||
mTvEditPlace.setTextColor(editButtonColor);
|
||||
mTvAddPlace.setTextColor(editButtonColor);
|
||||
mTvEditPlace.setStrokeColor(ColorStateList.valueOf(editButtonColor));
|
||||
mTvAddPlace.setStrokeColor(ColorStateList.valueOf(editButtonColor));
|
||||
UiUtils.showIf(UiUtils.isVisible(mEditPlace) || UiUtils.isVisible(mAddPlace), mEditTopSpace);
|
||||
}
|
||||
updateLinksView();
|
||||
updateOpeningHoursView();
|
||||
@@ -820,10 +845,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
|
||||
@@ -849,13 +873,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
|
||||
@@ -870,7 +893,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;
|
||||
@@ -878,12 +901,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
|
||||
{
|
||||
@@ -893,18 +916,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);
|
||||
@@ -913,9 +934,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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -31,7 +31,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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
10
android/app/src/main/res/drawable/info_icon.xml
Normal file
10
android/app/src/main/res/drawable/info_icon.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M453,680L513,680L513,440L453,440L453,680ZM479.98,366Q494,366 503.5,356.8Q513,347.6 513,334Q513,319.55 503.52,309.78Q494.04,300 480.02,300Q466,300 456.5,309.78Q447,319.55 447,334Q447,347.6 456.48,356.8Q465.96,366 479.98,366ZM480.27,880Q397.53,880 324.77,848.5Q252,817 197.5,762.5Q143,708 111.5,635.16Q80,562.32 80,479.5Q80,396.68 111.5,323.84Q143,251 197.5,197Q252,143 324.84,111.5Q397.68,80 480.5,80Q563.32,80 636.16,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,479.73Q880,562.47 848.5,635.23Q817,708 763,762.32Q709,816.63 636,848.32Q563,880 480.27,880ZM480.5,820Q622,820 721,720.5Q820,621 820,479.5Q820,338 721.19,239Q622.38,140 480,140Q339,140 239.5,238.81Q140,337.62 140,480Q140,621 239.5,720.5Q339,820 480.5,820ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Z"/>
|
||||
</vector>
|
||||
@@ -89,6 +89,8 @@
|
||||
android:paddingHorizontal="@dimen/margin_base"
|
||||
tools:text="Existence confirmed 1 month ago"/>
|
||||
|
||||
<include android:visibility="gone" layout="@layout/place_page_map_too_old"/>
|
||||
|
||||
<include android:visibility="gone" layout="@layout/place_page_editor"/>
|
||||
|
||||
<include android:visibility="gone" layout="@layout/place_page_add"/>
|
||||
|
||||
65
android/app/src/main/res/layout/place_page_map_too_old.xml
Normal file
65
android/app/src/main/res/layout/place_page_map_too_old.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/cv__map_too_old"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/margin_base"
|
||||
android:layout_marginTop="@dimen/margin_half"
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="@color/base_accent"
|
||||
app:cardBackgroundColor="@color/bg_cards">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/margin_base"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="@dimen/margin_base"
|
||||
app:srcCompat="@drawable/info_icon"
|
||||
app:tint="@color/base_accent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/margin_quarter"
|
||||
android:text="@string/place_page_map_too_old_title"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body2"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/tv__map_too_old_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/margin_quarter"
|
||||
android:text="@string/place_page_map_too_old_description"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/mb__update_too_old_map"
|
||||
style="@style/MwmWidget.M3.Button.Primary"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/place_page_update_too_old_map"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -903,4 +903,6 @@
|
||||
<string name="editor_submit">Saada</string>
|
||||
<string name="power_management">Toitehaldus</string>
|
||||
<string name="charge_socket_schuko">EU-sisene</string>
|
||||
<string name="prefs_speed_cameras_information">Kiiruskaamerate teavitused on nendes riikides lülitatud välja, kus seda keelab kohalik seadusandlus.</string>
|
||||
<string name="navigation_start_tts_message">"Alustan tee juhatamist, hääljuhiste keel: "</string>
|
||||
</resources>
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
<string name="delete">سِتُردن</string>
|
||||
<string name="download_maps">بارگیری نقشهها</string>
|
||||
<!-- Settings/Downloader - info for country when download fails -->
|
||||
<string name="download_has_failed">دانلود ناموفق بود، برای تلاش مجدد لمس کنید</string>
|
||||
<string name="download_has_failed">بارگیری ناکام بود، برای تلاش دوباره بِپَرماسید</string>
|
||||
<!-- Settings/Downloader - info for country which started downloading -->
|
||||
<string name="downloading">درحال دانلود…</string>
|
||||
<string name="downloading">بارگیری میشود…</string>
|
||||
<!-- Choose measurement on first launch alert - choose metric system button -->
|
||||
<string name="kilometres">کیلومتر</string>
|
||||
<!-- Choose measurement on first launch alert - choose imperial system button -->
|
||||
@@ -21,9 +21,9 @@
|
||||
<!-- View and button titles for accessibility, please also edit it in iphone/plist.txt -->
|
||||
<string name="search">جستجو</string>
|
||||
<!-- Search box placeholder text; Used when searching on the map itself, not when searching for a map -->
|
||||
<string name="search_map">جستوجوی نقشه</string>
|
||||
<string name="search_map">جستجوی نقشه</string>
|
||||
<!-- Location services are disabled by user alert - message -->
|
||||
<string name="location_is_disabled_long_text">سرویس موقعیت مکانی شما غیر فعال است. لطفا جهت کارکرد صحیح نرم افزار آن را فعال کنید.</string>
|
||||
<string name="location_is_disabled_long_text">هماینک، شما همهی سامانههای گیاگیابی را برای این دستگاه یا این برنامه ناکارا کردهاید. خواهشمند است آن را در پیکربندیها کارا کنید.</string>
|
||||
<!-- A dialog title, that warns a user that Precise Location is disabled and suggests to turn it on -->
|
||||
<string name="limited_accuracy">دقت محدود</string>
|
||||
<!-- A dialog text, that warns a user that Precise Location is disabled and suggests to turn it on -->
|
||||
|
||||
@@ -255,4 +255,10 @@
|
||||
<string name="downloader_download_map">Preuzmi kartu</string>
|
||||
<string name="downloader_delete_map">Obriši kartu</string>
|
||||
<string name="downloader_update_map">Ažuriraj kartu</string>
|
||||
<string name="dialog_routing_select_closer_end">Molimo odaberite odredišnu točku koja se nalazi bliže cesti</string>
|
||||
<string name="dialog_routing_change_intermediate">Nije moguće pronaći međutočku</string>
|
||||
<string name="dialog_routing_intermediate_not_determined">Molimo prilagodite svoju međutočku</string>
|
||||
<string name="dialog_routing_system_error">Sistemska greška</string>
|
||||
<string name="dialog_routing_application_error">Nije moguće napraviti rutu zbog greške u aplikaciji</string>
|
||||
<string name="dialog_routing_try_again">Pokušajte ponovno</string>
|
||||
</resources>
|
||||
|
||||
374
android/app/src/main/res/values-kw/strings.xml
Normal file
374
android/app/src/main/res/values-kw/strings.xml
Normal file
@@ -0,0 +1,374 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_site_url">https://comaps.app/</string>
|
||||
<string name="back">Dehweles</string>
|
||||
<string name="cancel">Hedhi</string>
|
||||
<string name="delete">Dilea</string>
|
||||
<string name="download_maps">Iskarga Mappys</string>
|
||||
<string name="kilometres">Kilometrow</string>
|
||||
<string name="miles">Mildiryow</string>
|
||||
<string name="later">Wosa henna</string>
|
||||
<string name="search">Hwilas</string>
|
||||
<string name="search_map">Hwilas Mappa</string>
|
||||
<string name="limited_accuracy">Kewerder Strothys</string>
|
||||
<string name="zoom_to_country">Diskwedhes war dhe mappa</string>
|
||||
<string name="try_again">Assayewgh Arta</string>
|
||||
<string name="about_menu_title">A-dro CoMaps</string>
|
||||
<string name="about_proposition_3">• Dhywarlinen, uskis ha kesstrothys</string>
|
||||
<string name="location_settings">Settyansow GPS</string>
|
||||
<string name="close">Degea</string>
|
||||
<string name="download">Iskarga</string>
|
||||
<string name="download_resources_continue">Mos yn dhe Mappa</string>
|
||||
<string name="download_country_ask">Iskarga %1$s? (%2$s)</string>
|
||||
<string name="update_country_ask">Nowedhi %1$s? (%2$s)</string>
|
||||
<string name="pause">Powes</string>
|
||||
<string name="continue_button">Pesyewgh</string>
|
||||
<string name="bookmarks">Lyververkys</string>
|
||||
<string name="bookmarks_and_tracks">Lyververkys ha Lerghow</string>
|
||||
<string name="name">Hanow</string>
|
||||
<string name="address">Trigva</string>
|
||||
<string name="list">Rol</string>
|
||||
<string name="settings">Settyansow</string>
|
||||
<string name="move_maps">Gwaya mappys?</string>
|
||||
<string name="measurement_units">Systemow musurans</string>
|
||||
<string name="measurement_units_summary">Dewis yntra mildiryow ha kilometrow</string>
|
||||
<string name="category_food">Gwara boos</string>
|
||||
<string name="category_transport">Karyans</string>
|
||||
<string name="category_fuel">Petrol</string>
|
||||
<string name="category_parking">Parkyans</string>
|
||||
<string name="category_hotel">Ostel</string>
|
||||
<string name="category_tourism">Tornyaseth</string>
|
||||
<string name="category_entertainment">Didhan</string>
|
||||
<string name="category_atm">Toll y\'n fos</string>
|
||||
<string name="category_children">Dy\'gol teylu</string>
|
||||
<string name="category_bank">Arghanti</string>
|
||||
<string name="category_pharmacy">Ferylva</string>
|
||||
<string name="category_hospital">Klavji</string>
|
||||
<string name="category_toilet">Attesva</string>
|
||||
<string name="category_post">Post</string>
|
||||
<string name="category_police">Kreslu</string>
|
||||
<string name="category_recycling">Eylgylghyans</string>
|
||||
<string name="category_water">Dowr</string>
|
||||
<string name="category_rv">Komodytys Karavans</string>
|
||||
<string name="description">Notennow</string>
|
||||
<string name="load_kmz_title">Ow Karga Lyververkys</string>
|
||||
<string name="bookmark_share_email_subject">Dydh da, checkyewgh ow pynn yn CoMaps!</string>
|
||||
<string name="my_position_share_email_subject">Dydh da, checkyewgh ow tyller a\'n jydh war an mappa CoMaps!</string>
|
||||
<string name="share">Kevrenna</string>
|
||||
<string name="email">Ebost</string>
|
||||
<string name="done">Gwrys</string>
|
||||
<string name="data_version">Data OpenStreetMap: %s</string>
|
||||
<string name="tracks_title">Lerghow</string>
|
||||
<string name="length">Hys</string>
|
||||
<string name="share_my_location">Kevrennewgh Ow Tyller</string>
|
||||
<string name="prefs_group_general">Settyansow mayni</string>
|
||||
<string name="prefs_group_information">Kedhlow</string>
|
||||
<string name="prefs_group_route">Navygacyon</string>
|
||||
<string name="pref_zoom_summary">Displetya war an mappa</string>
|
||||
<string name="pref_map_style_title">Fordh Nos</string>
|
||||
<string name="auto">Awtomatek</string>
|
||||
<string name="pref_map_3d_title">Gwel gemusur</string>
|
||||
<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_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>
|
||||
<string name="menu">Rol</string>
|
||||
<string name="website">Gwiasva</string>
|
||||
<string name="news">Nowodhow</string>
|
||||
<string name="panoramax">Imach Panoramax</string>
|
||||
<string name="feedback">Dasliv</string>
|
||||
<string name="rate_the_app">Breusyans an app</string>
|
||||
<string name="help">Gweres</string>
|
||||
<string name="faq">Govynnow Kemmyn</string>
|
||||
<string name="donate">Argevri</string>
|
||||
<string name="copyright">Gwirbryntyan</string>
|
||||
<string name="report_a_bug">Reportya unn kudyn</string>
|
||||
<string name="downloader_update_all_button">Nowedhi Oll</string>
|
||||
<string name="downloader_cancel_all">Dilea Oll</string>
|
||||
<string name="downloader_near_me_subtitle">Dhe dhorn</string>
|
||||
<string name="downloader_status_maps">Mappys</string>
|
||||
<string name="downloader_download_all_button">Iskarga Oll</string>
|
||||
<string name="downloader_download_map">Iskarga mappa</string>
|
||||
<string name="downloader_retry">Hwilewgh arta</string>
|
||||
<string name="downloader_delete_map">Dilea Mappa</string>
|
||||
<string name="downloader_update_map">Nowedhi Mappa</string>
|
||||
<string name="google_play_services">Servis GPS gans Google</string>
|
||||
<string name="routing_not_enough_space">Nyns eus lowr dalghuster</string>
|
||||
<string name="enable_location_services">Gallosegi Servisyow GPS mar pleg</string>
|
||||
<string name="create">Gul</string>
|
||||
<string name="red">Rudh</string>
|
||||
<string name="yellow">Melyn</string>
|
||||
<string name="blue">Blou</string>
|
||||
<string name="green">Gwyrdh</string>
|
||||
<string name="purple">Purpur</string>
|
||||
<string name="orange">Melynrudh</string>
|
||||
<string name="brown">Godhlos</string>
|
||||
<string name="pink">Kigliw</string>
|
||||
<string name="deep_purple">Rudhlas</string>
|
||||
<string name="light_blue">Glaswyn</string>
|
||||
<string name="teal">Gwerlas</string>
|
||||
<string name="lime">Gwerwyn</string>
|
||||
<string name="deep_orange">Rudhvelyn</string>
|
||||
<string name="gray">Loos</string>
|
||||
<string name="blue_gray">Glas</string>
|
||||
<string name="dialog_routing_check_gps">Checkya sinell GPS</string>
|
||||
<string name="dialog_routing_location_turn_on">Gallosegi servisyow GPS</string>
|
||||
<string name="dialog_routing_change_end">Desedha destnans</string>
|
||||
<string name="dialog_routing_system_error">Error gans an kevreyth</string>
|
||||
<string name="dialog_routing_try_again">Assayewgh arta mar pleg</string>
|
||||
<string name="not_now">Na Vynnav Lemmyn</string>
|
||||
<string name="search_select_map">Dewis Mappa</string>
|
||||
<string name="show">Showya</string>
|
||||
<string name="hide">Kudha</string>
|
||||
<string name="categories">Klassow</string>
|
||||
<string name="history">Istori</string>
|
||||
<string name="search_history_title">Istori Hwilas</string>
|
||||
<string name="clear_search">Dilea Istori Hwilas</string>
|
||||
<string name="read_in_wikipedia">Wikipedya</string>
|
||||
<string name="wikimedia_commons">Wikimedia Commons</string>
|
||||
<string name="p2p_your_location">Agas Tyller</string>
|
||||
<string name="p2p_start">Dalleth</string>
|
||||
<string name="next_button">Nessa</string>
|
||||
<string name="editor_time_add">Addya Rol Vetyansow</string>
|
||||
<string name="editor_time_delete">Dilea Rol Vetyansow</string>
|
||||
<string name="editor_time_allday">Dres an Jorna (24 ourys)</string>
|
||||
<string name="editor_time_open">Ygor</string>
|
||||
<string name="editor_time_close">Deges</string>
|
||||
<string name="editor_time_add_closed">Addya Ourys Nanegys</string>
|
||||
<string name="editor_time_title">Ourys Negys</string>
|
||||
<string name="editor_time_advanced">Fordh Avonsys</string>
|
||||
<string name="editor_time_simple">Fordh Sempel</string>
|
||||
<string name="editor_hours_closed">Ourys Nanegys</string>
|
||||
<string name="editor_correct_mistake">Ewna kammgemeryans</string>
|
||||
<string name="editor_add_select_location">Dewis Tyller</string>
|
||||
<string name="editor_report_problem_send_button">Danvon</string>
|
||||
<string name="editor_report_problem_title">Kudyn</string>
|
||||
<string name="daily">Dedhyek</string>
|
||||
<string name="twentyfour_seven">24/7</string>
|
||||
<string name="day_off_today">Deges hedhyw</string>
|
||||
<string name="day_off">Deges</string>
|
||||
<string name="closed">Deges</string>
|
||||
<string name="edit_opening_hours">Golegi ourys negys</string>
|
||||
<string name="no_osm_account">Vyth akont OpenStreetMap?</string>
|
||||
<string name="register_at_openstreetmap">Kovskrifa orth OpenStreetMap</string>
|
||||
<string name="login">Omgelmi</string>
|
||||
<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="street">Stret</string>
|
||||
<string name="house_number">Niver drehevyans</string>
|
||||
<string name="details">Manylyon</string>
|
||||
<string name="social_media">Media Socyal</string>
|
||||
<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_street">Dewis unn stret</string>
|
||||
<string name="editor_add_phone">Addya Niver Fon</string>
|
||||
<string name="level">Leur</string>
|
||||
<string name="level_value_generic">Leur: %s</string>
|
||||
<string name="downloader_update_maps">Nowedhi Mappys</string>
|
||||
<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_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>
|
||||
<string name="download_over_mobile_header">Iskarga dres unn kevren klapkodh?</string>
|
||||
<string name="error_enter_correct_house_number">Ynworra unn niver trigva ewn</string>
|
||||
<string name="editor_building_levels">Leur (ow komprehendya leur a-woles, a-der to)</string>
|
||||
<string name="editor_zip_code">Kod Post</string>
|
||||
<string name="error_enter_correct_zip_code">Ynworra unn kod post ewn</string>
|
||||
<string name="editor_other_info">Noten dhe bodhogyon OpenStreetMap (dre dhewis)</string>
|
||||
<string name="editor_more_about_osm">Moy a-dro OpenStreetMap</string>
|
||||
<string name="editor_osm_history">Agas istori golegi</string>
|
||||
<string name="editor_osm_notes">Agas notennow mappow</string>
|
||||
<string name="editor_operator">Oberador</string>
|
||||
<string name="operator">Oberador: %s</string>
|
||||
<string name="kilometers_per_hour">kdo</string>
|
||||
<string name="miles_per_hour">mdo</string>
|
||||
<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_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_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>
|
||||
<string name="delete_place_empty_comment_error">Provia an acheson rag dilea an le mar pleg</string>
|
||||
<string name="editor_business_vacant_button">Negys usi gwag</string>
|
||||
<string name="editor_mark_business_vacant_title">Sin negys dell gwag</string>
|
||||
<string name="editor_submit">Danvon</string>
|
||||
<string name="error_enter_correct_phone">Ynworra unn niver fon ewn</string>
|
||||
<string name="error_enter_correct_web">Ynworra unn trigva gwiasva ewn</string>
|
||||
<string name="error_enter_correct_email">Ynworra unn trigva ebost ewn</string>
|
||||
<string name="editor_level">Leur (0 usi leur a-woles)</string>
|
||||
<string name="error_enter_correct_level">Ynworra unn niver leur ewn</string>
|
||||
<string name="error_enter_correct_facebook_page">Ynworra unn trigva Lyverenep, akont, bo hanow folen ewn</string>
|
||||
<string name="error_enter_correct_instagram_page">Ynworra unn hanow usyer Instagram bo trigva gwiasva ewn</string>
|
||||
<string name="error_enter_correct_twitter_page">Ynworra unn hanow usyer Twytter bo trigva gwiasva ewn</string>
|
||||
<string name="error_enter_correct_vk_page">Ynworra unn hanow usyer VK bo trigva gwiasva ewn</string>
|
||||
<string name="error_enter_correct_line_page">Ynworra unn ID LINE bo trigva gwiasva ewn</string>
|
||||
<string name="error_enter_correct_fediverse_page">Ynworra unn hanow usyer Mastodon bo trigva gwiasva ewn</string>
|
||||
<string name="error_enter_correct_bluesky_page">Ynworra unn hanow usyer Bluesky bo trigva gwiasva ewn</string>
|
||||
<string name="placepage_add_place_button">Addya Le dhe OpenStreetMap</string>
|
||||
<string name="osm_note_hint">Bo, yn tereylys, skrifa unn noten dhe kemeneth OpenStreetMap, ha orth nebonan yll addya bo ewnhe unn le omma.</string>
|
||||
<string name="osm_note_toast">Noten a vydh danvon dhe OpenStreetMap</string>
|
||||
<string name="editor_share_to_all_dialog_title">A vynn\'ta mos danvon dhe oll usyoryon?</string>
|
||||
<string name="navigation_stop_button">Hedhi</string>
|
||||
<string name="track_recording">Y\'n eur ma rekordya an lergh</string>
|
||||
<string name="accept">Amyttya</string>
|
||||
<string name="decline">Nagha</string>
|
||||
<string name="mobile_data_option_today">Unn Hedhyw</string>
|
||||
<string name="traffic_update_app">Nowedhi CoMaps mar pleg</string>
|
||||
<string name="feedback_general">Dasliv Mayni</string>
|
||||
<string name="learn_more">Dyski moy</string>
|
||||
<string name="button_plan">Devisya</string>
|
||||
<string name="placepage_remove_stop">Dilea Powes</string>
|
||||
<string name="placepage_add_stop">Addya Powes</string>
|
||||
<string name="error_enter_correct_name">Ynworra unn hanow ewn mar pleg</string>
|
||||
<string name="bookmark_lists">Rolyow</string>
|
||||
<string name="bookmark_lists_hide_all">Keles oll</string>
|
||||
<string name="bookmark_lists_show_all">Diskwedhes oll</string>
|
||||
<string name="bookmarks_create_new_group">Gul unn rol nowydh</string>
|
||||
<string name="bookmarks_import">Ynperthi Lyververkys ha Lerghow</string>
|
||||
<string name="bookmarks_error_message_empty_list_name">Ynworra an hanow rol mar pleg</string>
|
||||
<string name="bookmarks_new_list_hint">Rol nowydh</string>
|
||||
<string name="bookmarks_error_title_list_name_already_taken">An hanow ma usi seulabrys yn usyans</string>
|
||||
<string name="bookmarks_error_message_list_name_already_taken">Dewis aral hanow mar pleg</string>
|
||||
<string name="please_wait">Gortos mar pleg…</string>
|
||||
<string name="phone_number">Niver fon</string>
|
||||
<string name="profile">Akont OpenStreetMap</string>
|
||||
<string name="restore">Astiveri</string>
|
||||
<string name="privacy">Privetter</string>
|
||||
<string name="privacy_policy">Polici privetter</string>
|
||||
<string name="power_management">Dyghtyans batri</string>
|
||||
<string name="terms_of_use">Termys usadow</string>
|
||||
<string name="button_layer_traffic">Data daromdak</string>
|
||||
<string name="subway">Metro</string>
|
||||
<string name="layers_title">Gisyow ha gwiskasow mappow</string>
|
||||
<string name="bookmarks_empty_list_title">An rol ma usi gwag</string>
|
||||
<string name="category_desc_more">…moy</string>
|
||||
<string name="export_file">Esperthi KMZ</string>
|
||||
<string name="export_file_gpx">Esperthi GPX</string>
|
||||
<string name="delete_list">Dilea rol</string>
|
||||
<string name="speedcams_alert_title">Kameras finweth tooth</string>
|
||||
<string name="place_description_title">Deskrifans Le</string>
|
||||
<string name="pref_tts_speedcams_auto">Gwarnya a tothya</string>
|
||||
<string name="define_to_avoid_btn">Styrya fordhow rag avodya</string>
|
||||
<string name="toll_road">Tollfordh</string>
|
||||
<string name="unpaved_road">Fordh dor</string>
|
||||
<string name="ferry_crossing">Kowbalhyns</string>
|
||||
<string name="yes">Ya</string>
|
||||
<string name="no">Na</string>
|
||||
<string name="yes_available">Ya</string>
|
||||
<string name="no_available">Na</string>
|
||||
<string name="capacity">Dalghuster: %s</string>
|
||||
<string name="network">Rosweyth: %s</string>
|
||||
<string name="trip_finished">Hwi re wrug!</string>
|
||||
<string name="ok">Da lowr</string>
|
||||
<string name="sort">Sortya…</string>
|
||||
<string name="sort_bookmarks">Sortya lyververkys</string>
|
||||
<string name="by_default">Dre defowt</string>
|
||||
<string name="by_type">Dre eghen</string>
|
||||
<string name="by_distance">Dre pellder</string>
|
||||
<string name="by_date">Dre dydh</string>
|
||||
<string name="by_name">Dre hanow</string>
|
||||
<string name="near_me_sorttype">Dhe dhorn</string>
|
||||
<string name="others_sorttype">Re erel</string>
|
||||
<string name="food_places">Boos</string>
|
||||
<string name="tourist_places">Tornyaseth</string>
|
||||
<string name="museums">Gwithtiow</string>
|
||||
<string name="parks">Parkow</string>
|
||||
<string name="swim_places">Neuvya</string>
|
||||
<string name="mountains">Menydhyow</string>
|
||||
<string name="animals">Bestes</string>
|
||||
<string name="hotels">Ostelyow</string>
|
||||
<string name="buildings">Drehevyansow</string>
|
||||
<string name="money">Mona</string>
|
||||
<string name="shops">Gwerthjiow</string>
|
||||
<string name="parkings">Parkyans</string>
|
||||
<string name="fuel_places">Petrolva</string>
|
||||
<string name="medicine">Medhegneth</string>
|
||||
<string name="search_in_the_list">Hwilas yn an rol</string>
|
||||
<string name="religious_places">Leow kryjyk</string>
|
||||
<string name="select_list">Dewis rol</string>
|
||||
<string name="transit_not_found">Navygacyon metro yn an pow ma usi nakavadow hwath</string>
|
||||
<string name="button_layer_isolines">Linen kettres</string>
|
||||
<string name="elevation_profile_min_elevation">Ughelder ispoyntel</string>
|
||||
<string name="elevation_profile_max_elevation">Ughelder ughboyntel</string>
|
||||
<string name="elevation_profile_difficulty">Kaletter</string>
|
||||
<string name="elevation_profile_distance">Pellder:</string>
|
||||
<string name="elevation_profile_time">Prys:</string>
|
||||
<string name="isolines_toast_zooms_1_10">Moghhe dhe furya linen kettres</string>
|
||||
<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="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>
|
||||
<string name="tts_info_link">https://www.comaps.app/support/tts-configuration-guide-for-android/</string>
|
||||
<string name="osm_wiki_about_url">https://wiki.openstreetmap.org/wiki/About_OpenStreetMap</string>
|
||||
<string name="comma_separated_pair">%1$s, %2$s</string>
|
||||
<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="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>
|
||||
<string name="browser_not_available">Peurell nakavadow</string>
|
||||
<string name="volume">Ughelder</string>
|
||||
<string name="bookmarks_export">Esperthi oll Lyververkys ha Lerghow</string>
|
||||
<string name="clear_the_search">Dilea an hwithrans</string>
|
||||
<string name="zoom_in">Moghhe</string>
|
||||
<string name="zoom_out">Lehe</string>
|
||||
<string name="website_menu">Kevren Rol Voos</string>
|
||||
<string name="view_menu">Vu Rol Voos</string>
|
||||
<string name="open_in_app">Ygeri yn Aral App</string>
|
||||
<string name="select_option">Dewis dewis</string>
|
||||
<string name="outdoor_seating">Esedhow yn-mes</string>
|
||||
<string name="start_track_recording">Rekordya Lergh</string>
|
||||
<string name="choose_color">Dewis Kolor</string>
|
||||
<string name="edit_track">Golegi Lergh</string>
|
||||
<string name="nav_auto">Awtomatek yn navygacyon</string>
|
||||
<string name="pref_left_button_title">Boton kledh dewisyow</string>
|
||||
<string name="backup_interval_every_day">Dedhyek</string>
|
||||
<string name="backup_interval_every_week">Seythennyek</string>
|
||||
<string name="clear">Dilea</string>
|
||||
<string name="vehicle">Karr</string>
|
||||
<string name="pedestrian">Kerdher</string>
|
||||
<string name="bicycle">Diwros</string>
|
||||
<string name="ruler">Rewlell</string>
|
||||
<string name="bookmark_color">Kolor lyververk</string>
|
||||
<string name="about_help">A-dro ha Gweres</string>
|
||||
<string name="share_track">Kevren Lergh</string>
|
||||
<string name="delete_track_dialog_title">Dilea %s?</string>
|
||||
<string name="unknown_power_output">ankoth</string>
|
||||
<string name="charge_socket_type2">Eghen diw (na fun)</string>
|
||||
<string name="charge_socket_type2_cable">Eghen diw (gans fun)</string>
|
||||
<string name="charge_socket_type2_combo">Eghen diw kesunyans</string>
|
||||
<string name="charge_socket_type1">Eghen unn</string>
|
||||
<string name="charge_socket_nacs">NACS</string>
|
||||
<string name="charge_socket_chademo">CHAdeMO</string>
|
||||
<string name="charge_socket_schuko">Unyans Europek a-bervedh</string>
|
||||
<string name="unknown_socket_type">ankoth kraw</string>
|
||||
<string name="edit_socket_info_tooltip">Gul krawyow nowydh bo golegi krowyow a‑lemmyn.</string>
|
||||
<string name="charging_station_available_sockets">Krawyow kavadow</string>
|
||||
<string name="charge_socket_unknown_other">Aral bo anokth</string>
|
||||
<string name="charge_socket_count">Somm</string>
|
||||
<string name="charge_socket_power">Gallosedh (kW)</string>
|
||||
<string name="editor_socket">Golegi kraw</string>
|
||||
<string name="unknown_count">ankoth</string>
|
||||
<string name="error_value_must_be_positive">Res an niver positiv</string>
|
||||
<string name="error_invalid_number">Niver anewn</string>
|
||||
<string name="offline_explanation_title">Mappys Dhywarlinen</string>
|
||||
</resources>
|
||||
@@ -896,4 +896,7 @@
|
||||
<string name="editor_submit">Send</string>
|
||||
<string name="charge_socket_schuko">Schuko</string>
|
||||
<string name="power_management">Strømstyring</string>
|
||||
<string name="navigation_start_tts_disabled_message">Taleveiledninger deaktivert: TTS-motor ikke tilgjengelig</string>
|
||||
<string name="navigation_start_tts_message">"Starter navigering, taleveiledningsspråk: "</string>
|
||||
<string name="prefs_speed_cameras_information">Fotoboksvarsler er deaktivert i land hvor varsler er forbudt i henhold til lokal lovgivning.</string>
|
||||
</resources>
|
||||
|
||||
@@ -909,4 +909,5 @@
|
||||
<string name="charge_socket_schuko">Binnenlandse EU</string>
|
||||
<string name="navigation_start_tts_message">"Navigatie starten, taal voor steminstructie: "</string>
|
||||
<string name="prefs_speed_cameras_information">Waarschuwingen voor flitsers zijn uitgeschakeld in landen waar deze wettelijk zijn verboden.</string>
|
||||
<string name="navigation_start_tts_disabled_message">Spraakinstructies uitgeschakeld: TTS-engine niet beschikbaar</string>
|
||||
</resources>
|
||||
|
||||
@@ -915,4 +915,7 @@
|
||||
<string name="pref_tts_no_system_tts_short">Nie znaleziono silnika text-to-speech, sprawdź ustawienia aplikacji</string>
|
||||
<string name="list_description_empty">Edytuj listę, aby dodać opis</string>
|
||||
<string name="editor_submit">Wyślij</string>
|
||||
<string name="prefs_speed_cameras_information">Ostrzeżenia o fotoradarach są wyłączone w krajach, gdzie takie alerty są zabronione prawnie.</string>
|
||||
<string name="navigation_start_tts_message">"Startowanie nawigacji, język komunikatów głosowych: "</string>
|
||||
<string name="navigation_start_tts_disabled_message">Komunikaty głosowe są wyłączone: silnik TTS jest niedostępny</string>
|
||||
</resources>
|
||||
|
||||
@@ -911,4 +911,5 @@
|
||||
<string name="charge_socket_schuko">欧盟标准</string>
|
||||
<string name="navigation_start_tts_message">"启动导航,语音指令语言: "</string>
|
||||
<string name="prefs_speed_cameras_information">在当地法律禁止发出警报的国家/地区,测速摄像头警告功能将被禁用。</string>
|
||||
<string name="navigation_start_tts_disabled_message">语音指令已禁用:TTS 引擎不可用</string>
|
||||
</resources>
|
||||
|
||||
@@ -573,6 +573,16 @@
|
||||
<string name="error_enter_correct_fediverse_page">Enter a valid Mastodon username or web address</string>
|
||||
<string name="error_enter_correct_bluesky_page">Enter a valid Bluesky username or web address</string>
|
||||
<string name="placepage_add_place_button">Add Place to OpenStreetMap</string>
|
||||
<!-- Title of info shown when the map is older than 3 to 6 months -->
|
||||
<string name="place_page_map_too_old_title">Map data outdated</string>
|
||||
<!-- Description of info shown when the map is older than 3 months -->
|
||||
<string name="place_page_map_too_old_description"> Your current map data is very old, please update the map.</string>
|
||||
<!-- Description of info shown when the app and the map are older than 6 months -->
|
||||
<string name="place_page_app_too_old_description"> Your current map data is very old, please update the CoMaps app.</string>
|
||||
<!-- Button to update map region, part of the map too old info -->
|
||||
<string name="place_page_update_too_old_map">Update map region</string>
|
||||
<!-- Toast shown after pressing add place / edit OpenStreetMap when editing is disabled -->
|
||||
<string name="place_page_too_old_to_edit">OpenStreetMap editing is disabled because the map data is too old.</string>
|
||||
<string name="osm_note_hint">Or, alternatively, leave a note to OpenStreetMap community so that someone else can add or fix a place here.</string>
|
||||
<string name="osm_note_toast">Note will be sent to OpenStreetMap</string>
|
||||
<!-- Displayed when saving some edits to the map to warn against publishing personal data -->
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1490,12 +1490,6 @@ JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeSet3dMode(JNIEnv
|
||||
g_framework->Set3dMode(allow3d, allow3dBuildings);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeSetCarScreenMode(JNIEnv * env, jclass, jboolean enabled)
|
||||
{
|
||||
if (g_framework)
|
||||
frm()->SetCarScreenMode(static_cast<bool>(enabled));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeGet3dMode(JNIEnv * env, jclass, jobject result)
|
||||
{
|
||||
bool enabled;
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -276,8 +276,6 @@ public class Framework
|
||||
|
||||
public static native void nativeSet3dMode(boolean allow3d, boolean allow3dBuildings);
|
||||
|
||||
public static native void nativeSetCarScreenMode(boolean enabled);
|
||||
|
||||
public static native boolean nativeGetAutoZoomEnabled();
|
||||
|
||||
public static native void nativeSetAutoZoomEnabled(boolean enabled);
|
||||
|
||||
@@ -4,28 +4,30 @@ package app.organicmaps.sdk.bookmarks.data;
|
||||
* represents the details of the socket available on a particular charging station
|
||||
*
|
||||
*/
|
||||
public record ChargeSocketDescriptor(String type, int count, double power) {
|
||||
|
||||
/**
|
||||
* Some charge sockets have the same visuals as other sockets, even though they are different and are tagged
|
||||
* differently in OSM. This method returns the 'visual' type that should be used for the socket.
|
||||
*
|
||||
* @return the 'equivalent' visual style that should be used for this socket
|
||||
*/
|
||||
public String visualType() {
|
||||
if (type.equals("typee")) {
|
||||
return "schuko";
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* For some sockets (eg, domestic sockets), the power is usually not provided, as it is 'implicit'
|
||||
*
|
||||
* @return true if this socket type does not require displaying the power
|
||||
*/
|
||||
public Boolean ignorePower() {
|
||||
return type.equals("typee") || type.equals("schuko");
|
||||
public record ChargeSocketDescriptor(String type, int count, double power)
|
||||
{
|
||||
/**
|
||||
* Some charge sockets have the same visuals as other sockets, even though they are different and are tagged
|
||||
* differently in OSM. This method returns the 'visual' type that should be used for the socket.
|
||||
*
|
||||
* @return the 'equivalent' visual style that should be used for this socket
|
||||
*/
|
||||
public String visualType()
|
||||
{
|
||||
if (type.equals("typee"))
|
||||
{
|
||||
return "schuko";
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* For some sockets (eg, domestic sockets), the power is usually not provided, as it is 'implicit'
|
||||
*
|
||||
* @return true if this socket type does not require displaying the power
|
||||
*/
|
||||
public Boolean ignorePower()
|
||||
{
|
||||
return type.equals("typee") || type.equals("schuko");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package app.organicmaps.sdk.editor;
|
||||
import androidx.annotation.IntRange;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import app.organicmaps.sdk.editor.data.Timespan;
|
||||
import app.organicmaps.sdk.editor.data.Timetable;
|
||||
|
||||
|
||||
@@ -2,16 +2,14 @@ package app.organicmaps.sdk.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.NonNull;
|
||||
import app.organicmaps.sdk.R;
|
||||
import java.text.DateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Locale;
|
||||
|
||||
import app.organicmaps.sdk.R;
|
||||
|
||||
public final class DateUtils
|
||||
{
|
||||
private DateUtils() {}
|
||||
@@ -44,7 +42,7 @@ public final class DateUtils
|
||||
if (days == 1)
|
||||
return resources.getString(R.string.yesterday).toLowerCase();
|
||||
if (days < 7)
|
||||
return resources.getString(R.string.days_ago, Integer.toString(days));
|
||||
return resources.getString(R.string.days_ago, Integer.toString(days));
|
||||
if (days < 30)
|
||||
return resources.getString(days < 14 ? R.string.week_ago : R.string.weeks_ago, Integer.toString(days / 7));
|
||||
if (days < 365)
|
||||
|
||||
@@ -601,31 +601,29 @@
|
||||
<string name="type.railway.monorail">مونوریل</string>
|
||||
<string name="type.railway.rail">راه آهن</string>
|
||||
<string name="type.railway.rail.highspeed">راه آهن پرسرعت</string>
|
||||
<string name="type.railway.rail.tourism">راه آهن توریستی</string>
|
||||
<string name="type.railway.rail.main">راه آهن</string>
|
||||
<string name="type.railway.rail.tourism">راهآهن گردشگرانه</string>
|
||||
<string name="type.railway.rail.main">راهآهن</string>
|
||||
<!-- Includes ordinary railway=rail w/o more specific usage= and service= tags. -->
|
||||
<string name="type.railway.rail.branch">راه آهن ثانویه</string>
|
||||
<string name="type.railway.rail.branch">اَزگ راهآهن</string>
|
||||
<!-- Non-passenger utility tracks: industrial, military, test. -->
|
||||
<string name="type.railway.rail.utility">راه آهن شهری</string>
|
||||
<string name="type.railway.rail.spur">خار راه آهن</string>
|
||||
<!-- Short service tracks: siding, yard, crossover. -->
|
||||
<string name="type.railway.rail.service">ریل کمکی</string>
|
||||
<string name="type.railway.rail.bridge">پل راه آهن</string>
|
||||
<string name="type.railway.rail.highspeed.bridge">پل راه آهن</string>
|
||||
<string name="type.railway.rail.tourism.bridge">پل راه آهن</string>
|
||||
<string name="type.railway.rail.main.bridge">پل راه آهن</string>
|
||||
<string name="type.railway.rail.branch.bridge">پل راه آهن</string>
|
||||
<string name="type.railway.rail.utility.bridge">پل راه آهن</string>
|
||||
<string name="type.railway.rail.spur.bridge">پل راه آهن</string>
|
||||
<string name="type.railway.rail.service.bridge">پل راه آهن</string>
|
||||
<string name="type.railway.rail.tunnel">تونل راه آهن</string>
|
||||
<string name="type.railway.rail.highspeed.tunnel">تونل راه آهن</string>
|
||||
<string name="type.railway.rail.tourism.tunnel">تونل راه آهن</string>
|
||||
<string name="type.railway.rail.main.tunnel">تونل راه آهن</string>
|
||||
<string name="type.railway.rail.branch.tunnel">تونل راه آهن</string>
|
||||
<string name="type.railway.rail.utility.tunnel">تونل راه آهن</string>
|
||||
<string name="type.railway.rail.spur.tunnel">تونل راه آهن</string>
|
||||
<string name="type.railway.rail.service.tunnel">تونل راه آهن</string>
|
||||
<string name="type.railway.rail.utility">سامانه راهآهن برقی</string>
|
||||
<string name="type.railway.rail.spur">شاخک راهآهن</string>
|
||||
<string name="type.railway.rail.bridge">پل راهآهن</string>
|
||||
<string name="type.railway.rail.highspeed.bridge">پل راهآهن</string>
|
||||
<string name="type.railway.rail.tourism.bridge">پل راهآهن</string>
|
||||
<string name="type.railway.rail.main.bridge">پل راهآهن</string>
|
||||
<string name="type.railway.rail.branch.bridge">پل راهآهن</string>
|
||||
<string name="type.railway.rail.utility.bridge">پل راهآهن</string>
|
||||
<string name="type.railway.rail.spur.bridge">پل راهآهن</string>
|
||||
<string name="type.railway.rail.service.bridge">پل راهآهن</string>
|
||||
<string name="type.railway.rail.tunnel">آهون راهآهن</string>
|
||||
<string name="type.railway.rail.highspeed.tunnel">آهون راهآهن</string>
|
||||
<string name="type.railway.rail.tourism.tunnel">آهون راهآهن</string>
|
||||
<string name="type.railway.rail.main.tunnel">آهون راهآهن</string>
|
||||
<string name="type.railway.rail.branch.tunnel">آهون راهآهن</string>
|
||||
<string name="type.railway.rail.utility.tunnel">آهون راهآهن</string>
|
||||
<string name="type.railway.rail.spur.tunnel">آهون راهآهن</string>
|
||||
<string name="type.railway.rail.service.tunnel">آهون راهآهن</string>
|
||||
<string name="type.railway.station">ایستگاه قطار</string>
|
||||
<string name="type.railway.station.funicular">فونیکولور</string>
|
||||
<string name="type.railway.station.light_rail">ایستگاه قطار</string>
|
||||
@@ -1071,7 +1069,7 @@
|
||||
<string name="type.wheelchair.limited">دسترسی کرانمند با رواگصندلی</string>
|
||||
<string name="type.wheelchair.no">بدون دسترسی با صندلی چرخ دار</string>
|
||||
<string name="type.wheelchair.yes">دسترسی کامل با صندلی چرخ دار</string>
|
||||
<string name="type.piste_type.snow_park">پارک برفی</string>
|
||||
<string name="type.piste_type.snow_park">بوستان برفی</string>
|
||||
<string name="type.piste_type.hike">مسیر پیاده روی برفی</string>
|
||||
<string name="type.piste_type.connection">اتصال پیست</string>
|
||||
<string name="type.piste_type.skitour">مسیر اسکیتور</string>
|
||||
|
||||
212
android/sdk/src/main/res/values-kw/types_strings.xml
Normal file
212
android/sdk/src/main/res/values-kw/types_strings.xml
Normal file
@@ -0,0 +1,212 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="type.addr_interpolation">Trigva</string>
|
||||
<string name="type.addr_interpolation.even">Trigva</string>
|
||||
<string name="type.addr_interpolation.odd">Trigva</string>
|
||||
<string name="type.aerialway.chair_lift">Kador-yskynna</string>
|
||||
<string name="type.aeroway.aerodrome">Ayrborth</string>
|
||||
<string name="type.aeroway.aerodrome.international">Ayrborth Keswlasek</string>
|
||||
<string name="type.aeroway.apron">Ayrborth Apron</string>
|
||||
<string name="type.aeroway.gate">Ayrborth Porth</string>
|
||||
<string name="type.aeroway.helipad">Le Tirans Askel Dro</string>
|
||||
<string name="type.aeroway.runway">Hyns-tira</string>
|
||||
<string name="type.aeroway.terminal">Termynal</string>
|
||||
<string name="type.amenity.arts_centre">Kresen-art</string>
|
||||
<string name="type.amenity.atm">Toll y\'n Fos</string>
|
||||
<string name="type.amenity.bank">Arghanti</string>
|
||||
<string name="type.amenity.bar">Barr</string>
|
||||
<string name="type.amenity.bbq">Rastella Barbakoa</string>
|
||||
<string name="type.amenity.bench">Form</string>
|
||||
<string name="type.amenity.bicycle_parking">Parkyans Diwros</string>
|
||||
<string name="type.amenity.bicycle_parking.covered">Parkyans Kdhys Diwros</string>
|
||||
<string name="type.amenity.boat_rental">Arveth Skath</string>
|
||||
<string name="type.amenity.bicycle_rental">Arveth Diwros</string>
|
||||
<string name="type.amenity.bicycle_repair_station">Ewnansva Diwros</string>
|
||||
<string name="type.amenity.biergarten">Jardin Korev</string>
|
||||
<string name="type.amenity.brothel">Horji</string>
|
||||
<string name="type.amenity.love_hotel">Ostel Karnal</string>
|
||||
<string name="type.amenity.bureau_de_change">Keschanj Arghansedh</string>
|
||||
<string name="type.amenity.bus_station">Gorsav Kyttrin</string>
|
||||
<string name="type.amenity.cafe">Koffiji</string>
|
||||
<string name="type.amenity.car_rental">Arveth Karr</string>
|
||||
<string name="type.amenity.motorcycle_rental">Arveth Jynn Diwros</string>
|
||||
<string name="type.amenity.car_wash">Golghva Gerri</string>
|
||||
<string name="type.man_made.telescope">Pellweler</string>
|
||||
<string name="type.man_made.telescope.radio">Pellweler (Radyo)</string>
|
||||
<string name="type.man_made.observatory">Mirji</string>
|
||||
<string name="type.amenity.childcare">Skol-veythrin</string>
|
||||
<string name="type.amenity.cinema">Cinema</string>
|
||||
<string name="type.amenity.studio">Studhla Media</string>
|
||||
<string name="type.amenity.clinic">Medhegva</string>
|
||||
<string name="type.amenity.college">Kolji</string>
|
||||
<string name="type.amenity.community_centre">Kresen Gemeneth</string>
|
||||
<string name="type.amenity.conference_centre">Kresen Keskussulyans</string>
|
||||
<string name="type.amenity.courthouse">Stevel an Lys</string>
|
||||
<string name="type.amenity.dentist">Medhek Dens</string>
|
||||
<string name="type.amenity.doctors">Medhek</string>
|
||||
<string name="type.amenity.drinking_water">Dowr Evadow</string>
|
||||
<string name="type.drinking_water.yes">Dowr Evadow</string>
|
||||
<string name="type.amenity.exhibition_centre">Kresen Diskwedhyans</string>
|
||||
<string name="type.amenity.money_transfer">Treusworrans Mona</string>
|
||||
<string name="type.amenity.music_school">Skol-ilowek</string>
|
||||
<string name="type.amenity.flight_school">Skol Ayr</string>
|
||||
<string name="type.amenity.language_school">Skol Tavas</string>
|
||||
<string name="type.office.diplomatic">Kanatti</string>
|
||||
<string name="type.office.security">Buro Gwithyas Diogeledh</string>
|
||||
<string name="type.building.guardhouse">Borth Gwithyas Diogeledh</string>
|
||||
<string name="type.power.portal">Portal Tredan</string>
|
||||
<string name="type.amenity.fast_food">Boos Uskis</string>
|
||||
<string name="type.amenity.ferry_terminal">Kowbal</string>
|
||||
<string name="type.amenity.fire_station">Tanlu</string>
|
||||
<string name="type.amenity.fountain">Fenten</string>
|
||||
<string name="type.amenity.fuel">Petrolva</string>
|
||||
<string name="type.amenity.grave_yard">Bedhros</string>
|
||||
<string name="type.amenity.grave_yard.christian">Bedhros Kristyon</string>
|
||||
<string name="type.amenity.hospital">Klavji</string>
|
||||
<string name="type.amenity.ice_cream">Dehen Rew</string>
|
||||
<string name="type.amenity.internet_cafe">Koffiji Kesrosweyth</string>
|
||||
<string name="type.amenity.kindergarten">Floghva</string>
|
||||
<string name="type.amenity.library">Lyverva</string>
|
||||
<string name="type.amenity.loading_dock">Kay Dalgarga</string>
|
||||
<string name="type.amenity.luggage_locker">Amari Fardellow</string>
|
||||
<string name="type.amenity.marketplace">Tyller Marghas</string>
|
||||
<string name="type.amenity.motorcycle_parking">Parkyans Jynn Diwros</string>
|
||||
<string name="type.amenity.nightclub">Kist Nos</string>
|
||||
<string name="type.amenity.parking">Parkyans</string>
|
||||
<string name="type.amenity.parking.fee">Parkyans</string>
|
||||
<string name="type.amenity.parking.multi.storey">Parkyans Liesleur</string>
|
||||
<string name="type.amenity.parking.multi.storey.fee">Parkyans Liesleur</string>
|
||||
<string name="type.amenity.parking.no.access">Parkyans Privedh</string>
|
||||
<string name="type.amenity.parking.permissive">Parkyans Privedh</string>
|
||||
<string name="type.amenity.parking.private">Parkyans Privedh</string>
|
||||
<string name="type.amenity.parking.park_and_ride">Parkyans Parkya hag Ehwias</string>
|
||||
<string name="type.amenity.parking.underground">Parkyans yn-dann dhor</string>
|
||||
<string name="type.amenity.parking.underground.fee">Parkyans yn-dann dhor</string>
|
||||
<string name="type.amenity.parking.underground.private">Parkyans privedh yn-dann dhor</string>
|
||||
<string name="type.amenity.parking_entrance">Entrans Parkyans</string>
|
||||
<string name="type.amenity.parking_entrance.private">Entrans Privedh Parkyans</string>
|
||||
<string name="type.amenity.parking_entrance.permissive">Entrans Parkyans</string>
|
||||
<string name="type.amenity.pharmacy">Ferylva</string>
|
||||
<string name="type.amenity.place_of_worship.buddhist">Eglos Teg Bouddiek</string>
|
||||
<string name="type.amenity.place_of_worship.christian">Eglos</string>
|
||||
<string name="type.amenity.place_of_worship.jewish">Synaga</string>
|
||||
<string name="type.amenity.place_of_worship.muslim">Mosk</string>
|
||||
<string name="type.amenity.police">Kreslu</string>
|
||||
<string name="type.amenity.post_office">Chei Post</string>
|
||||
<string name="type.amenity.prison">Prison</string>
|
||||
<string name="type.amenity.pub">Barr</string>
|
||||
<string name="type.amenity.public_bookcase">Keschanj Lyver</string>
|
||||
<string name="type.amenity.recycling.centre">Kresen Eylgylghyans</string>
|
||||
<string name="type.amenity.recycling">Kofen Eylgylghyans</string>
|
||||
<string name="type.amenity.recycling.container">Kofen Eylgylghyans</string>
|
||||
<string name="type.recycling.batteries">Batriow</string>
|
||||
<string name="type.recycling.clothes">Dillas</string>
|
||||
<string name="type.recycling.glass_bottles">Botellow Gweder</string>
|
||||
<string name="type.recycling.paper">Paper</string>
|
||||
<string name="type.recycling.plastic">Plastek</string>
|
||||
<string name="type.recycling.plastic_bottles">Botellow Plastek</string>
|
||||
<string name="type.recycling.scrap_metal">Wast Alkan</string>
|
||||
<string name="type.recycling.small_appliances">Wast Elektronek</string>
|
||||
<string name="type.recycling.cardboard">Pasbord</string>
|
||||
<string name="type.recycling.cans">Kannys</string>
|
||||
<string name="type.recycling.shoes">Eskisyow</string>
|
||||
<string name="type.recycling.green_waste">Lygennow</string>
|
||||
<string name="type.amenity.restaurant">Bosti</string>
|
||||
<string name="type.amenity.school">Skol</string>
|
||||
<string name="type.amenity.shelter">Skovva</string>
|
||||
<string name="type.amenity.shelter.public_transport">Skovva</string>
|
||||
<string name="type.amenity.public_bath">Bath Poblek</string>
|
||||
<string name="type.amenity.shower">Kowas</string>
|
||||
<string name="type.amenity.telephone">Fon</string>
|
||||
<string name="type.amenity.theatre">Gwariji</string>
|
||||
<string name="type.amenity.toilets">Attesva</string>
|
||||
<string name="type.toilets.yes">Attesva</string>
|
||||
<string name="type.amenity.townhall">Odyans</string>
|
||||
<string name="type.amenity.university">Pennskol</string>
|
||||
<string name="type.amenity.vending_machine.public_transport_tickets">Jynn Tokyn</string>
|
||||
<string name="type.amenity.parcel_locker">Amari Fardel</string>
|
||||
<string name="type.amenity.vehicle_inspection">Hwithrans Karr</string>
|
||||
<string name="type.amenity.vending_machine.fuel">Pomp Petrol</string>
|
||||
<string name="type.amenity.veterinary">Medhek Bestes</string>
|
||||
<string name="type.amenity.animal_shelter">Gredi</string>
|
||||
<string name="type.amenity.waste_basket">Argh</string>
|
||||
<string name="type.amenity.waste_disposal">Argh Bras</string>
|
||||
<string name="type.barrier">Lett</string>
|
||||
<string name="type.barrier.yes">Lett</string>
|
||||
<string name="type.barrier.block">Stock</string>
|
||||
<string name="type.barrier.border_control">Amalborth</string>
|
||||
<string name="type.barrier.chain">Chayn</string>
|
||||
<string name="type.barrier.city_wall">Fos Cita</string>
|
||||
<string name="type.barrier.cycle_barrier">Lett Diwros</string>
|
||||
<string name="type.waterway.ditch">Kleys</string>
|
||||
<string name="type.barrier.entrance">Entrans</string>
|
||||
<string name="type.barrier.fence">Ke</string>
|
||||
<string name="type.barrier.guard_rail">Kledhren</string>
|
||||
<string name="type.barrier.gate">Porth</string>
|
||||
<string name="type.barrier.hedge">Ke</string>
|
||||
<string name="type.barrier.kissing_gate">Porth Amm</string>
|
||||
<string name="type.barrier.stile">Kammva</string>
|
||||
<string name="type.barrier.wicket_gate">Porth Darasik</string>
|
||||
<string name="type.barrier.toll_booth">Tollva</string>
|
||||
<string name="type.barrier.wall">Fos</string>
|
||||
<string name="type.boundary">Or</string>
|
||||
<string name="type.boundary.administrative">Or Menystrek</string>
|
||||
<string name="type.boundary.administrative.2">Or Kenedhlegi</string>
|
||||
<string name="type.boundary.administrative.3">Or Ranndirek</string>
|
||||
<string name="type.boundary.administrative.4">Or Ranndirek</string>
|
||||
<string name="type.boundary.national_park">Park Kenedhlek</string>
|
||||
<string name="type.boundary.aboriginal_lands">Tir Teythiek</string>
|
||||
<string name="type.building">Drehevyans</string>
|
||||
<string name="type.building.address">Trigva</string>
|
||||
<string name="type.building.has_parts">Drehevyans</string>
|
||||
<string name="type.building_part">Drehevyans</string>
|
||||
<string name="type.building.garage">Karrji</string>
|
||||
<string name="type.building.train_station">Drehevyans Gorsav</string>
|
||||
<string name="type.building.warehouse">Gwaraji</string>
|
||||
<string name="type.cemetery.grave">Bedh</string>
|
||||
<string name="type.craft">Kreft</string>
|
||||
<string name="type.craft.blacksmith">Ferror</string>
|
||||
<string name="type.craft.carpenter">Karpenter</string>
|
||||
<string name="type.craft.electrician">Tredaner</string>
|
||||
<string name="type.craft.electronics_repair">Ewnans Tredanegek</string>
|
||||
<string name="type.craft.gardener">Lowarther</string>
|
||||
<string name="type.craft.handicraft">Dornweyth</string>
|
||||
<string name="type.craft.metal_construction">Gweythor Alkan</string>
|
||||
<string name="type.craft.painter">Payntyer</string>
|
||||
<string name="type.craft.photographer">Skeusenner</string>
|
||||
<string name="type.shop.camera">Gwerthji Kamera</string>
|
||||
<string name="type.craft.plumber">Plommer</string>
|
||||
<string name="type.craft.shoemaker">Ewnans Eskis</string>
|
||||
<string name="type.craft.winery">Gwinyer</string>
|
||||
<string name="type.craft.tailor">Tregher</string>
|
||||
<string name="type.cuisine.african">afrikan</string>
|
||||
<string name="type.cuisine.american">amerikanek</string>
|
||||
<string name="type.cuisine.arab">arabek</string>
|
||||
<string name="type.cuisine.argentinian">arghantinek</string>
|
||||
<string name="type.cuisine.asian">asiek</string>
|
||||
<string name="type.cuisine.austrian">ostrian</string>
|
||||
<string name="type.cuisine.barbecue">Barbakoa</string>
|
||||
<string name="type.cuisine.beef_bowl">Bolla Bewin</string>
|
||||
<string name="type.cuisine.brazilian">brasiliek</string>
|
||||
<string name="type.cuisine.breakfast">Hansel</string>
|
||||
<string name="type.cuisine.bubble_tea">Te Hwethen</string>
|
||||
<string name="type.cuisine.burger">Borger</string>
|
||||
<string name="type.cuisine.cake">Tesen</string>
|
||||
<string name="type.cuisine.chicken">Kig Yar</string>
|
||||
<string name="type.cuisine.chinese">chinek</string>
|
||||
<string name="type.cuisine.coffee_shop">Koffi</string>
|
||||
<string name="type.cuisine.croatian">kroatek</string>
|
||||
<string name="type.cuisine.curry">Kurri</string>
|
||||
<string name="type.cuisine.donut">Knowen Doos</string>
|
||||
<string name="type.cuisine.ethiopian">ethiopek</string>
|
||||
<string name="type.cuisine.fine_dining">Dybri Brav</string>
|
||||
<string name="type.cuisine.fish">Pysk</string>
|
||||
<string name="type.cuisine.fish_and_chips">Asklotti</string>
|
||||
<string name="type.cuisine.french">frynkek</string>
|
||||
<string name="type.cuisine.georgian">jorjiek</string>
|
||||
<string name="type.cuisine.german">almaynek</string>
|
||||
<string name="type.cuisine.greek">grek</string>
|
||||
<string name="type.cuisine.grill">Rastell</string>
|
||||
<string name="type.cuisine.hungarian">hungarek</string>
|
||||
<string name="type.cuisine.ice_cream">Dehen Rew</string>
|
||||
</resources>
|
||||
@@ -148,11 +148,11 @@
|
||||
<ul class="license-list">
|
||||
<li><a href="https://agg.sourceforge.net/antigrain.com/index.html">Anti-Grain Geometry</a><br>© 2002–2005 Maxim Shemanarev; <a href="#agg-license" class="license">License</a></li>
|
||||
|
||||
<li><a href="https://www.boost.org/">Boost</a>; <a href="#boost-license" class="license">Boost License</a></li>
|
||||
<li><a href="https://www.boost.org">Boost</a>; <a href="#boost-license" class="license">Boost License</a></li>
|
||||
|
||||
<li><a href="https://www.daemonology.net/bsdiff/">bsdiff</a>; <a href="#bsd3-license" class="license">BSD License</a></li>
|
||||
<li><a href="https://www.daemonology.net/bsdiff">bsdiff</a>; <a href="#bsd3-license" class="license">BSD License</a></li>
|
||||
|
||||
<li><a href="https://chromium.googlesource.com/chromium/src/courgette/">Chromium's Courgette</a>;
|
||||
<li><a href="https://chromium.googlesource.com/chromium/src/courgette">Chromium's Courgette</a>;
|
||||
<a href="#bsd3-license" class="license">BSD License</a></li>
|
||||
|
||||
<li><a href="https://github.com/dpogue/CMake-MetalShaderSupport">CMake Metal support files</a><br>
|
||||
@@ -170,22 +170,22 @@
|
||||
<li><a href="https://www.freetype.org">FreeType</a><br>
|
||||
© 2013 The FreeType Project; <a href="#freetype-license" class="license">FTL</a></li>
|
||||
|
||||
<li><a href="https://stephenberry.github.io/glaze/">glaze</a><br>
|
||||
<li><a href="https://stephenberry.github.io/glaze">glaze</a><br>
|
||||
© 2019 - present, Stephen Berry; <a href="#mit-license" class="license">MIT License</a></li>
|
||||
|
||||
<li><a href="https://www.glfw.org/">GLFW</a><br>
|
||||
<li><a href="https://www.glfw.org">GLFW</a><br>
|
||||
© 2002-2006 Marcus Geelnard;2006-2019 Camilla Löwy; <a href="#zlib-license" class="license">Zlib License</a></li>
|
||||
|
||||
<li><a href="https://www.g-truc.net/project-0016.html">GLM</a><br>
|
||||
© 2005–2014 G-Truc Creation; <a href="#mit-license" class="license">MIT License</a></li>
|
||||
|
||||
<li><a href="https://site.icu-project.org/">ICU</a><br>
|
||||
<li><a href="https://site.icu-project.org">ICU</a><br>
|
||||
© 1995–2016 IBM Corporation and others; <a href="#icu-license" class="license">ICU License</a></li>
|
||||
|
||||
<li><a href="https://www.digip.org/jansson/">Jansson</a><br>
|
||||
<li><a href="https://www.digip.org/jansson">Jansson</a><br>
|
||||
© 2009-2013 Petri Lehtinen; <a href="#mit-license" class="license">MIT License</a></li>
|
||||
|
||||
<li><a href="https://libkdtree.alioth.debian.org/">libkdtree++</a><br>
|
||||
<li><a href="https://libkdtree.alioth.debian.org">libkdtree++</a><br>
|
||||
© 2004-2007 Martin F. Krafft, parts are © 2004-2008 Paul Harris and © 2007-2008 Sylvain Bougerel; <a href="#artistic-license" class="license">Artistic License</a></li>
|
||||
|
||||
<li><a href="https://github.com/mapsme/omim">MAPS.ME</a><br>
|
||||
@@ -215,7 +215,7 @@
|
||||
<li><a href="https://github.com/googlesamples/android-vulkan-tutorials">Vulkan Wrapper</a><br>
|
||||
© 2016 Google Inc.; <a href="#apache2-license" class="license">Apache License</a></li>
|
||||
|
||||
<li class="android"><a href="https://cocosw.com/BottomSheet/">BottomSheet</a><br>
|
||||
<li class="android"><a href="https://cocosw.com/BottomSheet">BottomSheet</a><br>
|
||||
© 2011, 2015 Kai Liao; <a href="#apache2-license" class="license">Apache License</a></li>
|
||||
|
||||
<li><a href="https://github.com/google/open-location-code">Open Location Code</a><br>
|
||||
@@ -226,6 +226,9 @@
|
||||
|
||||
<li><a href="https://github.com/skarupke/flat_hash_map">Skarupke Hash Tables</a><br>
|
||||
© Malte Skarupke 2017; <a href="#boost-license" class="license">Boost License</a></li>
|
||||
|
||||
<li><a href="https://github.com/martinus/unordered_dense"></a><br>
|
||||
© 2022 Martin Leitner-Ankerl; <a href="#mit-license" class="license">MIT License</a></li>
|
||||
</ul>
|
||||
|
||||
<p lang="en">Beyond OpenStreetMap, we also use a few other open data sources to improve our map data:</p>
|
||||
|
||||
@@ -484,5 +484,18 @@
|
||||
"Iraq_North":"اپاختر اراک",
|
||||
"Iran_East Description":"مشهد، زاهدان، یزد",
|
||||
"Iran_North Description":"تهران، کرج، تبریز",
|
||||
"Iran_South Description":"اسپهان، شیراز، اهواز"
|
||||
"Iran_South Description":"اسپهان، شیراز، اهواز",
|
||||
"Japan_Kinki Region_Osaka_Osaka":"اوساکا",
|
||||
"Japan_Kinki Region_Osaka_West":"اوساکا — خاور",
|
||||
"Lithuania_East":"لیتوانی — باختر",
|
||||
"Lithuania_West":"لیتوانی — خاور",
|
||||
"Mexico_Chihuahua":"چیواوا",
|
||||
"Mexico_Sonora":"سونورا",
|
||||
"Nepal_Kathmandu":"کاتماندو",
|
||||
"Nigeria_North":"نیجریه — اپاختر",
|
||||
"Nigeria_South":"نیجریه — اواخشتر",
|
||||
"Norway_Hordaland":"هوردالاند",
|
||||
"Norway_Nordland":"نوردلاند",
|
||||
"Peru_Lima":"لیما",
|
||||
"Portugal_Islands":"گزیرگهای پرتغال"
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ Below are our specific (but not all!) exceptions to the Google's coding standard
|
||||
- We ARE using C++ exceptions.
|
||||
- We are using all features of C++17 and C++23 except `std::filesystem`, `std::to_chars`, `std::from_chars` and `std::format` which are not fully supported on all platforms.
|
||||
- We try to limit the usage of boost libraries which require linking (and prefer C++23 types over their boost counterparts).
|
||||
- Do not use `std::unordered_map` for hashmaps. Use `ankerl::unordered_dense::map` (from `3party/ankerl/unordered_dense.h`). When dealing with integers and not iterating, use `ska::flat_hash_map`.
|
||||
- Use `ankerl::unordered_dense::set` instead of `std::unordered_set`.
|
||||
|
||||
Naming and formatting
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "generator/collector_interface.hpp"
|
||||
|
||||
#include <unordered_map>
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
namespace generator
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
std::unordered_map<uint64_t, AddressInfo> m_addresses;
|
||||
ankerl::unordered_dense::map<uint64_t, AddressInfo> m_addresses;
|
||||
|
||||
public:
|
||||
void Add(feature::FeatureBuilder const & fb);
|
||||
@@ -44,7 +44,7 @@ class AddressesCollector : public CollectorInterface
|
||||
uint64_t m_beg, m_end;
|
||||
};
|
||||
// OSM Way ID is a key here.
|
||||
std::unordered_map<uint64_t, WayInfo> m_interpolWays;
|
||||
ankerl::unordered_dense::map<uint64_t, WayInfo> m_interpolWays;
|
||||
|
||||
public:
|
||||
explicit AddressesCollector(std::string const & filename);
|
||||
|
||||
@@ -133,7 +133,7 @@ template <typename T>
|
||||
std::vector<std::string> GetHonestAffiliations(T && t, IndexSharedPtr const & index)
|
||||
{
|
||||
std::vector<std::string> affiliations;
|
||||
std::unordered_set<borders::CountryPolygons const *> countires;
|
||||
ankerl::unordered_dense::set<borders::CountryPolygons const *> countires;
|
||||
ForEachPoint(t, [&](auto const & point)
|
||||
{
|
||||
std::vector<CountriesFilesIndexAffiliation::Value> values;
|
||||
@@ -196,7 +196,7 @@ CountriesFilesIndexAffiliation::CountriesFilesIndexAffiliation(std::string const
|
||||
: CountriesFilesAffiliation(borderPath, haveBordersForWholeWorld)
|
||||
{
|
||||
static std::mutex cacheMutex;
|
||||
static std::unordered_map<std::string, std::shared_ptr<Tree>> cache;
|
||||
static ankerl::unordered_dense::map<std::string, std::shared_ptr<Tree>> cache;
|
||||
auto const key = borderPath + std::to_string(haveBordersForWholeWorld);
|
||||
|
||||
std::lock_guard<std::mutex> lock(cacheMutex);
|
||||
@@ -228,7 +228,7 @@ std::vector<std::string> CountriesFilesIndexAffiliation::GetAffiliations(m2::Poi
|
||||
std::shared_ptr<CountriesFilesIndexAffiliation::Tree> CountriesFilesIndexAffiliation::BuildIndex(
|
||||
std::vector<m2::RectD> const & net)
|
||||
{
|
||||
std::unordered_map<borders::CountryPolygons const *, std::vector<m2::RectD>> countriesRects;
|
||||
ankerl::unordered_dense::map<borders::CountryPolygons const *, std::vector<m2::RectD>> countriesRects;
|
||||
std::mutex countriesRectsMutex;
|
||||
std::vector<Value> treeCells;
|
||||
std::mutex treeCellsMutex;
|
||||
|
||||
@@ -262,7 +262,7 @@ CountryPolygonsCollection const & GetOrCreateCountryPolygonsTree(std::string con
|
||||
{
|
||||
/// @todo Are there many different paths with polygons, that we have to store map?
|
||||
static std::mutex mutex;
|
||||
static std::unordered_map<std::string, CountryPolygonsCollection> countriesMap;
|
||||
static ankerl::unordered_dense::map<std::string, CountryPolygonsCollection> countriesMap;
|
||||
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
auto const it = countriesMap.find(baseDir);
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#include "geometry/tree4d.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
#define BORDERS_DIR "borders/"
|
||||
#define BORDERS_EXTENSION ".poly"
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
template <typename ToDo>
|
||||
void ForEachCountryInRect(m2::RectD const & rect, ToDo && toDo) const
|
||||
{
|
||||
std::unordered_set<CountryPolygons const *> uniq;
|
||||
ankerl::unordered_dense::set<CountryPolygons const *> uniq;
|
||||
m_regionsTree.ForEachInRect(rect, [&](CountryPolygons const & cp)
|
||||
{
|
||||
if (uniq.insert(&cp).second)
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
|
||||
private:
|
||||
m4::Tree<std::reference_wrapper<CountryPolygons const>> m_regionsTree;
|
||||
std::unordered_map<std::string, CountryPolygons> m_countryPolygonsMap;
|
||||
ankerl::unordered_dense::map<std::string, CountryPolygons> m_countryPolygonsMap;
|
||||
};
|
||||
|
||||
using PolygonsList = std::vector<Polygon>;
|
||||
|
||||
@@ -15,10 +15,12 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
namespace generator
|
||||
{
|
||||
using base::GeoObjectId;
|
||||
using std::pair, std::string, std::unordered_map, std::vector;
|
||||
using std::pair, std::string, ankerl::unordered_dense::map, std::vector;
|
||||
|
||||
DECLARE_EXCEPTION(ParsingError, RootException);
|
||||
|
||||
@@ -42,7 +44,7 @@ static void ParseFeatureToBrand(json_t * root, string const & field, GeoObjectId
|
||||
}
|
||||
}
|
||||
|
||||
void ParseTranslations(json_t * root, std::set<string> const & keys, unordered_map<uint32_t, string> & idToKey)
|
||||
void ParseTranslations(json_t * root, std::set<string> const & keys, map<uint32_t, string> & idToKey)
|
||||
{
|
||||
string const empty;
|
||||
auto getKey = [&](string & translation) -> string const &
|
||||
@@ -81,8 +83,7 @@ void ParseTranslations(json_t * root, std::set<string> const & keys, unordered_m
|
||||
}
|
||||
}
|
||||
|
||||
bool LoadBrands(string const & brandsFilename, string const & translationsFilename,
|
||||
unordered_map<GeoObjectId, string> & brands)
|
||||
bool LoadBrands(string const & brandsFilename, string const & translationsFilename, map<GeoObjectId, string> & brands)
|
||||
{
|
||||
string jsonBuffer;
|
||||
try
|
||||
@@ -126,7 +127,7 @@ bool LoadBrands(string const & brandsFilename, string const & translationsFilena
|
||||
return false;
|
||||
}
|
||||
|
||||
unordered_map<uint32_t, string> idToKey;
|
||||
map<uint32_t, string> idToKey;
|
||||
try
|
||||
{
|
||||
base::Json root(jsonBuffer.c_str());
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
#include "base/geo_object_id.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
namespace generator
|
||||
{
|
||||
@@ -52,5 +53,5 @@ namespace generator
|
||||
// name is "Сабвей", then "Сабвэй".
|
||||
|
||||
bool LoadBrands(std::string const & brandsFilename, std::string const & translationsFilename,
|
||||
std::unordered_map<base::GeoObjectId, std::string> & brands);
|
||||
ankerl::unordered_dense::map<base::GeoObjectId, std::string> & brands);
|
||||
} // namespace generator
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "3party/skarupke/flat_hash_map.hpp"
|
||||
|
||||
namespace generator
|
||||
{
|
||||
namespace cells_merger
|
||||
@@ -67,7 +68,7 @@ private:
|
||||
m2::RectD Union(m2::PointI const & startXy);
|
||||
void Remove(m2::PointI const & minXy, m2::PointI const & maxXy);
|
||||
|
||||
std::map<m2::PointI, CellWrapper> m_matrix;
|
||||
ska::flat_hash_map<m2::PointI, CellWrapper> m_matrix;
|
||||
int32_t m_maxX = 0;
|
||||
int32_t m_maxY = 0;
|
||||
};
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
#include "base/logging.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
#include "defines.hpp"
|
||||
|
||||
namespace generator
|
||||
@@ -60,7 +61,7 @@ bool BuildCitiesBoundaries(string const & dataPath, BoundariesTable & table, Map
|
||||
|
||||
bool BuildCitiesBoundaries(string const & dataPath, OsmIdToBoundariesTable & table)
|
||||
{
|
||||
std::unordered_map<uint32_t, base::GeoObjectId> mapping;
|
||||
ankerl::unordered_dense::map<uint32_t, base::GeoObjectId> mapping;
|
||||
if (!ParseFeatureIdToOsmIdMapping(dataPath + OSM2FEATURE_FILE_EXTENSION, mapping))
|
||||
{
|
||||
LOG(LERROR, ("Can't parse feature id to osm id mapping."));
|
||||
@@ -71,7 +72,7 @@ bool BuildCitiesBoundaries(string const & dataPath, OsmIdToBoundariesTable & tab
|
||||
|
||||
bool BuildCitiesBoundariesForTesting(string const & dataPath, TestIdToBoundariesTable & table)
|
||||
{
|
||||
std::unordered_map<uint32_t, uint64_t> mapping;
|
||||
ankerl::unordered_dense::map<uint32_t, uint64_t> mapping;
|
||||
if (!ParseFeatureIdToTestIdMapping(dataPath, mapping))
|
||||
{
|
||||
LOG(LERROR, ("Can't parse feature id to test id mapping."));
|
||||
|
||||
@@ -6,21 +6,18 @@
|
||||
#include "indexer/data_header.hpp"
|
||||
#include "indexer/feature_to_osm.hpp"
|
||||
|
||||
#include "search/categories_cache.hpp"
|
||||
#include "search/cbv.hpp"
|
||||
#include "search/localities_source.hpp"
|
||||
#include "search/mwm_context.hpp"
|
||||
|
||||
#include "coding/file_writer.hpp"
|
||||
#include "coding/files_container.hpp"
|
||||
|
||||
#include "base/cancellable.hpp"
|
||||
#include "base/checked_cast.hpp"
|
||||
#include "base/geo_object_id.hpp"
|
||||
#include "base/logging.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
#include "defines.hpp"
|
||||
|
||||
@@ -40,7 +37,7 @@ bool IsWorldMwm(std::string const & path)
|
||||
}
|
||||
|
||||
void WriteCitiesIdsSectionToFile(std::string const & dataPath,
|
||||
std::unordered_map<uint32_t, base::GeoObjectId> const & mapping)
|
||||
ankerl::unordered_dense::map<uint32_t, base::GeoObjectId> const & mapping)
|
||||
{
|
||||
indexer::FeatureIdToGeoObjectIdBimapMem map;
|
||||
auto const localities = generator::GetLocalities(dataPath);
|
||||
@@ -89,7 +86,7 @@ bool BuildCitiesIds(std::string const & dataPath, std::string const & osmToFeatu
|
||||
|
||||
classificator::Load();
|
||||
|
||||
std::unordered_map<uint32_t, base::GeoObjectId> mapping;
|
||||
ankerl::unordered_dense::map<uint32_t, base::GeoObjectId> mapping;
|
||||
if (!ParseFeatureIdToOsmIdMapping(osmToFeaturePath, mapping))
|
||||
{
|
||||
LOG(LERROR, ("Can't parse feature id to osm id mapping."));
|
||||
@@ -104,11 +101,11 @@ bool BuildCitiesIdsForTesting(std::string const & dataPath)
|
||||
{
|
||||
CHECK(IsWorldMwm(dataPath), ());
|
||||
|
||||
std::unordered_map<uint32_t, uint64_t> mapping;
|
||||
ankerl::unordered_dense::map<uint32_t, uint64_t> mapping;
|
||||
if (!ParseFeatureIdToTestIdMapping(dataPath, mapping))
|
||||
return false;
|
||||
|
||||
std::unordered_map<uint32_t, base::GeoObjectId> mappingToGeoObjects;
|
||||
ankerl::unordered_dense::map<uint32_t, base::GeoObjectId> mappingToGeoObjects;
|
||||
for (auto const & entry : mapping)
|
||||
{
|
||||
// todo(@m) Make test ids a new source in base::GeoObjectId?
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
#include "base/stl_helpers.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
using IdRelationVec = std::vector<std::pair<uint64_t, RelationElement>>;
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
template <typename T>
|
||||
class ReaderSource;
|
||||
|
||||
@@ -82,6 +83,6 @@ private:
|
||||
IDRInterfacePtr m_cache;
|
||||
std::vector<uint64_t> m_roadOsmIDs;
|
||||
|
||||
std::unordered_map<uint64_t, CameraInfo> m_speedCameras;
|
||||
ankerl::unordered_dense::map<uint64_t, CameraInfo> m_speedCameras;
|
||||
};
|
||||
} // namespace routing_builder
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "generator/mini_roundabout_info.hpp"
|
||||
#include "generator/way_nodes_mapper.hpp"
|
||||
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
namespace generator
|
||||
{
|
||||
@@ -39,7 +38,7 @@ private:
|
||||
IDRInterfacePtr m_cache;
|
||||
|
||||
WaysIDHolder m_roads;
|
||||
std::unordered_map<uint64_t, MiniRoundaboutInfo> m_miniRoundabouts;
|
||||
std::unordered_set<uint64_t> m_miniRoundaboutsExceptions;
|
||||
ankerl::unordered_dense::map<uint64_t, MiniRoundaboutInfo> m_miniRoundabouts;
|
||||
ankerl::unordered_dense::set<uint64_t> m_miniRoundaboutsExceptions;
|
||||
};
|
||||
} // namespace generator
|
||||
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
|
||||
private:
|
||||
// Value is an index in m_data vector.
|
||||
std::unordered_map<IDType, uint64_t> m_id2index;
|
||||
ankerl::unordered_dense::map<IDType, uint64_t> m_id2index;
|
||||
std::vector<Locality> m_data;
|
||||
};
|
||||
|
||||
@@ -107,10 +107,10 @@ public:
|
||||
void Save(std::string const & fileName);
|
||||
|
||||
private:
|
||||
std::unordered_map<IDType, Locality> m_id2loc;
|
||||
using IDsSetT = std::unordered_set<IDType>;
|
||||
std::unordered_map<IDType, IDsSetT> m_node2rel;
|
||||
std::unordered_map<std::string, IDsSetT> m_name2rel;
|
||||
ankerl::unordered_dense::map<IDType, Locality> m_id2loc;
|
||||
using IDsSetT = ankerl::unordered_dense::set<IDType>;
|
||||
ankerl::unordered_dense::map<IDType, IDsSetT> m_node2rel;
|
||||
ankerl::unordered_dense::map<std::string, IDsSetT> m_name2rel;
|
||||
};
|
||||
|
||||
class RoutingCityBoundariesCollector : public CollectorInterface
|
||||
|
||||
@@ -45,9 +45,9 @@ tree_node::Forest<HierarchyEntry> const & ComplexLoader::GetForest(storage::Coun
|
||||
return it == std::cend(m_forests) ? kEmpty : it->second;
|
||||
}
|
||||
|
||||
std::unordered_set<CompositeId> ComplexLoader::GetIdsSet() const
|
||||
ankerl::unordered_dense::set<CompositeId> ComplexLoader::GetIdsSet() const
|
||||
{
|
||||
std::unordered_set<CompositeId> set;
|
||||
ankerl::unordered_dense::set<CompositeId> set;
|
||||
ForEach([&](auto const &, auto const & forest)
|
||||
{
|
||||
forest.ForEachTree([&](auto const & tree)
|
||||
@@ -59,7 +59,7 @@ std::unordered_set<CompositeId> ComplexLoader::GetIdsSet() const
|
||||
ComplexLoader const & GetOrCreateComplexLoader(std::string const & filename)
|
||||
{
|
||||
static std::mutex m;
|
||||
static std::unordered_map<std::string, ComplexLoader> complexLoaders;
|
||||
static ankerl::unordered_dense::map<std::string, ComplexLoader> complexLoaders;
|
||||
|
||||
std::lock_guard<std::mutex> lock(m);
|
||||
auto const it = complexLoaders.find(filename);
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
namespace generator
|
||||
{
|
||||
namespace complex
|
||||
@@ -36,10 +36,10 @@ public:
|
||||
fn(pair.first, pair.second);
|
||||
}
|
||||
|
||||
std::unordered_set<CompositeId> GetIdsSet() const;
|
||||
ankerl::unordered_dense::set<CompositeId> GetIdsSet() const;
|
||||
|
||||
private:
|
||||
std::unordered_map<storage::CountryId, tree_node::Forest<HierarchyEntry>> m_forests;
|
||||
ankerl::unordered_dense::map<storage::CountryId, tree_node::Forest<HierarchyEntry>> m_forests;
|
||||
};
|
||||
|
||||
// Returns true if hierarchy tree is complex; otherwise returns false.
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
class FeatureType;
|
||||
|
||||
@@ -22,8 +23,8 @@ public:
|
||||
std::optional<std::string> GetWikidataId(uint32_t featureId) const;
|
||||
|
||||
private:
|
||||
std::unordered_map<uint32_t, base::GeoObjectId> m_featureIdToOsmId;
|
||||
std::unordered_map<base::GeoObjectId, std::string> m_osmIdToWikidataId;
|
||||
ankerl::unordered_dense::map<uint32_t, base::GeoObjectId> m_featureIdToOsmId;
|
||||
ankerl::unordered_dense::map<base::GeoObjectId, std::string> m_osmIdToWikidataId;
|
||||
};
|
||||
|
||||
class DescriptionsCollectionBuilderStat
|
||||
@@ -88,7 +89,7 @@ public:
|
||||
descriptions::DescriptionsCollection m_collection;
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, descriptions::StringIndex> m_path2Index;
|
||||
ankerl::unordered_dense::map<std::string, descriptions::StringIndex> m_path2Index;
|
||||
|
||||
WikidataHelper m_wikidataHelper;
|
||||
std::string m_wikipediaDir;
|
||||
|
||||
@@ -220,9 +220,7 @@ bool FeatureBuilder::PreSerialize()
|
||||
{
|
||||
StringUtf8Multilang nameWithRef;
|
||||
m_params.name.ForEach([&nameWithRef, this](int8_t code, std::string_view name)
|
||||
{
|
||||
nameWithRef.AddString(code, std::string(name) + " (" + m_params.ref + ")");
|
||||
});
|
||||
{ nameWithRef.AddString(code, std::string(name) + " (" + m_params.ref + ")"); });
|
||||
m_params.name = std::move(nameWithRef);
|
||||
}
|
||||
else if (ftypes::IsEmergencyAccessPointChecker::Instance()(types))
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
#include "base/stl_helpers.hpp"
|
||||
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
#include "std/target_os.hpp"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -214,7 +214,7 @@ void PreserializeLayer::Handle(FeatureBuilder & fb)
|
||||
LayerBase::Handle(fb);
|
||||
}
|
||||
|
||||
ComplexFeaturesMixer::ComplexFeaturesMixer(std::unordered_set<CompositeId> const & hierarchyNodesSet)
|
||||
ComplexFeaturesMixer::ComplexFeaturesMixer(ankerl::unordered_dense::set<CompositeId> const & hierarchyNodesSet)
|
||||
: m_hierarchyNodesSet(hierarchyNodesSet)
|
||||
, m_complexEntryType(classif().GetTypeByPath({"complex_entry"}))
|
||||
{
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
|
||||
namespace generator
|
||||
{
|
||||
@@ -151,7 +152,7 @@ private:
|
||||
class ComplexFeaturesMixer
|
||||
{
|
||||
public:
|
||||
explicit ComplexFeaturesMixer(std::unordered_set<CompositeId> const & hierarchyNodesSet);
|
||||
explicit ComplexFeaturesMixer(ankerl::unordered_dense::set<CompositeId> const & hierarchyNodesSet);
|
||||
|
||||
void Process(std::function<void(feature::FeatureBuilder &)> next,
|
||||
feature::FeatureBuilder const & fb);
|
||||
@@ -162,7 +163,7 @@ private:
|
||||
feature::FeatureBuilder MakeComplexLineFrom(feature::FeatureBuilder const & fb);
|
||||
feature::FeatureBuilder MakeComplexAreaFrom(feature::FeatureBuilder const & fb);
|
||||
|
||||
std::unordered_set<CompositeId> const & m_hierarchyNodesSet;
|
||||
ankerl::unordered_dense::set<CompositeId> const & m_hierarchyNodesSet;
|
||||
uint32_t const m_complexEntryType;
|
||||
};
|
||||
*/
|
||||
|
||||
@@ -39,10 +39,9 @@
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "3party/ankerl/unordered_dense.h"
|
||||
#include "cppjansson/cppjansson.hpp"
|
||||
|
||||
namespace generator
|
||||
@@ -62,7 +61,7 @@ public:
|
||||
private:
|
||||
static bool IsMatch(Tags const & elementTags, Tags const & tags);
|
||||
|
||||
std::unordered_set<uint64_t> m_skippedIds;
|
||||
ankerl::unordered_dense::set<uint64_t> m_skippedIds;
|
||||
std::unordered_multimap<std::string, std::reference_wrapper<Tags const>> m_skippedTags;
|
||||
std::list<Tags> m_rulesStorage;
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user