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

This commit is contained in:
Victor Shcherb 2020-03-27 18:33:41 +01:00
commit 603730acd3
21 changed files with 354 additions and 128 deletions

View file

@ -194,4 +194,15 @@
<string name="unit_of_speed_system_descr">Zehaztu abiadura unitatea.</string>
<string name="unit_of_speed_system">Abiadura unitatea</string>
<string name="shared_string_error_short">ERR</string>
<string name="time_zone_descr">Hautatu ordu-zona zure kokapen-mezuetan erakusteko.</string>
<string name="time_zone">Ordu zona</string>
<string name="buffer_time_descr">Bufferraren puntuak gordetzeko gehieneko denbora</string>
<string name="buffer_time">Bufferraren iraungitze-denbora</string>
<string name="shared_string_suggested">Iradokita</string>
<string name="status_widget_title">OsmAnd Tracker-en egoera</string>
<string name="back_to_osmand">Atzera OsmAnd-era</string>
<string name="last_response_date">Azken erantzuna: %1$s</string>
<string name="last_update_from_telegram_duration">"Telegram-en azken eguneraketa duela %1$s"</string>
<string name="last_response_duration">Azken erantzuna duela %1$s</string>
<string name="duration_ago">duela %1$s</string>
</resources>

1
OsmAnd/.gitignore vendored
View file

@ -50,6 +50,7 @@ use/
osmand.properties
osmand.xml
assets/style.css
assets/poi_categories.json
assets/help/*.html
assets/help/images
assets/help/screens

View file

@ -323,7 +323,6 @@ task cleanNoTranslate(type: Delete) {
delete('res/values/no_translate.xml')
}
task collectFonts(type: Copy) {
from "../../resources/fonts"
from "../../resources/rendering_styles/fonts"
@ -339,7 +338,6 @@ task collectHelpContentsStyle(type: Copy) {
into "assets"
}
task collectHelpContentsAssets(type: Copy) {
from("../../help/website/help") {
include "about.html"
@ -351,11 +349,15 @@ task collectHelpContentsAssets(type: Copy) {
from("../../help/website/feature_articles") {
include "*.html"
}
into "assets/feature_articles"
}
task copyPoiCategiry(type: Copy) {
from("../../resources/poi") {
include "poi_categories.json"
}
into "assets"
}
task copyStyleIcons(type: Copy) {
from "../../resources/rendering_styles/style-icons/"
@ -378,6 +380,7 @@ task collectExternalResources {
updateNoTranslate,
validateTranslate,
copyWidgetIcons,
copyPoiCategiry,
downloadWorldMiniBasemap
Gradle gradle = getGradle()

View file

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="34dp"
android:height="34dp"
android:viewportWidth="34"
android:viewportHeight="34">
android:width="36dp"
android:height="36dp"
android:viewportWidth="36"
android:viewportHeight="36">
<path
android:pathData="M9,0H25L34,9V25L25,34H9L0,25V9L9,0Z"
android:pathData="M10,1H26L35,10V26L26,35H10L1,26V10L10,1Z"
android:fillColor="#727272"/>
</vector>

View file

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="32"
android:viewportHeight="32">
android:width="36dp"
android:height="36dp"
android:viewportWidth="36"
android:viewportHeight="36">
<path
android:pathData="M3,0L29,0A3,3 0,0 1,32 3L32,29A3,3 0,0 1,29 32L3,32A3,3 0,0 1,0 29L0,3A3,3 0,0 1,3 0z"
android:pathData="M5,2L31,2A3,3 0,0 1,34 5L34,31A3,3 0,0 1,31 34L5,34A3,3 0,0 1,2 31L2,5A3,3 0,0 1,5 2z"
android:fillColor="#727272"/>
</vector>

View file

@ -0,0 +1,9 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/active_buttons_and_links_bg_pressed_dark">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/active_color_primary_dark" />
<corners android:radius="6dp" />
</shape>
</item>
</ripple>

View file

@ -0,0 +1,9 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/active_buttons_and_links_bg_pressed_light">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/active_color_primary_light" />
<corners android:radius="6dp" />
</shape>
</item>
</ripple>

View file

@ -9,6 +9,10 @@
android:paddingRight="9dp"
android:paddingBottom="4dp">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/outline"
android:layout_width="48dp"
@ -20,15 +24,16 @@
android:id="@+id/background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_gravity="center"
android:background="@drawable/bg_point_circle" />
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:layout_gravity="center"
android:clickable="false"
android:visibility="gone"
app:srcCompat="@drawable/mx_special_star_stroked" />
</FrameLayout>
</FrameLayout>

View file

@ -22,8 +22,6 @@
android:layout_height="@dimen/dashboard_map_toolbar"
android:background="?attr/card_and_list_background_basic"
android:minHeight="@dimen/dashboard_map_toolbar"
app:contentInsetLeft="72dp"
app:contentInsetStart="72dp"
osmand:subtitleTextColor="?android:textColorPrimary"
osmand:theme="@style/ThemeOverlay.AppCompat.ActionBar"
osmand:titleTextColor="?android:textColorPrimary">
@ -37,6 +35,8 @@
android:scaleType="center"
android:src="@drawable/ic_action_replace"
android:layout_marginRight="@dimen/content_padding_half"
android:layout_marginStart="@dimen/content_padding_half"
android:layout_marginLeft="@dimen/content_padding_half"
android:layout_marginEnd="@dimen/content_padding_half" />
</androidx.appcompat.widget.Toolbar>
@ -100,8 +100,8 @@
<ImageView
android:id="@+id/name_icon"
android:layout_width="@dimen/favorites_icon_size"
android:layout_height="@dimen/favorites_icon_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_margin="10dp"
android:contentDescription="@string/icon"
@ -191,7 +191,7 @@
android:text="@string/select_group"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_medium" />
<LinearLayout
android:id="@+id/group_list_button"
@ -236,7 +236,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="6dp"
android:paddingBottom="@dimen/content_padding">
android:paddingBottom="@dimen/content_padding_half">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/group_recycler_view"
@ -274,7 +274,7 @@
android:text="@string/select_icon_profile_dialog_title"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_medium" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/group_name_recycler_view"
@ -323,7 +323,7 @@
android:text="@string/select_color"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_medium" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/color_name"
@ -338,7 +338,7 @@
android:text="@string/select_color"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_medium" />
</LinearLayout>
<net.osmand.plus.widgets.FlowLayout
@ -373,7 +373,7 @@
android:text="@string/select_shape"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_medium" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/shape_name"
@ -388,13 +388,15 @@
android:text="@string/select_shape"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_regular" />
osmand:typeface="@string/font_roboto_medium" />
</LinearLayout>
<net.osmand.plus.widgets.FlowLayout
android:id="@+id/select_shape"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start"
android:layout_marginStart="12dp"
android:layout_marginLeft="12dp"
android:layout_marginTop="6dp" />
@ -403,7 +405,6 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="@dimen/content_padding_half"
android:layout_marginBottom="@dimen/content_padding_half"
android:background="?attr/dashboard_divider" />
<LinearLayout
@ -411,7 +412,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
@ -430,6 +430,7 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="11dp"
android:orientation="vertical">
<TextView

View file

@ -3540,4 +3540,32 @@
<string name="items_added">العناصر المضافة</string>
<string name="shared_string_import_complete">اكتمل الاستيراد</string>
<string name="import_complete_description">يتم استيراد جميع البيانات من %1$s، يمكنك استخدام الأزرار أدناه لفتح الجزء المطلوب من التطبيق لإدارته.</string>
<string name="recalculate_route_distance_promo">سيتم إعادة حساب المسار إذا كانت المسافة من المسار إلى الموقع الحالي أكثر من القيمة المحددة.</string>
<string name="select_distance_route_will_recalc">حدد المسافة التي سيتم بعدها إعادة حساب المسار.</string>
<string name="recalculate_route_in_deviation">إعادة حساب المسار في حالة الانحراف</string>
<string name="shared_string_square">مربع</string>
<string name="shared_string_rhomb">معين</string>
<string name="shared_string_circle">دائرة</string>
<string name="select_shape">تحديد الشكل</string>
<string name="select_group">تحديد المجموعة</string>
<string name="add_description">إضافة وصف</string>
<string name="delete_description">حذف الوصف</string>
<string name="quick_action_terrain_descr">زر لإظهار طبقة التضاريس أو إخفائها على الخريطة.</string>
<string name="quick_action_terrain_show">إظهار التضاريس</string>
<string name="quick_action_terrain_hide">إخفاء التضاريس</string>
<string name="quick_action_show_hide_terrain">إظهار/إخفاء التضاريس</string>
<string name="download_slope_maps">المنحدرات</string>
<string name="shared_string_hillshade">التضاريس</string>
<string name="terrain_empty_state_text">تمكين لعرض المنحدرات أو خريطة التضاريس. يمكنك قراءة المزيد عن أنواع الخرائط هذه على موقعنا</string>
<string name="shared_string_legend">عنوان تفسيري</string>
<string name="shared_string_zoom_levels">مستويات التكبير</string>
<string name="shared_string_transparency">الشفافية</string>
<string name="slope_read_more">يمكنك قراءة المزيد عن المنحدرات في %1$s.</string>
<string name="slope_download_description">تحتاج لخرائط إضافية لعرض المنحدرات على الخريطة.</string>
<string name="hillshade_download_description">تحتاج إلى خرائط إضافية لعرض التضاريس على الخريطة.</string>
<string name="terrain_slider_description">تعيين مستويات التكبير/التصغير الدنيا والقصوى التي سيتم عرض الطبقة بها.</string>
<string name="slope_description">المنحدر الملون ملائم للتضاريس.</string>
<string name="hillshade_description">خريطة التضاريس تستخدم ظلال داكنة لإظهار المنحدرات والقمم والأراضي المنخفضة.</string>
<string name="shared_string_terrain">التضاريس</string>
<string name="n_items_of_z">%1$s من %2$s</string>
</resources>

View file

@ -3551,4 +3551,21 @@ Abasta l\'àrea: %1$s x %2$s</string>
<string name="recalculate_route_distance_promo">Es tornarà a calcular una nova ruta si la distància de la posició actual respecte la ruta vigent supera el valor seleccionat.</string>
<string name="select_distance_route_will_recalc">Seleccioneu la desviació per sobre de la qual es tornarà a calcular la ruta.</string>
<string name="recalculate_route_in_deviation">Recalcula la ruta cas de desviament</string>
<string name="shared_string_square">Quadrat</string>
<string name="shared_string_rhomb">Rombe</string>
<string name="shared_string_circle">Cercle</string>
<string name="select_shape">Seleccioneu forma</string>
<string name="select_group">Seleccioneu grup</string>
<string name="add_description">Afegiu una descripció</string>
<string name="delete_description">Suprimeix la descripció</string>
<string name="quick_action_terrain_descr">Un botó per mostrar o amagar la capa de terreny al mapa.</string>
<string name="quick_action_terrain_show">Mostra el terreny</string>
<string name="quick_action_terrain_hide">Amaga el terreny</string>
<string name="quick_action_show_hide_terrain">Mostra/amaga el terreny</string>
<string name="shared_string_hillshade">Ombrejat del relleu</string>
<string name="shared_string_legend">Llegenda</string>
<string name="shared_string_zoom_levels">Nivells de zoom</string>
<string name="shared_string_transparency">Transparència</string>
<string name="hillshade_download_description">Es necessiten mapes addicionals per veure l\'ombrejat de relleu al mapa.</string>
<string name="n_items_of_z">%1$s de %2$s</string>
</resources>

View file

@ -2004,7 +2004,7 @@
<string name="poi_shop_additional_yes">mit Geschäften</string>
<string name="poi_service_bicycle_retail_yes">Einzelhandel</string>
<string name="poi_service_bicycle_retail_no">Fahrradeinzelhandel: nein</string>
<string name="poi_service_bicycle_repair_yes">Verkauf</string>
<string name="poi_service_bicycle_repair_yes">Reparatur</string>
<string name="poi_service_bicycle_repair_no">Fahrradreparatur: nein</string>
<string name="poi_service_bicycle_rental_yes">Verleih</string>
<string name="poi_service_bicycle_rental_no">Fahrradverleih: nein</string>
@ -3672,9 +3672,9 @@
<string name="poi_caravan_no">Zufahrt Wohnwagen: nein</string>
<string name="poi_motorhome_no">Zufahrt Wohnmobil: nein</string>
<string name="poi_bus_no">Anbindung Linienbus: nein</string>
<string name="poi_tourist_bus_yes">Reisebuszufahrt: ja</string>
<string name="poi_tourist_bus_designated">Reisebuszufahrt: ausgewiesen</string>
<string name="poi_tourist_bus_no">Reisebuszufahrt: nein</string>
<string name="poi_tourist_bus_yes">Zufahrt Reisebus: ja</string>
<string name="poi_tourist_bus_designated">Zufahrt Reisebus: ausgewiesen</string>
<string name="poi_tourist_bus_no">Zufahrt Reisebus: nein</string>
<string name="poi_ski_yes">Zufahrt Ski: ja</string>
<string name="poi_ski_no">Zufahrt Ski: nein</string>
<string name="poi_snowmobile_private">Zufahrt Schneemobil: privat</string>
@ -3683,8 +3683,8 @@
<string name="poi_psv_yes">Zufahrt öffentliche Verkehrsmittel: ja</string>
<string name="poi_psv_designated">Zufahrt öffentliche Verkehrsmittel: ausgewiesen</string>
<string name="poi_psv_no">Zufahrt öffentliche Verkehrsmittel: nein</string>
<string name="poi_coach_yes">Zufahrt Bus: ja</string>
<string name="poi_coach_no">Zufahrt Bus: nein</string>
<string name="poi_coach_yes">Zufahrt Fernbus: ja</string>
<string name="poi_coach_no">Zufahrt Fernbus: nein</string>
<string name="poi_snowmobile_no">Zufahrt Schneemobil: nein</string>
<string name="poi_agricultural_yes">Zufahrt landwirtschaftliche Fahrzeuge: ja</string>
<string name="poi_agricultural_no">Zufahrt landwirtschaftliche Fahrzeuge: nein</string>
@ -3736,7 +3736,7 @@
<string name="poi_cash_withdrawal">Bargeldbezug</string>
<string name="poi_cash_withdrawal_operator">Betreiber der Bargeldauszahlungen</string>
<string name="poi_cash_withdrawal_type_checkout">Bargeldbezugsart: Kasse</string>
<string name="poi_cash_withdrawal_type_self_checkout">Bargeldbezugsart: Selbstzahlerkasse</string>
<string name="poi_cash_withdrawal_type_self_checkout">Bargeldbezugsart: Selbstbedienungskasse</string>
<string name="poi_cash_withdrawal_limit">Bargeldbezugslimit</string>
<string name="poi_cash_withdrawal_currency">Bargeldbezugswährung</string>
<string name="poi_cash_withdrawal_purchase_required_yes">Bargeldbezug: Kauf erforderlich</string>
@ -3804,8 +3804,8 @@
<string name="poi_traffic_signals_sound_locate">Nur wenn Gehen erlaubt ist</string>
<string name="poi_tactile_paving_contrasted">Kontrastiert</string>
<string name="poi_tactile_paving_incorrect">Falsch</string>
<string name="poi_covered_booth">Stand</string>
<string name="poi_booth">Standtyp</string>
<string name="poi_covered_booth">Unterstand</string>
<string name="poi_booth">Unterstand Typ</string>
<string name="poi_tactile_paving_primitive">Primitiv</string>
<string name="poi_seamark_water_level_part_submerged">Wasserstand: teilweise überflutet</string>
<string name="poi_seamark_water_level_submerged">Wasserstand: überflutet</string>
@ -3820,5 +3820,5 @@
<string name="poi_drinking_water_refill_yes">Trinkwassernachfüllung: ja</string>
<string name="poi_drinking_water_refill_no">Trinkwassernachfüllung: nein</string>
<string name="poi_drinking_water_refill_network">Trinkwassernachfüllnetz</string>
<string name="poi_internet_access_fee_customers">Internetzugang Gebühr für Kunden</string>
<string name="poi_internet_access_fee_customers">Internetzugangsgebühr für Kunden</string>
</resources>

View file

@ -24,7 +24,7 @@
<string name="traffic_warning_payment">Mautstelle</string>
<string name="traffic_warning_stop">Stoppzeichen</string>
<string name="traffic_warning_calming">Verkehrsberuhigung</string>
<string name="traffic_warning_speed_camera">Geschwindigkeitskontrolle</string>
<string name="traffic_warning_speed_camera">Blitzer</string>
<string name="traffic_warning">Verkehrswarnung</string>
<string name="speak_favorites">Favoriten in der Nähe</string>
<string name="speak_poi">Nahegelegene POI</string>
@ -95,7 +95,7 @@
<string name="rendering_attr_roadColors_description">Auswahl eines Straßen-Farbschemas:</string>
<string name="rendering_attr_roadColors_name">Straßenfarbschema</string>
<string name="show_warnings_title">Warnungen anzeigen…</string>
<string name="show_warnings_descr">Verkehrswarnungen (Tempolimits, Stoppzeichen, Rüttelschwellen, Tunnel), stationäre Radarkontrollen und Fahrspuranzeige konfigurieren.</string>
<string name="show_warnings_descr">Verkehrswarnungen (Tempolimits, Stoppzeichen, Rüttelschwellen, Tunnel), Blitzerwarner und Fahrspuranzeige konfigurieren.</string>
<string name="use_compass_navigation_descr">Kompass verwenden, wenn keine andere Richtungsbestimmung möglich ist.</string>
<string name="use_compass_navigation">Kompass verwenden</string>
<string name="avoid_motorway">Keine Autobahnen</string>
@ -118,7 +118,7 @@
\n- Offlinenavigation für mittlere Entfernungen
\n- Auto-, Fahrrad- und Fußgänger-Modus wahlweise mit:
\n - automatischer Tag-Nacht-Umschaltung der Anzeige
\n - geschwindigkeitsabhängigem Kartenmaßstab
\n - geschwindigkeitsabhängiger Kartenmaßstab
\n - Kartenausrichtung nach Kompass oder Bewegungsrichtung
\n - Fahrspuranzeige, Geschwindigkeitswarnung, aufgenommenen oder TTS-Sprachansagen
\n
@ -1116,7 +1116,7 @@
<string name="av_camera_focus_edof">Erweiterte Schärfentiefe (EDOF)</string>
<string name="av_camera_focus_macro">Makrofokus-Modus (Nahaufnahme)</string>
<string name="speak_title">Ansagen…</string>
<string name="speak_descr">Ansagen zu Straßennamen, Verkehrswarnungen (Stoppzeichen, Rüttelschwellen), stationäre Radarkontrollen und Tempolimits konfigurieren.</string>
<string name="speak_descr">Ansagen zu Straßennamen, Verkehrswarnungen (Stoppzeichen, Rüttelschwellen), Blitzerwarnern und Tempolimits konfigurieren.</string>
<string name="speak_street_names">Straßennamen (TTS)</string>
<string name="map_widget_fps_info">FPS-Debug-Info</string>
<string name="driving_region_descr">Fahrregion wählen: USA, Europa, GB, Asien usw.</string>
@ -3547,7 +3547,7 @@ Lon %2$s</string>
<string name="shared_string_app_default_w_val">App-Standard (%s)</string>
<string name="no_recalculation_setting">Neuberechnung deaktivieren</string>
<string name="route_recalculation_dist_title">Mindestabstand für Neuberechnung der Route</string>
<string name="route_recalculation_dist_descr">"Die Route wird neu berechnet, wenn der Abstand zur Route größer ist als der festgelegte Wert "</string>
<string name="route_recalculation_dist_descr">Die Route wird neu berechnet, wenn der Abstand zur Route größer ist als der festgelegte Wert</string>
<string name="profile_type_custom_string">Benutzerdefiniertes Profil</string>
<string name="shared_string_angle_param">Winkel: %s°</string>
<string name="shared_string_angle">Winkel</string>
@ -3585,4 +3585,26 @@ Lon %2$s</string>
<string name="select_distance_route_will_recalc">Wählen Sie die Entfernung, nach der die Route neu berechnet wird.</string>
<string name="recalculate_route_in_deviation">Neuberechnung der Route im Falle einer Abweichung</string>
<string name="recalculate_route_distance_promo">Die Route wird neu berechnet, wenn die Entfernung von der Route zur aktuellen Position größer als der ausgewählte Wert ist.</string>
<string name="import_complete_description">Alle Daten aus %1$s werden importiert. Sie können die Schaltflächen unten verwenden, um den benötigten Teil der Anwendung zu öffnen, um sie zu verwalten.</string>
<string name="shared_string_square">Quadrat</string>
<string name="shared_string_rhomb">Raute</string>
<string name="shared_string_circle">Kreis</string>
<string name="select_shape">Form auswählen</string>
<string name="select_group">Gruppe auswählen</string>
<string name="add_description">Beschreibung hinzufügen</string>
<string name="delete_description">Beschreibung löschen</string>
<string name="quick_action_terrain_descr">Eine Schaltfläche zum Ein- und Ausblenden der Geländeebene auf der Karte.</string>
<string name="quick_action_terrain_show">Gelände einblenden</string>
<string name="quick_action_terrain_hide">Gelände ausblenden</string>
<string name="quick_action_show_hide_terrain">Gelände ein-/ausblenden</string>
<string name="shared_string_hillshade">Schummerung</string>
<string name="shared_string_zoom_levels">Zoomstufen</string>
<string name="shared_string_transparency">Transparenz</string>
<string name="terrain_slider_description">Stellen Sie die minimale und maximale Zoomstufe ein, bei der die Ebene angezeigt wird.</string>
<string name="shared_string_terrain">Gelände</string>
<string name="download_slope_maps">Hänge</string>
<string name="terrain_empty_state_text">Aktivieren Sie diese Option, um die Schatten- oder Hangkarte anzuzeigen. Weitere Informationen zu diesen Kartentypen finden Sie auf unserer Website</string>
<string name="shared_string_legend">Legende</string>
<string name="slope_read_more">Lesen Sie mehr über Hänge in %1$s.</string>
<string name="slope_download_description">Zusätzliche Karten sind erforderlich, um Hänge auf der Karte anzuzeigen.</string>
</resources>

View file

@ -3452,7 +3452,7 @@ Area honi dagokio: %1$s x %2$s</string>
<string name="monitoring_min_accuracy_descr_side_effect">Albo-efektua: Zehaztasunaren arabera iragaztearen ondorioz, puntuak falta daitezke, adibidez, zubien azpian, zuhaitzen azpian, eraikin altuen artean, edo eguraldi jakin batzuekin.</string>
<string name="monitoring_min_accuracy_descr_recommendation">Gomendioa: Zaila da zer grabatuko den eta zer ez aurreikustea, agian egokiena iragazki hau desaktibatzea da.</string>
<string name="rearrange_categories">Berrantolatu kategoriak</string>
<string name="create_custom_categories_list_promo">Kategoria pertsonalizatuak gehitu ditzakezu, beharrezkotzat jotzen ez dituzun kategoriak ezkutatu, eta zerrendaren ordena aldatu. Zerrenda profilekin inportatu eta esportatu daiteke.</string>
<string name="create_custom_categories_list_promo">Aldatu zerrendaren ordena, ezkutatu behar ez dituzun kategoriak. Aldaketa guztiak profilekin inportatu eta esportatu daiteke.</string>
<string name="add_new_custom_category_button_promo">Kategoria pertsonalizatu berri bat gehi dezakezu behar diren kategoria bat edo batzuk hautatuta.</string>
<string name="reset_to_default_category_button_promo">Lehenetsitakoak berrezartzea ordenazio irizpidea instalazioaren unekora itzuliko du.</string>
<string name="shared_string_available">Eskuragarri</string>
@ -3586,4 +3586,32 @@ Area honi dagokio: %1$s x %2$s</string>
<string name="items_added">Gehitutako elementuak</string>
<string name="shared_string_import_complete">Inportazioa burututa</string>
<string name="import_complete_description">%1$s-ko datu guztiak inportatuta, beheko botoiak erabili ditzakezu kudeatzeko behar duzun aplikazioaren atala irekitzeko.</string>
<string name="recalculate_route_distance_promo">Ibilbidea birkalkulatuko da ibilbidetik uneko punturainoko distantzia hautatutako balioa baino handiagoa bada.</string>
<string name="select_distance_route_will_recalc">Hautatu ibilbidea birkalkulatzeko distantzia.</string>
<string name="recalculate_route_in_deviation">Birkalkulatu ibilbidea desbideratzekotan</string>
<string name="shared_string_square">Laukia</string>
<string name="shared_string_rhomb">Erronboa</string>
<string name="shared_string_circle">Zirkulua</string>
<string name="select_shape">Hautatu forma</string>
<string name="select_group">Hautatu taldea</string>
<string name="add_description">Gehitu deskripzioa</string>
<string name="delete_description">Ezabatu deskripzioa</string>
<string name="quick_action_terrain_descr">Mapako terreno geruza erakutsi edo ezkutatzeko botoia.</string>
<string name="quick_action_terrain_show">Erakutsi terrenoa</string>
<string name="quick_action_terrain_hide">Ezkutatu terrenoa</string>
<string name="quick_action_show_hide_terrain">Erakutsi/ezkutatu terrenoa</string>
<string name="download_slope_maps">Maldak</string>
<string name="shared_string_hillshade">Erliebea</string>
<string name="terrain_empty_state_text">Gaitu erliebea edo malda mapa ikusteko. Mapa mota honi buruz gehiago irakur dezakezu gure gunean</string>
<string name="shared_string_legend">Legenda</string>
<string name="shared_string_zoom_levels">Zoom mailak</string>
<string name="shared_string_transparency">Gardentasuna</string>
<string name="slope_read_more">Gehiago irakurri dezakezu maldei buruz hemen: %1$s.</string>
<string name="slope_download_description">Mapa gehigarriak behar dira Maldak mapan ikusteko.</string>
<string name="hillshade_download_description">Mapa gehigarriak behar dira erliebea mapan ikusteko.</string>
<string name="terrain_slider_description">Ezarri geruza bistaratuko den gutxieneko eta gehieneko zoom maila.</string>
<string name="slope_description">Malda terrenoaren koloreztatutako ikuspegiak dira.</string>
<string name="hillshade_description">Eman erliebea mapari itzalak erabiliz maldak, gailurrak eta behe-lauak erakusteko.</string>
<string name="shared_string_terrain">Terrenoa</string>
<string name="n_items_of_z">%1$s / %2$s</string>
</resources>

View file

@ -3568,4 +3568,26 @@ Rappresenta l\'area: %1$s x %2$s</string>
<string name="restore_all_profile_settings">Ripristinare tutte le impostazioni del profilo\?</string>
<string name="saving_new_profile">Salvataggio del nuovo profilo</string>
<string name="profile_backup_failed">Impossibile fare una copia di salvataggio del profilo.</string>
<string name="clear_recorded_data_warning">Sei sicuro di voler eliminare i dati registrati\?</string>
<string name="importing_from">Importazione dei dati da %1$s</string>
<string name="shared_string_importing">Importazione in corso</string>
<string name="items_added">Oggetti aggiunti</string>
<string name="shared_string_import_complete">Importazione completata</string>
<string name="import_complete_description">Tutti i dati sono stati importati da %1$s, puoi utilizzare i bottoni sottostanti per aprire e gestire le parti dell\' applicazione di cui necessiti.</string>
<string name="recalculate_route_distance_promo">Il percorso verrà ricalcolato quando la distanza tra il percorso e la propria posizione è maggiore del valore selezionato.</string>
<string name="select_distance_route_will_recalc">Seleziona dopo che distanza effettuare il ricalcolo del percorso.</string>
<string name="recalculate_route_in_deviation">Ricalcola il percorso in caso di deviazione</string>
<string name="shared_string_square">Quadrato</string>
<string name="shared_string_rhomb">Rombo</string>
<string name="shared_string_circle">Cerchio</string>
<string name="select_shape">Seleziona la forma</string>
<string name="select_group">Seleziona il gruppo</string>
<string name="add_description">Aggiungi descrizione</string>
<string name="delete_description">Elimina descrizione</string>
<string name="quick_action_terrain_descr">Un bottone per mostrare o nascondere la vista rilievo sulla mappa.</string>
<string name="quick_action_terrain_show">Mostra rilievo</string>
<string name="quick_action_terrain_hide">Nascondi rilievo</string>
<string name="quick_action_show_hide_terrain">Mostra/nascondi rilievo</string>
<string name="download_slope_maps">Pendenze</string>
<string name="shared_string_hillshade">Rilievi ombra</string>
</resources>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>

View file

@ -3459,7 +3459,7 @@ Reprezentuje obszar: %1$s x %2$s</string>
<string name="osm_authorization_success">Uwierzytelniono</string>
<string name="monitoring_min_speed_descr_side_effect">Efekt uboczny: trasa nie będzie zawierała sekcji, w których nie zostało spełnione kryterium minimalnej prędkości (np. podczas pchania roweru pod strome wzgórze). Nie będzie również zawierała informacji o czasach odpoczynku, np. przerwach. Ma to wpływ na analizę i przetwarzanie końcowe, np. przy próbie określenia całkowitej długości trasy, czasu w ruchu lub średniej prędkości.</string>
<string name="rearrange_categories">Zmień układ kategorii</string>
<string name="create_custom_categories_list_promo">Można dodać niestandardowe kategorie, ukryć kategorie, które są niepotrzebne i zmienić kolejność sortowania listy. Listę można importować i eksportować wraz z profilami.</string>
<string name="create_custom_categories_list_promo">Zmień kolejność sortowania listy, ukryj niepotrzebne kategorie. Wszystkie zmiany można importować lub eksportować za pomocą profili.</string>
<string name="add_new_custom_category_button_promo">Można dodać nową, niestandardową kategorię wybierając jedną lub kilka potrzebnych kategorii.</string>
<string name="shared_string_available">Dostępne</string>
<string name="add_custom_category">Dodaj niestandardową kategorię</string>
@ -3576,4 +3576,30 @@ Reprezentuje obszar: %1$s x %2$s</string>
<string name="items_added">Dodano elementy</string>
<string name="shared_string_import_complete">Zakończono importowanie</string>
<string name="import_complete_description">Zaimportowano wszystkie dane z %1$s. Można użyć poniższych przycisków, aby otworzyć wymaganą cześć aplikacji w celu zarządzania nią.</string>
<string name="recalculate_route_distance_promo">Trasa zostanie ponownie obliczona, jeśli odległość od trasy do bieżącej lokalizacji jest większa niż wybrana wartość.</string>
<string name="select_distance_route_will_recalc">Wybierz odległość, po której trasa zostanie ponownie obliczona.</string>
<string name="recalculate_route_in_deviation">Przelicz trasę w przypadku odchylenia</string>
<string name="select_group">Wybierz grupę</string>
<string name="add_description">Dodaj opis</string>
<string name="delete_description">Usuń opis</string>
<string name="quick_action_terrain_descr">Przycisk do wyświetlania lub ukrywania warstwy terenu na mapie.</string>
<string name="quick_action_terrain_show">Pokaż teren</string>
<string name="quick_action_terrain_hide">Ukryj miejscowości</string>
<string name="quick_action_show_hide_terrain">Pokaż/Ukryj miejscowości</string>
<string name="download_slope_maps">Stoki</string>
<string name="terrain_empty_state_text">Włącz, aby wyświetlić mapę wzgórza lub stoku. Możesz przeczytać więcej o tego rodzaju mapach na naszej stronie</string>
<string name="shared_string_legend">Legenda</string>
<string name="shared_string_zoom_levels">Poziom powiększenia</string>
<string name="shared_string_transparency">Przejrzystość</string>
<string name="slope_read_more">Więcej informacji o stokach można przeczytać w %1$s.</string>
<string name="slope_download_description">Dodatkowe mapy są potrzebne do wyświetlania stoków na mapie.</string>
<string name="terrain_slider_description">Ustaw minimalny i maksymalny poziom powiększenia, na których będzie wyświetlana warstwa.</string>
<string name="slope_description">Nachylenie to pokolorowane wizualizacje terenu.</string>
<string name="hillshade_description">Mapa Hillshade wykorzystująca ciemne odcienie do pokazania stoków, szczytów i nizin.</string>
<string name="shared_string_terrain">Teren</string>
<string name="n_items_of_z">%1$s z %2$s</string>
<string name="shared_string_square">Kwadrat</string>
<string name="shared_string_rhomb">Romb</string>
<string name="shared_string_circle">Okrąg</string>
<string name="select_shape">Wybierz kształt</string>
</resources>

View file

@ -3432,7 +3432,7 @@
<string name="choose_icon_color_name">Escolha o ícone, cor e nome</string>
<string name="reorder_profiles">Editar lista de perfis</string>
<string name="selected_profile">Perfil selecionado</string>
<string name="reset_confirmation_descr">Ao clicar em %1$s perderá todas as suas alterações.</string>
<string name="reset_confirmation_descr">Tocar em %1$s descartará todas as suas alterações.</string>
<string name="reset_all_profile_settings_descr">Todas as configurações de perfil serão redefinidas para o estado após a instalação.</string>
<string name="reset_all_profile_settings">Redefinir todas as configurações de perfil para o padrão\?</string>
<string name="ltr_or_rtl_combine_via_space">%1$s %2$s</string>

View file

@ -47,14 +47,14 @@ public class FavoritePointEditorFragmentNew extends PointEditorFragmentNew {
private BackgroundType backgroundType = BackgroundType.CIRCLE;
@Nullable
FavouritesDbHelper helper;
private FavouritesDbHelper helper;
private boolean autoFill;
private boolean saved;
private int defaultColor;
@Override
public void onAttach(Context context) {
public void onAttach(@NonNull Context context) {
super.onAttach(context);
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
@ -129,7 +129,7 @@ public class FavoritePointEditorFragmentNew extends PointEditorFragmentNew {
return editor;
}
public FavoritePointEditor getFavoritePointEditor() {
private FavoritePointEditor getFavoritePointEditor() {
return editor;
}
@ -422,29 +422,38 @@ public class FavoritePointEditorFragmentNew extends PointEditorFragmentNew {
@Override
public Set<String> getCategories() {
Set<String> categories = new LinkedHashSet<>();
FavouritesDbHelper helper = getHelper();
if (helper != null) {
for (FavouritesDbHelper.FavoriteGroup fg : getHelper().getFavoriteGroups()) {
categories.add(fg.getDisplayName(getMyApplication()));
}
}
return categories;
}
@Override
public int getCategoryPoints(String category) {
public int getCategoryPointsCount(String category) {
FavouritesDbHelper helper = getHelper();
if (helper != null) {
for (FavouritesDbHelper.FavoriteGroup fg : getHelper().getFavoriteGroups()) {
if (fg.getDisplayName(getMyApplication()).equals(category)) {
return fg.getPoints().size();
}
}
}
return 0;
}
@Override
public int getCategoryColor(String category) {
FavouritesDbHelper helper = getHelper();
if (helper != null) {
for (FavouritesDbHelper.FavoriteGroup fg : getHelper().getFavoriteGroups()) {
if (fg.getDisplayName(getMyApplication()).equals(category)) {
return fg.getColor();
}
}
}
return defaultColor;
}
}

View file

@ -1,15 +1,12 @@
package net.osmand.plus.mapcontextmenu.editors;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -38,7 +35,6 @@ import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.textfield.TextInputLayout;
import net.osmand.AndroidUtils;
import net.osmand.data.FavouritePoint;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
@ -59,8 +55,10 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Set;
import static net.osmand.data.FavouritePoint.*;
import static net.osmand.plus.FavouritesDbHelper.FavoriteGroup.PERSONAL_CATEGORY;
import static net.osmand.plus.FavouritesDbHelper.FavoriteGroup.isPersonalCategoryDisplayName;
import static net.osmand.util.Algorithms.capitalizeFirstLetter;
public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
@ -73,13 +71,13 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
private int selectedIcon;
@ColorInt
private int selectedColor;
private FavouritePoint.BackgroundType selectedShape = FavouritePoint.BackgroundType.CIRCLE;
private BackgroundType selectedShape = BackgroundType.CIRCLE;
private ImageView nameIcon;
private GroupAdapter groupListAdapter;
private int scrollViewY;
private RecyclerView groupRecyclerView;
private String selectedIconCategory;
private LinkedHashMap<String, JSONArray> group;
private LinkedHashMap<String, JSONArray> iconCategories;
private OsmandApplication app;
@Override
@ -284,6 +282,12 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
private View createColorItemView(@ColorRes final int color, final FlowLayout rootView) {
FrameLayout colorItemView = (FrameLayout) UiUtilities.getInflater(getContext(), nightMode)
.inflate(R.layout.point_editor_button, rootView, false);
ImageView outline = colorItemView.findViewById(R.id.outline);
outline.setImageDrawable(
UiUtilities.tintDrawable(ContextCompat.getDrawable(app, R.drawable.bg_point_circle_contour),
ContextCompat.getColor(app,
nightMode ? R.color.stroked_buttons_and_links_outline_dark
: R.color.stroked_buttons_and_links_outline_light)));
ImageView backgroundCircle = colorItemView.findViewById(R.id.background);
AndroidUtils.setBackground(backgroundCircle,
UiUtilities.tintDrawable(ContextCompat.getDrawable(app, R.drawable.bg_point_circle), color));
@ -304,8 +308,9 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
ImageView icon = oldColor.findViewById(R.id.icon);
icon.setImageDrawable(UiUtilities.tintDrawable(icon.getDrawable(), R.color.icon_color_default_light));
}
if (rootView.findViewWithTag(color) != null) {
rootView.findViewWithTag(color).findViewById(R.id.outline).setVisibility(View.VISIBLE);
View newColor = rootView.findViewWithTag(color);
if (newColor != null) {
newColor.findViewById(R.id.outline).setVisibility(View.VISIBLE);
}
((TextView) view.findViewById(R.id.color_name)).setText(ColorDialogs.getColorName(color));
selectedColor = color;
@ -317,18 +322,16 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
private void createShapeSelector() {
FlowLayout selectShape = view.findViewById(R.id.select_shape);
for (FavouritePoint.BackgroundType backgroundType : FavouritePoint.BackgroundType.values()) {
for (BackgroundType backgroundType : BackgroundType.values()) {
selectShape.addView(createShapeItemView(backgroundType, selectShape), new FlowLayout.LayoutParams(0, 0));
}
}
private View createShapeItemView(final FavouritePoint.BackgroundType backgroundType, final FlowLayout rootView) {
private View createShapeItemView(final BackgroundType backgroundType, final FlowLayout rootView) {
FrameLayout shapeItemView = (FrameLayout) UiUtilities.getInflater(getContext(), nightMode)
.inflate(R.layout.point_editor_button, rootView, false);
ImageView background = shapeItemView.findViewById(R.id.background);
AndroidUtils.setBackground(background,
UiUtilities.tintDrawable(ContextCompat.getDrawable(app, backgroundType.getIconId()),
ContextCompat.getColor(app, R.color.divider_color_light)));
setShapeSelectorBackground(backgroundType, background);
ImageView outline = shapeItemView.findViewById(R.id.outline);
outline.setImageDrawable(getOutlineDrawable(backgroundType.getIconId()));
background.setOnClickListener(new View.OnClickListener() {
@ -344,22 +347,21 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
private Drawable getOutlineDrawable(int iconId) {
String iconName = app.getResources().getResourceName(iconId);
int iconRes = app.getResources().getIdentifier(iconName + "_contour", "drawable", app.getPackageName());
return app.getUIUtilities().getIcon(iconRes, R.color.divider_color_light);
return app.getUIUtilities().getIcon(iconRes,
nightMode ? R.color.stroked_buttons_and_links_outline_dark : R.color.stroked_buttons_and_links_outline_light);
}
private void updateShapeSelector(FavouritePoint.BackgroundType backgroundType, View rootView) {
private void updateShapeSelector(BackgroundType backgroundType, View rootView) {
View oldShape = rootView.findViewWithTag(selectedShape);
if (oldShape != null) {
oldShape.findViewById(R.id.outline).setVisibility(View.INVISIBLE);
ImageView background = oldShape.findViewById(R.id.background);
AndroidUtils.setBackground(background,
UiUtilities.tintDrawable(ContextCompat.getDrawable(app, selectedShape.getIconId()),
ContextCompat.getColor(app, R.color.divider_color_light)));
setShapeSelectorBackground(selectedShape, background);
}
rootView.findViewWithTag(backgroundType).findViewById(R.id.outline).setVisibility(View.VISIBLE);
View newShape = rootView.findViewWithTag(backgroundType);
newShape.findViewById(R.id.outline).setVisibility(View.VISIBLE);
((TextView) rootView.findViewById(R.id.shape_name)).setText(backgroundType.getNameId());
ImageView background = rootView.findViewWithTag(backgroundType).findViewById(R.id.background);
ImageView background = newShape.findViewById(R.id.background);
AndroidUtils.setBackground(background,
UiUtilities.tintDrawable(ContextCompat.getDrawable(app, backgroundType.getIconId()),
selectedColor));
@ -368,15 +370,23 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
updateNameIcon();
}
private void setShapeSelectorBackground(BackgroundType backgroundType, ImageView background) {
AndroidUtils.setBackground(background,
UiUtilities.tintDrawable(ContextCompat.getDrawable(app, backgroundType.getIconId()),
ContextCompat.getColor(app,
nightMode ? R.color.inactive_buttons_and_links_bg_dark
: R.color.inactive_buttons_and_links_bg_light)));
}
private void createIconSelector() {
group = new LinkedHashMap<>();
iconCategories = new LinkedHashMap<>();
try {
JSONObject obj = new JSONObject(loadJSONFromAsset());
JSONObject categories = obj.getJSONObject("categories");
for (int i = 0; i < categories.length(); i++) {
JSONArray names = categories.names();
JSONObject icons = categories.getJSONObject(names.get(i).toString());
group.put(names.get(i).toString(), icons.getJSONArray("icons"));
iconCategories.put(names.get(i).toString(), icons.getJSONArray("icons"));
}
} catch (JSONException e) {
e.printStackTrace();
@ -386,19 +396,19 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
}
private String getInitCategory() {
for (int j = 0; j < group.values().size(); j++) {
JSONArray iconJsonArray = (JSONArray) group.values().toArray()[j];
for (int j = 0; j < iconCategories.values().size(); j++) {
JSONArray iconJsonArray = (JSONArray) iconCategories.values().toArray()[j];
for (int i = 0; i < iconJsonArray.length(); i++) {
try {
if (iconJsonArray.getString(i).equals(getNameFromIconId(getIconId()))) {
return (String) group.keySet().toArray()[j];
return (String) iconCategories.keySet().toArray()[j];
}
} catch (JSONException e) {
e.printStackTrace();
}
}
}
return group.keySet().iterator().next();
return iconCategories.keySet().iterator().next();
}
private String getNameFromIconId(int iconId) {
@ -408,7 +418,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
private void createIconForCategory() {
FlowLayout selectIcon = view.findViewById(R.id.select_icon);
selectIcon.removeAllViews();
JSONArray iconJsonArray = group.get(selectedIconCategory);
JSONArray iconJsonArray = iconCategories.get(selectedIconCategory);
if (iconJsonArray != null) {
List<String> iconNameList = new ArrayList<>();
for (int i = 0; i < iconJsonArray.length(); i++) {
@ -418,12 +428,12 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
e.printStackTrace();
}
}
GroupNameAdapter groupNameListAdapter = new GroupNameAdapter();
groupNameListAdapter.setItems(new ArrayList<>(group.keySet()));
IconCategoriesAdapter iconCategoriesAdapter = new IconCategoriesAdapter();
iconCategoriesAdapter.setItems(new ArrayList<>(iconCategories.keySet()));
RecyclerView groupNameRecyclerView = view.findViewById(R.id.group_name_recycler_view);
groupNameRecyclerView.setAdapter(groupNameListAdapter);
groupNameRecyclerView.setAdapter(iconCategoriesAdapter);
groupNameRecyclerView.setLayoutManager(new LinearLayoutManager(app, RecyclerView.HORIZONTAL, false));
groupNameListAdapter.notifyDataSetChanged();
iconCategoriesAdapter.notifyDataSetChanged();
for (String name : iconNameList) {
selectIcon.addView(createIconItemView(name, selectIcon), new FlowLayout.LayoutParams(0, 0));
}
@ -433,10 +443,14 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
private View createIconItemView(final String iconName, final ViewGroup rootView) {
FrameLayout iconItemView = (FrameLayout) UiUtilities.getInflater(getContext(), nightMode)
.inflate(R.layout.point_editor_button, rootView, false);
ImageView outline = iconItemView.findViewById(R.id.outline);
outline.setImageDrawable(
UiUtilities.tintDrawable(ContextCompat.getDrawable(app, R.drawable.bg_point_circle_contour),
ContextCompat.getColor(app,
nightMode ? R.color.stroked_buttons_and_links_outline_dark
: R.color.stroked_buttons_and_links_outline_light)));
ImageView backgroundCircle = iconItemView.findViewById(R.id.background);
AndroidUtils.setBackground(backgroundCircle,
UiUtilities.tintDrawable(ContextCompat.getDrawable(app, R.drawable.bg_point_circle),
ContextCompat.getColor(app, R.color.divider_color_light)));
setIconSelectorBackground(backgroundCircle);
ImageView icon = iconItemView.findViewById(R.id.icon);
icon.setVisibility(View.VISIBLE);
final int iconRes = app.getResources().getIdentifier("mx_" + iconName, "drawable", app.getPackageName());
@ -456,11 +470,8 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
if (oldIcon != null) {
oldIcon.findViewById(R.id.outline).setVisibility(View.INVISIBLE);
ImageView background = oldIcon.findViewById(R.id.background);
AndroidUtils.setBackground(background,
UiUtilities.tintDrawable(ContextCompat.getDrawable(app, R.drawable.bg_point_circle),
ContextCompat.getColor(app, R.color.divider_color_light)));
setIconSelectorBackground(background);
}
View icon = rootView.findViewWithTag(iconRes);
if (icon != null) {
icon.findViewById(R.id.outline).setVisibility(View.VISIBLE);
@ -473,6 +484,14 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
updateNameIcon();
}
private void setIconSelectorBackground(ImageView backgroundCircle) {
AndroidUtils.setBackground(backgroundCircle,
UiUtilities.tintDrawable(ContextCompat.getDrawable(app, R.drawable.bg_point_circle),
ContextCompat.getColor(app, nightMode
? R.color.inactive_buttons_and_links_bg_dark
: R.color.inactive_buttons_and_links_bg_light)));
}
private void updateNameIcon() {
if (nameIcon != null) {
nameIcon.setImageDrawable(getNameIcon());
@ -652,11 +671,11 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
public abstract int getCategoryColor(String category);
public abstract int getCategoryPoints(String category);
public abstract int getCategoryPointsCount(String category);
public abstract void setColor(int color);
public abstract void setBackgroundType(FavouritePoint.BackgroundType backgroundType);
public abstract void setBackgroundType(BackgroundType backgroundType);
public abstract void setIcon(int iconId);
@ -674,7 +693,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
public abstract int getPointColor();
public abstract FavouritePoint.BackgroundType getBackgroundType();
public abstract BackgroundType getBackgroundType();
public abstract int getIconId();
@ -776,7 +795,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
int color = categoryColor == 0 ? getDefaultColor() : categoryColor;
holder.groupIcon.setImageDrawable(UiUtilities.tintDrawable(
ContextCompat.getDrawable(app, R.drawable.ic_action_folder), color));
holder.pointsCounter.setText(String.valueOf(getCategoryPoints(group)));
holder.pointsCounter.setText(String.valueOf(getCategoryPointsCount(group)));
int strokeColor;
int strokeWidth;
if (selectedItemName != null && selectedItemName.equals(items.get(position))) {
@ -784,17 +803,20 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
R.color.active_color_primary_dark : R.color.active_color_primary_light);
strokeWidth = 2;
} else {
strokeColor = ContextCompat.getColor(app, R.color.divider_color_light);
strokeColor = ContextCompat.getColor(app, nightMode ? R.color.stroked_buttons_and_links_outline_dark
: R.color.stroked_buttons_and_links_outline_light);
strokeWidth = 1;
}
GradientDrawable rectContourDrawable = (GradientDrawable) ContextCompat.getDrawable(app, R.drawable.bg_select_group_button_outline);
GradientDrawable rectContourDrawable = (GradientDrawable) ContextCompat.getDrawable(app,
R.drawable.bg_select_group_button_outline);
if (rectContourDrawable != null) {
rectContourDrawable.setStroke(AndroidUtils.dpToPx(app, strokeWidth), strokeColor);
holder.groupButton.setImageDrawable(rectContourDrawable);
}
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
AndroidUtils.setBackground(app, holder.groupButton, nightMode, R.drawable.ripple_solid_light, R.drawable.ripple_solid_dark);
AndroidUtils.setBackground(app, holder.groupButton, nightMode, R.drawable.ripple_solid_light_6dp,
R.drawable.ripple_solid_dark_6dp);
}
}
@ -833,7 +855,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
}
}
class GroupNameAdapter extends RecyclerView.Adapter<NameViewHolder> {
class IconCategoriesAdapter extends RecyclerView.Adapter<NameViewHolder> {
List<String> items;
@ -862,11 +884,13 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
textView.setTextColor(ContextCompat.getColor(app, R.color.preference_category_title));
GradientDrawable buttonBackground = (GradientDrawable) ContextCompat.getDrawable(app,
R.drawable.bg_select_icon_group_button).mutate();
buttonBackground.setStroke(AndroidUtils.dpToPx(app, 1), ContextCompat.getColor(app, R.color.divider_color_light));
buttonBackground.setStroke(AndroidUtils.dpToPx(app, 1), ContextCompat.getColor(app,
nightMode ? R.color.stroked_buttons_and_links_outline_dark
: R.color.stroked_buttons_and_links_outline_light));
buttonBackground.setColor(ContextCompat.getColor(app, R.color.color_transparent));
AndroidUtils.setBackground(holder.button, buttonBackground);
}
textView.setText(category);
textView.setText(capitalizeFirstLetter(category));
holder.button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@ -886,6 +910,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
static class NameViewHolder extends RecyclerView.ViewHolder {
final TextView buttonText;
final LinearLayout button;
NameViewHolder(@NonNull View itemView) {
super(itemView);
buttonText = itemView.findViewById(R.id.button_text);

View file

@ -31,6 +31,7 @@ import net.osmand.plus.mapcontextmenu.editors.WptPtEditor.OnDismissListener;
import net.osmand.util.Algorithms;
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -449,7 +450,14 @@ public class WptPtEditorFragmentNew extends PointEditorFragmentNew {
}
@Override
public int getCategoryPoints(String category) {
public int getCategoryPointsCount(String category) {
WptPtEditor editor = getWptPtEditor();
if (editor != null) {
List<WptPt> points = editor.getGpxFile().getPointsByCategories().get(category);
if (points != null) {
return points.size();
}
}
return 0;
}