commit
a37c7f8964
96 changed files with 1285 additions and 3190 deletions
|
@ -179,7 +179,7 @@
|
||||||
<string name="monitoring_is_enabled">Oppsyn er påskrudd</string>
|
<string name="monitoring_is_enabled">Oppsyn er påskrudd</string>
|
||||||
<string name="monitoring_is_disabled">Oppsyn er ikke aktivert</string>
|
<string name="monitoring_is_disabled">Oppsyn er ikke aktivert</string>
|
||||||
<string name="time_on_the_move">Tid i bevegelse</string>
|
<string name="time_on_the_move">Tid i bevegelse</string>
|
||||||
<string name="average_altitude">Gjennomsnittlig høyde</string>
|
<string name="average_altitude">Gjennomsnittshøyde</string>
|
||||||
<string name="average_speed">Gjennomsnittsfart</string>
|
<string name="average_speed">Gjennomsnittsfart</string>
|
||||||
<string name="open_in_osmand">Vis i OsmAnd</string>
|
<string name="open_in_osmand">Vis i OsmAnd</string>
|
||||||
<string name="end_date">Sluttdato</string>
|
<string name="end_date">Sluttdato</string>
|
||||||
|
|
|
@ -484,10 +484,6 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<activity android:name="net.osmand.plus.activities.SettingsActivity" android:label="@string/shared_string_settings" android:configChanges="keyboardHidden|orientation" />
|
|
||||||
<activity android:name="net.osmand.plus.activities.SettingsGeneralActivity" android:configChanges="keyboardHidden|orientation" />
|
|
||||||
<activity android:name="net.osmand.plus.activities.SettingsNavigationActivity" android:configChanges="keyboardHidden|orientation" />
|
|
||||||
|
|
||||||
<activity android:name="net.osmand.plus.activities.search.SearchActivity" android:label="@string/search_activity" />
|
<activity android:name="net.osmand.plus.activities.search.SearchActivity" android:label="@string/search_activity" />
|
||||||
<activity android:name="net.osmand.plus.activities.FavoritesListActivity" android:label="@string/favourites_list_activity" />
|
<activity android:name="net.osmand.plus.activities.FavoritesListActivity" android:label="@string/favourites_list_activity" />
|
||||||
<activity android:name=".myplaces.FavoritesActivity" android:windowSoftInputMode="adjustPan" />
|
<activity android:name=".myplaces.FavoritesActivity" android:windowSoftInputMode="adjustPan" />
|
||||||
|
|
|
@ -9,43 +9,46 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/feedbackButton"
|
android:id="@+id/feedbackButton"
|
||||||
|
style="@style/Widget.AppCompat.Button.Borderless"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/feedback"
|
android:text="@string/feedback"
|
||||||
style="@style/Widget.AppCompat.Button.Borderless"
|
android:textColor="?android:textColorSecondary"
|
||||||
tools:drawableTop="@drawable/ic_action_message"/>
|
tools:drawableTop="@drawable/ic_action_message" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/divider_color"/>
|
android:background="?attr/divider_color" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/contactUsButton"
|
android:id="@+id/contactUsButton"
|
||||||
|
style="@style/Widget.AppCompat.Button.Borderless"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/contact_us"
|
android:text="@string/contact_us"
|
||||||
style="@style/Widget.AppCompat.Button.Borderless"
|
android:textColor="?android:textColorSecondary"
|
||||||
tools:drawableTop="@drawable/ic_action_message"/>
|
tools:drawableTop="@drawable/ic_action_message" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/sendLogButtonDiv"
|
android:id="@+id/sendLogButtonDiv"
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/divider_color"/>
|
android:background="?attr/divider_color" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/sendLogButton"
|
android:id="@+id/sendLogButton"
|
||||||
|
style="@style/Widget.AppCompat.Button.Borderless"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/send_log"
|
android:text="@string/send_log"
|
||||||
style="@style/Widget.AppCompat.Button.Borderless"
|
android:textColor="?android:textColorSecondary"
|
||||||
tools:drawableTop="@drawable/ic_crashlog"/>
|
tools:drawableTop="@drawable/ic_crashlog" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -904,7 +904,7 @@
|
||||||
<string name="rendering_attr_OSMMapperAssistant_name">مساعد تخطيط OSM</string>
|
<string name="rendering_attr_OSMMapperAssistant_name">مساعد تخطيط OSM</string>
|
||||||
<string name="agps_info">معلومات A-GPS</string>
|
<string name="agps_info">معلومات A-GPS</string>
|
||||||
<string name="shared_string_manage">إدارة</string>
|
<string name="shared_string_manage">إدارة</string>
|
||||||
<string name="shared_string_edit">تعديل/حذف</string>
|
<string name="shared_string_edit">تعديل</string>
|
||||||
<string name="shared_string_places">أماكن</string>
|
<string name="shared_string_places">أماكن</string>
|
||||||
<string name="shared_string_search">بحث</string>
|
<string name="shared_string_search">بحث</string>
|
||||||
<string name="shared_string_show_description">عرض الوصف.</string>
|
<string name="shared_string_show_description">عرض الوصف.</string>
|
||||||
|
@ -1076,8 +1076,8 @@
|
||||||
<string name="rendering_category_others">سمات أخرى للخريطة</string>
|
<string name="rendering_category_others">سمات أخرى للخريطة</string>
|
||||||
<string name="map_widget_appearance_rem">العناصر الأخرى</string>
|
<string name="map_widget_appearance_rem">العناصر الأخرى</string>
|
||||||
<string name="map_widget_top">شريط المعلومات</string>
|
<string name="map_widget_top">شريط المعلومات</string>
|
||||||
<string name="map_widget_right">العدادات على اليمين</string>
|
<string name="map_widget_right">العدادات على اليسار</string>
|
||||||
<string name="map_widget_left">العدادات على اليسار</string>
|
<string name="map_widget_left">العدادات على اليمين</string>
|
||||||
<string name="search_radius_proximity">ضمن</string>
|
<string name="search_radius_proximity">ضمن</string>
|
||||||
<string name="anonymous_user">مستخدم مجهول</string>
|
<string name="anonymous_user">مستخدم مجهول</string>
|
||||||
<string name="logged_as">سجل الدخول ب %1$s</string>
|
<string name="logged_as">سجل الدخول ب %1$s</string>
|
||||||
|
@ -1153,7 +1153,7 @@
|
||||||
<string name="action_delete">حذف إجراء</string>
|
<string name="action_delete">حذف إجراء</string>
|
||||||
<string name="osm_edits">التعديلات</string>
|
<string name="osm_edits">التعديلات</string>
|
||||||
<string name="parking_place_limited">وقت وقوف السيارات يقتصر على</string>
|
<string name="parking_place_limited">وقت وقوف السيارات يقتصر على</string>
|
||||||
<string name="shared_string_collapse">تدلي</string>
|
<string name="shared_string_collapse">أقل</string>
|
||||||
<string name="drawer">قائمة منبسطة</string>
|
<string name="drawer">قائمة منبسطة</string>
|
||||||
<string name="osm_settings">تعديل OSM</string>
|
<string name="osm_settings">تعديل OSM</string>
|
||||||
<string name="free">فارغ %1$s</string>
|
<string name="free">فارغ %1$s</string>
|
||||||
|
@ -1483,7 +1483,7 @@
|
||||||
<string name="access_smart_autoannounce">التنبيه الآلي الذكي</string>
|
<string name="access_smart_autoannounce">التنبيه الآلي الذكي</string>
|
||||||
<string name="access_smart_autoannounce_descr">الإشعار فقط عند تغير الوجهة نحو نقطة الهدف.</string>
|
<string name="access_smart_autoannounce_descr">الإشعار فقط عند تغير الوجهة نحو نقطة الهدف.</string>
|
||||||
<string name="access_autoannounce_period">مهلة التنبيه الآلي</string>
|
<string name="access_autoannounce_period">مهلة التنبيه الآلي</string>
|
||||||
<string name="access_autoannounce_period_descr">أقل مهلة بين الاخطارات.</string>
|
<string name="access_autoannounce_period_descr">أقل مهلة بين الإشعارات.</string>
|
||||||
<string name="access_map_linked_to_location">الخريطة مرتبطة بالموقع</string>
|
<string name="access_map_linked_to_location">الخريطة مرتبطة بالموقع</string>
|
||||||
<string name="rendering_value_bold_name">عريض</string>
|
<string name="rendering_value_bold_name">عريض</string>
|
||||||
<string name="anonymous_user_hint">المستخدم المجهول لا يمكنه :
|
<string name="anonymous_user_hint">المستخدم المجهول لا يمكنه :
|
||||||
|
@ -1658,7 +1658,7 @@
|
||||||
<string name="no_location_permission">منح الوصول إلى بيانات الموقع.</string>
|
<string name="no_location_permission">منح الوصول إلى بيانات الموقع.</string>
|
||||||
<string name="rendering_attr_horseRoutes_name">مسارات الخيول</string>
|
<string name="rendering_attr_horseRoutes_name">مسارات الخيول</string>
|
||||||
<string name="shared_string_hide">إخفاء</string>
|
<string name="shared_string_hide">إخفاء</string>
|
||||||
<string name="av_video_quality_low">أقل جودة</string>
|
<string name="av_video_quality_low">جودة أقل</string>
|
||||||
<string name="av_video_quality_high">أعلى جودة</string>
|
<string name="av_video_quality_high">أعلى جودة</string>
|
||||||
<string name="copied_to_clipboard">تم النسخ في الحافظة</string>
|
<string name="copied_to_clipboard">تم النسخ في الحافظة</string>
|
||||||
<string name="context_menu_item_open_note">فتح ملاحظة OSM</string>
|
<string name="context_menu_item_open_note">فتح ملاحظة OSM</string>
|
||||||
|
@ -1838,7 +1838,7 @@
|
||||||
<string name="osb_comment_dialog_error">لا يمكن إضافة تعليق.</string>
|
<string name="osb_comment_dialog_error">لا يمكن إضافة تعليق.</string>
|
||||||
<string name="shared_string_commit">تقديم</string>
|
<string name="shared_string_commit">تقديم</string>
|
||||||
<string name="context_menu_item_delete_waypoint">حذف إحداثية GPX ؟</string>
|
<string name="context_menu_item_delete_waypoint">حذف إحداثية GPX ؟</string>
|
||||||
<string name="context_menu_item_edit_waypoint">تعديل/حذف</string>
|
<string name="context_menu_item_edit_waypoint">تعديل</string>
|
||||||
<string name="lang_nds">ألمانية منخفضة</string>
|
<string name="lang_nds">ألمانية منخفضة</string>
|
||||||
<string name="lang_fy">اللغة الفريزية</string>
|
<string name="lang_fy">اللغة الفريزية</string>
|
||||||
<string name="rendering_attr_hideProposed_name">الأشياء المقترحة</string>
|
<string name="rendering_attr_hideProposed_name">الأشياء المقترحة</string>
|
||||||
|
@ -1996,7 +1996,7 @@
|
||||||
<string name="rendering_attr_hideOverground_name">أشياء فوق سطح الأرض</string>
|
<string name="rendering_attr_hideOverground_name">أشياء فوق سطح الأرض</string>
|
||||||
<string name="shared_string_change">تغيير</string>
|
<string name="shared_string_change">تغيير</string>
|
||||||
<string name="get_started">ابدأ</string>
|
<string name="get_started">ابدأ</string>
|
||||||
<string name="routing_attr_short_way_name">طريق أقل استهلاكا للوقود</string>
|
<string name="routing_attr_short_way_name">طريق أقل استهلاكاً للوقود</string>
|
||||||
<string name="routing_attr_short_way_description">استخدم طريق أقل استهلاكا للوقود (عادة أقصر).</string>
|
<string name="routing_attr_short_way_description">استخدم طريق أقل استهلاكا للوقود (عادة أقصر).</string>
|
||||||
<string name="replace_favorite_confirmation">هل تريد استبدال المفضلة %1$s؟</string>
|
<string name="replace_favorite_confirmation">هل تريد استبدال المفضلة %1$s؟</string>
|
||||||
<string name="clear_tile_data">حذف جميع الطبقات</string>
|
<string name="clear_tile_data">حذف جميع الطبقات</string>
|
||||||
|
@ -2249,7 +2249,7 @@
|
||||||
<string name="quick_action_auto_zoom_on">قم بتشغيل التكبير التلقائي</string>
|
<string name="quick_action_auto_zoom_on">قم بتشغيل التكبير التلقائي</string>
|
||||||
<string name="quick_action_auto_zoom_off">إيقاف التكبير التلقائي</string>
|
<string name="quick_action_auto_zoom_off">إيقاف التكبير التلقائي</string>
|
||||||
<string name="quick_action_add_first_intermediate">إضافة وجهة وسطى</string>
|
<string name="quick_action_add_first_intermediate">إضافة وجهة وسطى</string>
|
||||||
<string name="analyze_on_map">تحليل على الخريطة</string>
|
<string name="analyze_on_map">تحليل</string>
|
||||||
<string name="shared_string_visible">المعروضة على الخريطة</string>
|
<string name="shared_string_visible">المعروضة على الخريطة</string>
|
||||||
<string name="restore_purchases">استرجاع الشراء</string>
|
<string name="restore_purchases">استرجاع الشراء</string>
|
||||||
<string name="do_not_send_anonymous_app_usage">لا ترسل إحصاءات مجهولة عن استخدام التطبيق</string>
|
<string name="do_not_send_anonymous_app_usage">لا ترسل إحصاءات مجهولة عن استخدام التطبيق</string>
|
||||||
|
@ -2302,7 +2302,7 @@
|
||||||
<string name="download_depth_countours">محيطات الأعماق البحرية</string>
|
<string name="download_depth_countours">محيطات الأعماق البحرية</string>
|
||||||
<string name="do_not_send_anonymous_app_usage_desc">أوسماند يقوم بجمع معلومات حول أجزاء من التطبيقات التي تفتحها. الموقع الخاص بك لا يرسل ابدأ، ولا أي شيء تقوم بإدخاله في التطبيق أو أي تفاصيل لمناطق رأيتها ، بحثت عنها أو نزلتها.</string>
|
<string name="do_not_send_anonymous_app_usage_desc">أوسماند يقوم بجمع معلومات حول أجزاء من التطبيقات التي تفتحها. الموقع الخاص بك لا يرسل ابدأ، ولا أي شيء تقوم بإدخاله في التطبيق أو أي تفاصيل لمناطق رأيتها ، بحثت عنها أو نزلتها.</string>
|
||||||
<string name="do_not_show_startup_messages_desc">عرض خصومات التطبيق ورسائل الأحداث المحلية الخاصة.</string>
|
<string name="do_not_show_startup_messages_desc">عرض خصومات التطبيق ورسائل الأحداث المحلية الخاصة.</string>
|
||||||
<string name="routing_attr_relief_smoothness_factor_plains_name">أقل تضاريس</string>
|
<string name="routing_attr_relief_smoothness_factor_plains_name">تضاريس أقل</string>
|
||||||
<string name="routing_attr_relief_smoothness_factor_more_plains_name">مسطح</string>
|
<string name="routing_attr_relief_smoothness_factor_more_plains_name">مسطح</string>
|
||||||
<string name="routing_attr_driving_style_balance_name">متوازن</string>
|
<string name="routing_attr_driving_style_balance_name">متوازن</string>
|
||||||
<string name="relief_smoothness_factor_descr">التضاريس المفضلة : مسطحة أو تلال.</string>
|
<string name="relief_smoothness_factor_descr">التضاريس المفضلة : مسطحة أو تلال.</string>
|
||||||
|
@ -2730,7 +2730,7 @@
|
||||||
<string name="coord_input_add_point">إضافة نقطة</string>
|
<string name="coord_input_add_point">إضافة نقطة</string>
|
||||||
<string name="coord_input_save_as_track">حفظ كمسار</string>
|
<string name="coord_input_save_as_track">حفظ كمسار</string>
|
||||||
<string name="coord_input_save_as_track_descr">أنت بحاجة %1$s نقاط. اكتب اسم ملف واضغط \"حفظ\".</string>
|
<string name="coord_input_save_as_track_descr">أنت بحاجة %1$s نقاط. اكتب اسم ملف واضغط \"حفظ\".</string>
|
||||||
<string name="error_notification_desc">يرجى إرسال لقطة شاشة من هذا الإخطار إلى support@osmand.net</string>
|
<string name="error_notification_desc">يرجى إرسال لقطة شاشة من هذا الإشعار إلى support@osmand.net</string>
|
||||||
<string name="quick_action_edit_actions">تعديل الإجراء</string>
|
<string name="quick_action_edit_actions">تعديل الإجراء</string>
|
||||||
<string name="get_osmand_live">احصل على أوسماند لايف لإلغاء قفل جميع الميزات: تحديثات الخرائط اليومية مع تنزيلات غير محدودة، وجميع الإضافات المدفوعة والمجانية ، ويكيبيديا، ويكي الرحلات وأكثر.</string>
|
<string name="get_osmand_live">احصل على أوسماند لايف لإلغاء قفل جميع الميزات: تحديثات الخرائط اليومية مع تنزيلات غير محدودة، وجميع الإضافات المدفوعة والمجانية ، ويكيبيديا، ويكي الرحلات وأكثر.</string>
|
||||||
<string name="osm_live_subscriptions">الاشتراكات</string>
|
<string name="osm_live_subscriptions">الاشتراكات</string>
|
||||||
|
@ -3101,7 +3101,7 @@
|
||||||
<string name="rendering_attr_tracktype_grade5_name">لينة</string>
|
<string name="rendering_attr_tracktype_grade5_name">لينة</string>
|
||||||
<string name="routeInfo_tracktype_name">متانة السطح</string>
|
<string name="routeInfo_tracktype_name">متانة السطح</string>
|
||||||
<string name="shared_string_file_is_saved">%s تم الحفظ</string>
|
<string name="shared_string_file_is_saved">%s تم الحفظ</string>
|
||||||
<string name="shared_string_open_track">مسار مفتوح</string>
|
<string name="shared_string_open_track">فتح المسار</string>
|
||||||
<string name="shared_string_track_is_saved">المسار %s تم حفظ</string>
|
<string name="shared_string_track_is_saved">المسار %s تم حفظ</string>
|
||||||
<string name="gpx_join_gaps">ربط الأجزاء</string>
|
<string name="gpx_join_gaps">ربط الأجزاء</string>
|
||||||
<string name="app_mode_camper">العربه</string>
|
<string name="app_mode_camper">العربه</string>
|
||||||
|
@ -3223,7 +3223,7 @@
|
||||||
<string name="app_mode_offroad">الطرق الوعره</string>
|
<string name="app_mode_offroad">الطرق الوعره</string>
|
||||||
<string name="edit_profile_setup_title">إعداد الوضع</string>
|
<string name="edit_profile_setup_title">إعداد الوضع</string>
|
||||||
<string name="edit_profile_setup_subtitle">يحتفظ الوضع بإعداداتك</string>
|
<string name="edit_profile_setup_subtitle">يحتفظ الوضع بإعداداتك</string>
|
||||||
<string name="edit_profile_setup_map_subtitle">حدد خيارات الخريطة للملف الشخصي</string>
|
<string name="edit_profile_setup_map_subtitle">حدد خيارات الخريطة للوضع</string>
|
||||||
<string name="edit_profile_screen_options_subtitle">حدد خيارات الشاشة للوضع</string>
|
<string name="edit_profile_screen_options_subtitle">حدد خيارات الشاشة للوضع</string>
|
||||||
<string name="edit_profile_nav_settings_subtitle">حدد إعدادات الملاحة للوضع</string>
|
<string name="edit_profile_nav_settings_subtitle">حدد إعدادات الملاحة للوضع</string>
|
||||||
<string name="routing_attr_max_num_changes_description">حدد الحد الأعلى للتغييرات</string>
|
<string name="routing_attr_max_num_changes_description">حدد الحد الأعلى للتغييرات</string>
|
||||||
|
@ -3387,7 +3387,7 @@
|
||||||
<string name="selected_profile">الوضع المحدد</string>
|
<string name="selected_profile">الوضع المحدد</string>
|
||||||
<string name="reset_confirmation_descr">بالضغط على %1$s، ستفقد كل تغييراتك.</string>
|
<string name="reset_confirmation_descr">بالضغط على %1$s، ستفقد كل تغييراتك.</string>
|
||||||
<string name="reset_all_profile_settings_descr">سيتم إعادة ضبط جميع إعدادات الوضع إلى الحالة الافتراضية بعد التثبيت.</string>
|
<string name="reset_all_profile_settings_descr">سيتم إعادة ضبط جميع إعدادات الوضع إلى الحالة الافتراضية بعد التثبيت.</string>
|
||||||
<string name="reset_all_profile_settings">استعادة الضبط الافتراضي؟</string>
|
<string name="reset_all_profile_settings">استعادة الضبط الافتراضي لكل الأوضاع؟</string>
|
||||||
<string name="ltr_or_rtl_combine_via_space">%2$s %1$s</string>
|
<string name="ltr_or_rtl_combine_via_space">%2$s %1$s</string>
|
||||||
<string name="ltr_or_rtl_combine_via_colon">%2$s :%1$s</string>
|
<string name="ltr_or_rtl_combine_via_colon">%2$s :%1$s</string>
|
||||||
<string name="file_does_not_contain_routing_rules">\'%1$s\' لا يحتوي الملف على قواعد توجيه ،يرجى اختيار ملف آخر.</string>
|
<string name="file_does_not_contain_routing_rules">\'%1$s\' لا يحتوي الملف على قواعد توجيه ،يرجى اختيار ملف آخر.</string>
|
||||||
|
@ -3489,7 +3489,7 @@
|
||||||
<string name="copy_coordinates">نسخ الإحداثيات</string>
|
<string name="copy_coordinates">نسخ الإحداثيات</string>
|
||||||
<string name="routing_profile_direct_to">مباشر إلى نقطة</string>
|
<string name="routing_profile_direct_to">مباشر إلى نقطة</string>
|
||||||
<string name="sort_by_category">الفرز حسب الفئة</string>
|
<string name="sort_by_category">الفرز حسب الفئة</string>
|
||||||
<string name="please_provide_profile_name_message">يرجى اعطاء اسم للملف الشخصي</string>
|
<string name="please_provide_profile_name_message">يرجى إدخال اسم للوضع</string>
|
||||||
<string name="open_settings">افتح الإعدادات</string>
|
<string name="open_settings">افتح الإعدادات</string>
|
||||||
<string name="plugin_disabled">الملحق مُعطل</string>
|
<string name="plugin_disabled">الملحق مُعطل</string>
|
||||||
<string name="shared_string_menu">القائمة</string>
|
<string name="shared_string_menu">القائمة</string>
|
||||||
|
@ -3732,7 +3732,7 @@
|
||||||
\nشهر واحد هو 43 829 دقيقة.</string>
|
\nشهر واحد هو 43 829 دقيقة.</string>
|
||||||
<string name="tiles_storage_descr">اختر كيفية تخزين الطبقات المنزلة.</string>
|
<string name="tiles_storage_descr">اختر كيفية تخزين الطبقات المنزلة.</string>
|
||||||
<string name="default_screen_timeout">مهلة الشاشة الافتراضية</string>
|
<string name="default_screen_timeout">مهلة الشاشة الافتراضية</string>
|
||||||
<string name="export_import_quick_actions_with_profiles_promo">يمكنك تصدير أو استيراد إجراءات سريعة باستخدام ملفات بروفايل التطبيق .</string>
|
<string name="export_import_quick_actions_with_profiles_promo">يمكنك تصدير أو استيراد إجراءات سريعة باستخدام أوضاع التطبيق .</string>
|
||||||
<string name="shared_string_delete_all_q">حذف الكل؟</string>
|
<string name="shared_string_delete_all_q">حذف الكل؟</string>
|
||||||
<string name="delete_all_actions_message_q">هل أنت متأكد من رغبتك في حذف الاختصارات السريعة %d نهائيًا؟</string>
|
<string name="delete_all_actions_message_q">هل أنت متأكد من رغبتك في حذف الاختصارات السريعة %d نهائيًا؟</string>
|
||||||
<string name="screen_timeout">مهلة الشاشة</string>
|
<string name="screen_timeout">مهلة الشاشة</string>
|
||||||
|
@ -3771,7 +3771,7 @@
|
||||||
\n
|
\n
|
||||||
\nحدد %1$s وستتلقى تنبيهات وتحذيرات حول كاميرات السرعة.
|
\nحدد %1$s وستتلقى تنبيهات وتحذيرات حول كاميرات السرعة.
|
||||||
\n
|
\n
|
||||||
\nحدد %2$s. جميع البيانات المتعلقة كاميرات السرعة: التنبيهات، والإخطارات، سيتم حذف نقاط الاهتمام حتى يتم إعادة تثبيت أوسماند تماما.</string>
|
\nحدد %2$s. جميع البيانات المتعلقة كاميرات السرعة: التنبيهات، والإشعارات، سيتم حذف نقاط الاهتمام حتى يتم إعادة تثبيت أوسماند تماما.</string>
|
||||||
<string name="routing_attr_length_description">تحديد الارتفاع الأعلى المسموح به على الطرق.</string>
|
<string name="routing_attr_length_description">تحديد الارتفاع الأعلى المسموح به على الطرق.</string>
|
||||||
<string name="routing_attr_length_name">حد الطول</string>
|
<string name="routing_attr_length_name">حد الطول</string>
|
||||||
<string name="speed_cameras_removed_descr">هذا الجهاز لا يملك كاميرات السرعة.</string>
|
<string name="speed_cameras_removed_descr">هذا الجهاز لا يملك كاميرات السرعة.</string>
|
||||||
|
@ -3909,7 +3909,7 @@
|
||||||
<string name="complex_routing_descr">التوجيه على مرحلتين لملاحة السيارة.</string>
|
<string name="complex_routing_descr">التوجيه على مرحلتين لملاحة السيارة.</string>
|
||||||
<string name="use_native_pt">تطوير النقل العام المحلي</string>
|
<string name="use_native_pt">تطوير النقل العام المحلي</string>
|
||||||
<string name="use_native_pt_desc">قم بالتبديل إلى Java (الآمن) حساب توجيه النقل العام</string>
|
<string name="use_native_pt_desc">قم بالتبديل إلى Java (الآمن) حساب توجيه النقل العام</string>
|
||||||
<string name="perform_oauth_authorization_description">قم بإجراء تسجيل دخول إلى OAuth لاستخدام ميزات osmedit</string>
|
<string name="perform_oauth_authorization_description">قم بتسجيل الدخول إلى OAuth لاستخدام ميزات osmedit</string>
|
||||||
<string name="perform_oauth_authorization">تسجيل الدخول عبر OAuth</string>
|
<string name="perform_oauth_authorization">تسجيل الدخول عبر OAuth</string>
|
||||||
<string name="clear_osm_token">مسح رمز OpenStreetMap OAuth</string>
|
<string name="clear_osm_token">مسح رمز OpenStreetMap OAuth</string>
|
||||||
<string name="osm_edit_logout_success">تسجيل الخروج بنجاح</string>
|
<string name="osm_edit_logout_success">تسجيل الخروج بنجاح</string>
|
||||||
|
@ -3920,4 +3920,6 @@
|
||||||
\nسيتوفر الرسم البياني بعد إعادة الحساب.</string>
|
\nسيتوفر الرسم البياني بعد إعادة الحساب.</string>
|
||||||
<string name="snowmobile_render_descr">للقيادة على الجليد مع طرق ومسارات مخصصة.</string>
|
<string name="snowmobile_render_descr">للقيادة على الجليد مع طرق ومسارات مخصصة.</string>
|
||||||
<string name="shared_string_graph">رسم بياني</string>
|
<string name="shared_string_graph">رسم بياني</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%2$s — %1$s</string>
|
||||||
|
<string name="app_mode_gap">فجوة</string>
|
||||||
</resources>
|
</resources>
|
|
@ -1553,7 +1553,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu
|
||||||
<string name="routing_attr_height_name">Límit d\'alçada</string>
|
<string name="routing_attr_height_name">Límit d\'alçada</string>
|
||||||
<string name="routing_attr_height_description">Indiqueu l\'alçada del vehicle que les rutes han d\'admetre.</string>
|
<string name="routing_attr_height_description">Indiqueu l\'alçada del vehicle que les rutes han d\'admetre.</string>
|
||||||
<string name="use_fast_recalculation">Recàlcul intel·ligent de la ruta</string>
|
<string name="use_fast_recalculation">Recàlcul intel·ligent de la ruta</string>
|
||||||
<string name="use_fast_recalculation_desc">En viatges llargs, només actualitzis la part inicial de la ruta.</string>
|
<string name="use_fast_recalculation_desc">Actualitza només la part inicial de la ruta. Pot ser usat per a viatges llargs.</string>
|
||||||
<string name="shared_string_logoff">Surt</string>
|
<string name="shared_string_logoff">Surt</string>
|
||||||
<string name="rendering_value_disabled_name">Desactivat</string>
|
<string name="rendering_value_disabled_name">Desactivat</string>
|
||||||
<string name="rendering_value_walkingRoutesScopeOSMC_name">Acoloreix segons el tipus de xarxa</string>
|
<string name="rendering_value_walkingRoutesScopeOSMC_name">Acoloreix segons el tipus de xarxa</string>
|
||||||
|
@ -3589,10 +3589,10 @@ Abasta l\'àrea: %1$s x %2$s</string>
|
||||||
<string name="slope_description">Les pistes es mostren sobre el terreny i amb colors.</string>
|
<string name="slope_description">Les pistes es mostren sobre el terreny i amb colors.</string>
|
||||||
<string name="download_slope_maps">Pistes</string>
|
<string name="download_slope_maps">Pistes</string>
|
||||||
<string name="custom_osmand_plugin">Connector d\'OsmAnd adaptat</string>
|
<string name="custom_osmand_plugin">Connector d\'OsmAnd adaptat</string>
|
||||||
<string name="replace_point_descr">Substitueix un altre punt per aquest</string>
|
<string name="replace_point_descr">Substitueix un altre punt per aquest.</string>
|
||||||
<string name="changes_applied_to_profile">S\'han fet els canvis al perfil \'%1$s\'.</string>
|
<string name="changes_applied_to_profile">S\'han fet els canvis al perfil \'%1$s\'.</string>
|
||||||
<string name="settings_item_read_error">No s\'ha pogut llegir des de \'%1$s\'.</string>
|
<string name="settings_item_read_error">No s\'ha pogut llegir des de \'%1$s\'.</string>
|
||||||
<string name="settings_item_write_error">No s\'ha pogut escriure %1$s.</string>
|
<string name="settings_item_write_error">No s\'ha pogut escriure a \'%1$s\'.</string>
|
||||||
<string name="settings_item_import_error">No s\'ha pogut importar des de \'%1$s\'.</string>
|
<string name="settings_item_import_error">No s\'ha pogut importar des de \'%1$s\'.</string>
|
||||||
<string name="select_track_file">Seleccioneu fitxer de la traça</string>
|
<string name="select_track_file">Seleccioneu fitxer de la traça</string>
|
||||||
<string name="shared_string_languages">Idiomes</string>
|
<string name="shared_string_languages">Idiomes</string>
|
||||||
|
@ -3619,7 +3619,7 @@ Abasta l\'àrea: %1$s x %2$s</string>
|
||||||
<string name="lang_an">Aragonès</string>
|
<string name="lang_an">Aragonès</string>
|
||||||
<string name="lang_lmo">Llombard</string>
|
<string name="lang_lmo">Llombard</string>
|
||||||
<string name="custom_color">Color personalitzat</string>
|
<string name="custom_color">Color personalitzat</string>
|
||||||
<string name="select_wikipedia_article_langs">Seleccioneu els idiomes de la Viquipèdia en que es veuran els articles al mapa. Mentre llegiu un article podeu modificar la llengua entre les disponibles.</string>
|
<string name="select_wikipedia_article_langs">Seleccioneu els idiomes per als articles de Viquipèdia al mapa. Canvieu la llengua entre les disponibles mentre llegiu un article.</string>
|
||||||
<string name="some_articles_may_not_available_in_lang">Alguns articles de la Viquipèdia podrien no estar disponibles en el vostre idioma.</string>
|
<string name="some_articles_may_not_available_in_lang">Alguns articles de la Viquipèdia podrien no estar disponibles en el vostre idioma.</string>
|
||||||
<string name="lang_zhyue">Cantonès</string>
|
<string name="lang_zhyue">Cantonès</string>
|
||||||
<string name="lang_zhminnan">Min nan</string>
|
<string name="lang_zhminnan">Min nan</string>
|
||||||
|
@ -3672,11 +3672,11 @@ Abasta l\'àrea: %1$s x %2$s</string>
|
||||||
<string name="routing_attr_length_name">Llargada màxima</string>
|
<string name="routing_attr_length_name">Llargada màxima</string>
|
||||||
<string name="shared_string_bearing">Trajectòria</string>
|
<string name="shared_string_bearing">Trajectòria</string>
|
||||||
<string name="item_deleted">S\'ha esborrat %1$s</string>
|
<string name="item_deleted">S\'ha esborrat %1$s</string>
|
||||||
<string name="speed_cameras_restart_descr">Cal reiniciar per esborrar totalment les dades de les càmeres de radar.</string>
|
<string name="speed_cameras_restart_descr">Reinicia l\'aplicació per esborrar totes les dades de les càmeres de radar.</string>
|
||||||
<string name="shared_string_uninstall_and_restart">Desinstal·la i Reinicia</string>
|
<string name="shared_string_uninstall_and_restart">Desinstal·la i Reinicia</string>
|
||||||
<string name="speed_cameras_removed_descr">Aquest dispositiu no inclou les càmeres de radar.</string>
|
<string name="speed_cameras_removed_descr">Aquest dispositiu no inclou les càmeres de radar.</string>
|
||||||
<string name="app_mode_inline_skates">Patins en línia</string>
|
<string name="app_mode_inline_skates">Patins en línia</string>
|
||||||
<string name="use_volume_buttons_as_zoom_descr">Activeu per controlar el nivell d\'ampliació del mapa amb els botons del volum del dispositiu.</string>
|
<string name="use_volume_buttons_as_zoom_descr">Controla el nivell d\'ampliació del mapa fent servir els botons del volum del dispositiu.</string>
|
||||||
<string name="use_volume_buttons_as_zoom">Botons de volum pel zoom</string>
|
<string name="use_volume_buttons_as_zoom">Botons de volum pel zoom</string>
|
||||||
<string name="delete_all_actions_message_q">Esteu segur que voleu suprimir definitivament %d dreceres\?</string>
|
<string name="delete_all_actions_message_q">Esteu segur que voleu suprimir definitivament %d dreceres\?</string>
|
||||||
<string name="export_import_quick_actions_with_profiles_promo">Podeu exportar o importar les dreceres amb els perfils de les aplicacions.</string>
|
<string name="export_import_quick_actions_with_profiles_promo">Podeu exportar o importar les dreceres amb els perfils de les aplicacions.</string>
|
||||||
|
@ -3686,7 +3686,7 @@ Abasta l\'àrea: %1$s x %2$s</string>
|
||||||
<string name="screen_timeout_descr">Si està activat \"%1$s\" el temps d\'activitat quedarà afectat.</string>
|
<string name="screen_timeout_descr">Si està activat \"%1$s\" el temps d\'activitat quedarà afectat.</string>
|
||||||
<string name="shared_string_tones">tones</string>
|
<string name="shared_string_tones">tones</string>
|
||||||
<string name="shared_string_meters">metres</string>
|
<string name="shared_string_meters">metres</string>
|
||||||
<string name="quick_action_remove_next_destination">Suprimeix la propera fita</string>
|
<string name="quick_action_remove_next_destination">Suprimeix la fita més propera</string>
|
||||||
<string name="please_provide_point_name_error">Proporcioneu un nom per al punt</string>
|
<string name="please_provide_point_name_error">Proporcioneu un nom per al punt</string>
|
||||||
<string name="quick_action_remove_next_destination_descr">La propera fita de la ruta s\'esborrarà. Si es tractés de la Destinació final, la navegació s\'aturaria.</string>
|
<string name="quick_action_remove_next_destination_descr">La propera fita de la ruta s\'esborrarà. Si es tractés de la Destinació final, la navegació s\'aturaria.</string>
|
||||||
<string name="search_download_wikipedia_maps">Baixa mapes de la Viquipèdia</string>
|
<string name="search_download_wikipedia_maps">Baixa mapes de la Viquipèdia</string>
|
||||||
|
@ -3850,4 +3850,13 @@ Abasta l\'àrea: %1$s x %2$s</string>
|
||||||
\n • S\'han corregit problemes en la importació/exportació de la configuració dels perfils
|
\n • S\'han corregit problemes en la importació/exportació de la configuració dels perfils
|
||||||
\n
|
\n
|
||||||
\n</string>
|
\n</string>
|
||||||
|
<string name="quick_action_transport_show">Mostra el transport públic</string>
|
||||||
|
<string name="shared_string_add_profile">Afegeix un perfil</string>
|
||||||
|
<string name="change_application_profile">Canvia el perfil de l\'aplicació</string>
|
||||||
|
<string name="index_item_world_basemap_detailed">Mapa general del món (detallat)</string>
|
||||||
|
<string name="unsupported_type_error">Tipus no suportat</string>
|
||||||
|
<string name="shared_string_always">Sempre</string>
|
||||||
|
<string name="screen_control">Control de pantalla</string>
|
||||||
|
<string name="development">Desenvolupament</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3588,20 +3588,20 @@
|
||||||
<string name="poi_substation_compensation">Kompenzační</string>
|
<string name="poi_substation_compensation">Kompenzační</string>
|
||||||
<string name="poi_substation_compression">Kompresní</string>
|
<string name="poi_substation_compression">Kompresní</string>
|
||||||
<string name="poi_substation_measurement">Měřicí</string>
|
<string name="poi_substation_measurement">Měřicí</string>
|
||||||
<string name="poi_rtsa_scale_nc">н/к</string>
|
<string name="poi_rtsa_scale_nc">n/c</string>
|
||||||
<string name="poi_rtsa_scale_nc_asterisk">н/к*</string>
|
<string name="poi_rtsa_scale_nc_asterisk">n/c*</string>
|
||||||
<string name="poi_rtsa_scale_1a">1А</string>
|
<string name="poi_rtsa_scale_1a">1А</string>
|
||||||
<string name="poi_rtsa_scale_1a_asterisk">1А*</string>
|
<string name="poi_rtsa_scale_1a_asterisk">1А*</string>
|
||||||
<string name="poi_rtsa_scale_1b">1Б</string>
|
<string name="poi_rtsa_scale_1b">1B</string>
|
||||||
<string name="poi_rtsa_scale_1b_asterisk">1Б*</string>
|
<string name="poi_rtsa_scale_1b_asterisk">1B*</string>
|
||||||
<string name="poi_rtsa_scale_2a">2А</string>
|
<string name="poi_rtsa_scale_2a">2A</string>
|
||||||
<string name="poi_rtsa_scale_2a_asterisk">2А*</string>
|
<string name="poi_rtsa_scale_2a_asterisk">2A*</string>
|
||||||
<string name="poi_rtsa_scale_2b">2Б</string>
|
<string name="poi_rtsa_scale_2b">2B</string>
|
||||||
<string name="poi_rtsa_scale_2b_asterisk">2Б*</string>
|
<string name="poi_rtsa_scale_2b_asterisk">2B*</string>
|
||||||
<string name="poi_rtsa_scale_3a">3А</string>
|
<string name="poi_rtsa_scale_3a">3A</string>
|
||||||
<string name="poi_rtsa_scale_3a_asterisk">3А*</string>
|
<string name="poi_rtsa_scale_3a_asterisk">3A*</string>
|
||||||
<string name="poi_rtsa_scale_3b">3Б</string>
|
<string name="poi_rtsa_scale_3b">3B</string>
|
||||||
<string name="poi_rtsa_scale_3b_asterisk">3Б*</string>
|
<string name="poi_rtsa_scale_3b_asterisk">3B*</string>
|
||||||
<string name="poi_snowmobile_filter">Přístup sněžným skútrům</string>
|
<string name="poi_snowmobile_filter">Přístup sněžným skútrům</string>
|
||||||
<string name="poi_access_bus">Přístup autobusům</string>
|
<string name="poi_access_bus">Přístup autobusům</string>
|
||||||
<string name="poi_access_caravan">Přístup karavanům</string>
|
<string name="poi_access_caravan">Přístup karavanům</string>
|
||||||
|
@ -3827,7 +3827,7 @@
|
||||||
<string name="poi_osmand_fire_hydrant_pressure_pressurized">Pod tlakem</string>
|
<string name="poi_osmand_fire_hydrant_pressure_pressurized">Pod tlakem</string>
|
||||||
<string name="poi_fire_hydrant_style_water_source_groundwater">Podzemní voda</string>
|
<string name="poi_fire_hydrant_style_water_source_groundwater">Podzemní voda</string>
|
||||||
<string name="poi_fire_hydrant_type_pipe">Roura</string>
|
<string name="poi_fire_hydrant_type_pipe">Roura</string>
|
||||||
<string name="poi_internet_access_fee_customers">Internetový přístup: zdarma pro zákazníky</string>
|
<string name="poi_internet_access_fee_customers">Internetový přístup: zákazníci</string>
|
||||||
<string name="poi_monastery_type_clerks_regular">Typ klášteru: řeholnický</string>
|
<string name="poi_monastery_type_clerks_regular">Typ klášteru: řeholnický</string>
|
||||||
<string name="poi_monastery_type_hermitage">Typ klášteru: poustevnický</string>
|
<string name="poi_monastery_type_hermitage">Typ klášteru: poustevnický</string>
|
||||||
<string name="poi_monastery_type_canonry">Typ klášteru: kanovnický</string>
|
<string name="poi_monastery_type_canonry">Typ klášteru: kanovnický</string>
|
||||||
|
@ -3845,4 +3845,8 @@
|
||||||
<string name="poi_traffic_signals_vibration">Vibrace</string>
|
<string name="poi_traffic_signals_vibration">Vibrace</string>
|
||||||
<string name="poi_fire_hydrant_pressure_filter">Tlak</string>
|
<string name="poi_fire_hydrant_pressure_filter">Tlak</string>
|
||||||
<string name="poi_fuel_lng">Zkapalněný zemní plyn</string>
|
<string name="poi_fuel_lng">Zkapalněný zemní plyn</string>
|
||||||
|
<string name="poi_parking_layby">Podél silnice</string>
|
||||||
|
<string name="poi_parking_sheds">Přístřešky</string>
|
||||||
|
<string name="poi_parking_rooftop">Střešní</string>
|
||||||
|
<string name="poi_gpx_point">Bod GPX</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3578,4 +3578,15 @@ Zobrazená oblast: %1$s x %2$s</string>
|
||||||
<string name="sort_name_ascending">Název: A – Z</string>
|
<string name="sort_name_ascending">Název: A – Z</string>
|
||||||
<string name="start_finish_icons">Ikony startu/cíle</string>
|
<string name="start_finish_icons">Ikony startu/cíle</string>
|
||||||
<string name="contour_lines_thanks">Děkujeme za zakoupení modulu \'Vrstevnice\'</string>
|
<string name="contour_lines_thanks">Děkujeme za zakoupení modulu \'Vrstevnice\'</string>
|
||||||
|
<string name="perform_oauth_authorization_description">Přihlásit se pomocí OAuth pro použití funkcí editace OSM</string>
|
||||||
|
<string name="perform_oauth_authorization">Přihlásit pomocí OAuth</string>
|
||||||
|
<string name="clear_osm_token">Vymazat OpenStreetMap OAuth token</string>
|
||||||
|
<string name="osm_edit_logout_success">Odhlášení úspěšné</string>
|
||||||
|
<string name="file_already_imported">Soubor je již importovaný v OsmAnd</string>
|
||||||
|
<string name="use_two_phase_routing">Použít dvoufázový algoritmus A* pro výpočet trasy</string>
|
||||||
|
<string name="shared_string_graph">Graf</string>
|
||||||
|
<string name="message_need_calculate_route_before_show_graph">Údaje %1$s jsou dostupné pouze na cestách, pro jejich získání musíte vypočítat trasu pomocí “Trasa medzi body”.</string>
|
||||||
|
<string name="message_graph_will_be_available_after_recalculation">Počkejte na přepočet trasy.
|
||||||
|
\nGraf bude dostupný po přepočtu.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3788,4 +3788,6 @@
|
||||||
<string name="all_next_segments_will_be_recalc">Alle efterfølgende segmenter genberegnes ved hjælp af den valgte profil.</string>
|
<string name="all_next_segments_will_be_recalc">Alle efterfølgende segmenter genberegnes ved hjælp af den valgte profil.</string>
|
||||||
<string name="all_previous_segments_will_be_recalc">Alle tidligere segmenter genberegnes ved hjælp af den valgte profil.</string>
|
<string name="all_previous_segments_will_be_recalc">Alle tidligere segmenter genberegnes ved hjælp af den valgte profil.</string>
|
||||||
<string name="start_finish_icons">Start-/slutikoner</string>
|
<string name="start_finish_icons">Start-/slutikoner</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
|
<string name="app_mode_gap">Hul</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3848,4 +3848,8 @@
|
||||||
<string name="poi_recycling_small_electrical_appliances">Kleine Elektrogeräte</string>
|
<string name="poi_recycling_small_electrical_appliances">Kleine Elektrogeräte</string>
|
||||||
<string name="poi_nuts">Nussladen</string>
|
<string name="poi_nuts">Nussladen</string>
|
||||||
<string name="poi_fuel_lng">Flüssigerdgas</string>
|
<string name="poi_fuel_lng">Flüssigerdgas</string>
|
||||||
|
<string name="poi_parking_layby">Parken in Parallelstraße</string>
|
||||||
|
<string name="poi_parking_sheds">Überdachter Parkplatz</string>
|
||||||
|
<string name="poi_parking_rooftop">Dachparkplätze</string>
|
||||||
|
<string name="poi_gpx_point">GPX-Wegpunkt</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3652,9 +3652,9 @@
|
||||||
<string name="ltr_or_rtl_combine_via_slash_with_space">%1$s / %2$s</string>
|
<string name="ltr_or_rtl_combine_via_slash_with_space">%1$s / %2$s</string>
|
||||||
<string name="osm_live_payment_subscription_management">Die Bezahlung wird Ihrem Google Play-Konto bei der Bestätigung des Kaufs belastet.
|
<string name="osm_live_payment_subscription_management">Die Bezahlung wird Ihrem Google Play-Konto bei der Bestätigung des Kaufs belastet.
|
||||||
\n
|
\n
|
||||||
\n Das Abonnement verlängert sich automatisch, sofern es nicht vor dem Verlängerungsdatum gekündigt wird. Ihr Konto wird für den Verlängerungszeitraum (Monat / drei Monate / Jahr) nur am Verlängerungsdatum belastet.
|
\nDas Abonnement verlängert sich automatisch, sofern es nicht vor dem Verlängerungsdatum gekündigt wird. Ihr Konto wird für den Verlängerungszeitraum (Monat / drei Monate / Jahr) nur am Verlängerungsdatum belastet.
|
||||||
\n
|
\n
|
||||||
\n Sie können Ihre Abonnements verwalten und kündigen, indem Sie zu Ihren Google Play-Einstellungen gehen.</string>
|
\nSie können Ihre Abonnements verwalten und kündigen, indem Sie zu Ihren Google Play-Einstellungen gehen.</string>
|
||||||
<string name="search_poi_types">Suche nach POI-Typen</string>
|
<string name="search_poi_types">Suche nach POI-Typen</string>
|
||||||
<string name="search_poi_types_descr">Kombinieren Sie POI-Typen aus verschiedenen Kategorien. Tippen Sie auf den Schalter, um alle auszuwählen, tippen Sie auf die linke Seite zur Kategorieauswahl.</string>
|
<string name="search_poi_types_descr">Kombinieren Sie POI-Typen aus verschiedenen Kategorien. Tippen Sie auf den Schalter, um alle auszuwählen, tippen Sie auf die linke Seite zur Kategorieauswahl.</string>
|
||||||
<string name="shared_string_divider">Trenner</string>
|
<string name="shared_string_divider">Trenner</string>
|
||||||
|
@ -3913,9 +3913,9 @@
|
||||||
<string name="osm_live_payment_desc_hw">Das Abonnement wird pro ausgewähltem Zeitraum berechnet. Sie können das Abonnement jederzeit über die AppGallery kündigen.</string>
|
<string name="osm_live_payment_desc_hw">Das Abonnement wird pro ausgewähltem Zeitraum berechnet. Sie können das Abonnement jederzeit über die AppGallery kündigen.</string>
|
||||||
<string name="osm_live_payment_subscription_management_hw">Die Bezahlung wird Ihrem AppGallery-Konto bei der Bestätigung des Kaufs belastet.
|
<string name="osm_live_payment_subscription_management_hw">Die Bezahlung wird Ihrem AppGallery-Konto bei der Bestätigung des Kaufs belastet.
|
||||||
\n
|
\n
|
||||||
\n Das Abonnement verlängert sich automatisch, sofern es nicht vor dem Verlängerungsdatum gekündigt wird. Ihr Konto wird für den Verlängerungszeitraum (Monat / drei Monate / Jahr) nur am Verlängerungsdatum belastet.
|
\nDas Abonnement verlängert sich automatisch, sofern es nicht vor dem Verlängerungsdatum gekündigt wird. Ihr Konto wird für den Verlängerungszeitraum (Monat / drei Monate / Jahr) nur am Verlängerungsdatum belastet.
|
||||||
\n
|
\n
|
||||||
\n Sie können Ihre Abonnements verwalten und kündigen, indem Sie zu Ihren AppGallery-Einstellungen gehen.</string>
|
\nSie können Ihre Abonnements verwalten und kündigen, indem Sie zu Ihren AppGallery-Einstellungen gehen.</string>
|
||||||
<string name="routing_attr_avoid_footways_description">Vermeidet Fußwege</string>
|
<string name="routing_attr_avoid_footways_description">Vermeidet Fußwege</string>
|
||||||
<string name="routing_attr_avoid_footways_name">Keine Fußwege</string>
|
<string name="routing_attr_avoid_footways_name">Keine Fußwege</string>
|
||||||
<string name="development">Entwicklung</string>
|
<string name="development">Entwicklung</string>
|
||||||
|
@ -3929,4 +3929,8 @@
|
||||||
<string name="file_already_imported">Datei wurde bereits in OsmAnd importiert</string>
|
<string name="file_already_imported">Datei wurde bereits in OsmAnd importiert</string>
|
||||||
<string name="perform_oauth_authorization">Anmelden über OAuth</string>
|
<string name="perform_oauth_authorization">Anmelden über OAuth</string>
|
||||||
<string name="clear_osm_token">OpenStreetMap OAuth-Token löschen</string>
|
<string name="clear_osm_token">OpenStreetMap OAuth-Token löschen</string>
|
||||||
|
<string name="what_is_new">Was ist neu</string>
|
||||||
|
<string name="snowmobile_render_descr">Für das Schneemobilfahren mit speziellen Straßen und Tracks.</string>
|
||||||
|
<string name="perform_oauth_authorization_description">Durchführen eines OAuth-Logins zur Nutzung der osmedit-Funktionen</string>
|
||||||
|
<string name="use_two_phase_routing">2-Phasen-A*-Routing-Algorithmus verwenden</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3838,4 +3838,8 @@
|
||||||
<string name="poi_departures_board">Tabulo de forveturoj</string>
|
<string name="poi_departures_board">Tabulo de forveturoj</string>
|
||||||
<string name="poi_drinking_water_refill">Plenigi per trinkebla akvo</string>
|
<string name="poi_drinking_water_refill">Plenigi per trinkebla akvo</string>
|
||||||
<string name="poi_fuel_lng">tergaso likva (LNG)</string>
|
<string name="poi_fuel_lng">tergaso likva (LNG)</string>
|
||||||
|
<string name="poi_parking_layby">laŭlonge de strato</string>
|
||||||
|
<string name="poi_parking_sheds">privataj garaĝ-budoj</string>
|
||||||
|
<string name="poi_parking_rooftop">tegmento</string>
|
||||||
|
<string name="poi_gpx_point">GPX-punkto</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3931,9 +3931,10 @@
|
||||||
<string name="osm_edit_logout_success">Sesión finalizada</string>
|
<string name="osm_edit_logout_success">Sesión finalizada</string>
|
||||||
<string name="snowmobile_render_descr">Para caminos y senderos exclusivos de motos de nieve.</string>
|
<string name="snowmobile_render_descr">Para caminos y senderos exclusivos de motos de nieve.</string>
|
||||||
<string name="file_already_imported">El archivo ya fue importado en OsmAnd</string>
|
<string name="file_already_imported">El archivo ya fue importado en OsmAnd</string>
|
||||||
<string name="use_two_phase_routing">Usar el algoritmo de enrutamiento A* de 2 fases</string>
|
<string name="use_two_phase_routing">Usar el algoritmo de navegación A* bifásica</string>
|
||||||
<string name="shared_string_graph">Gráfico</string>
|
<string name="shared_string_graph">Gráfico</string>
|
||||||
<string name="message_need_calculate_route_before_show_graph">%1$s datos disponibles sólo en los caminos, necesitas calcular una ruta usando «Ruta entre puntos» para obtenerla.</string>
|
<string name="message_need_calculate_route_before_show_graph">%1$s datos disponibles sólo en los caminos, necesitas calcular una ruta usando «Ruta entre puntos» para obtenerla.</string>
|
||||||
<string name="message_graph_will_be_available_after_recalculation">Espera el recálculo de la ruta.
|
<string name="message_graph_will_be_available_after_recalculation">Espera el recálculo de la ruta.
|
||||||
\nEl gráfico estará disponible después del recálculo.</string>
|
\nEl gráfico estará disponible después del recálculo.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3774,7 +3774,7 @@
|
||||||
<string name="poi_tactile_paving_incorrect">Ebaõige</string>
|
<string name="poi_tactile_paving_incorrect">Ebaõige</string>
|
||||||
<string name="poi_tactile_paving_contrasted">Kontrastne</string>
|
<string name="poi_tactile_paving_contrasted">Kontrastne</string>
|
||||||
<string name="poi_traffic_signals_sound_locate">Ainult kui jalakäijatele lubatud</string>
|
<string name="poi_traffic_signals_sound_locate">Ainult kui jalakäijatele lubatud</string>
|
||||||
<string name="poi_internet_access_fee_customers">Tasuline internetipunkt</string>
|
<string name="poi_internet_access_fee_customers">Tasuline internetipunkt klientidele</string>
|
||||||
<string name="poi_video_no">Ei</string>
|
<string name="poi_video_no">Ei</string>
|
||||||
<string name="poi_video_yes">Jah</string>
|
<string name="poi_video_yes">Jah</string>
|
||||||
<string name="poi_booth">Kioski tüüp</string>
|
<string name="poi_booth">Kioski tüüp</string>
|
||||||
|
@ -3827,4 +3827,8 @@
|
||||||
<string name="poi_beehive">Mesitaru</string>
|
<string name="poi_beehive">Mesitaru</string>
|
||||||
<string name="poi_nuts">Pähklipood</string>
|
<string name="poi_nuts">Pähklipood</string>
|
||||||
<string name="poi_fuel_lng">Veeldatud maagaas</string>
|
<string name="poi_fuel_lng">Veeldatud maagaas</string>
|
||||||
|
<string name="poi_gpx_point">GPX sõlm</string>
|
||||||
|
<string name="poi_parking_layby">Parkla kiirtee ääres</string>
|
||||||
|
<string name="poi_parking_sheds">Parkimine varjualustes</string>
|
||||||
|
<string name="poi_parking_rooftop">Parkla katusel</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3782,4 +3782,8 @@
|
||||||
<string name="what_is_new">Meie uudised</string>
|
<string name="what_is_new">Meie uudised</string>
|
||||||
<string name="use_two_phase_routing">Kasuta kahefaasilist A-klassi teekonna koostamise algoritmi</string>
|
<string name="use_two_phase_routing">Kasuta kahefaasilist A-klassi teekonna koostamise algoritmi</string>
|
||||||
<string name="file_already_imported">See fail on juba OsmAnd\'i imporditud</string>
|
<string name="file_already_imported">See fail on juba OsmAnd\'i imporditud</string>
|
||||||
|
<string name="use_live_routing">OsmAnd andmed reaalajas</string>
|
||||||
|
<string name="use_live_public_transport">OsmAnd andmed reaalajas</string>
|
||||||
|
<string name="snowmobile_render_descr">Mootorsaanide sõitmine eraldi määratud teedel ja radadel.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -1050,7 +1050,7 @@
|
||||||
<string name="poi_nudism_no">Interdit</string>
|
<string name="poi_nudism_no">Interdit</string>
|
||||||
<string name="poi_nudism_obligatory">Obligatoire</string>
|
<string name="poi_nudism_obligatory">Obligatoire</string>
|
||||||
<string name="poi_population">Population</string>
|
<string name="poi_population">Population</string>
|
||||||
<string name="poi_parking_underground">Parking : sous-terrain</string>
|
<string name="poi_parking_underground">Parking : souterrain</string>
|
||||||
<string name="poi_trees_olive">Olivier</string>
|
<string name="poi_trees_olive">Olivier</string>
|
||||||
<string name="poi_trees_apple">Pommier</string>
|
<string name="poi_trees_apple">Pommier</string>
|
||||||
<string name="poi_trees_oil">Palmier</string>
|
<string name="poi_trees_oil">Palmier</string>
|
||||||
|
|
|
@ -3845,7 +3845,7 @@
|
||||||
<string name="simplified_track">Trace simplifiée</string>
|
<string name="simplified_track">Trace simplifiée</string>
|
||||||
<string name="shared_string_file_name">Nom de fichier</string>
|
<string name="shared_string_file_name">Nom de fichier</string>
|
||||||
<string name="system_default_theme">Par défaut</string>
|
<string name="system_default_theme">Par défaut</string>
|
||||||
<string name="open_saved_track">Ouvrir une trace enregistrée</string>
|
<string name="open_saved_track">Ouvrir la trace enregistrée</string>
|
||||||
<string name="shared_string_is_saved">a été enregistré</string>
|
<string name="shared_string_is_saved">a été enregistré</string>
|
||||||
<string name="one_point_error">Veuillez ajouter au moins deux points.</string>
|
<string name="one_point_error">Veuillez ajouter au moins deux points.</string>
|
||||||
<string name="import_track_descr">Sélectionnez le fichier de trace à suivre ou importez-le depuis votre appareil.</string>
|
<string name="import_track_descr">Sélectionnez le fichier de trace à suivre ou importez-le depuis votre appareil.</string>
|
||||||
|
@ -3912,4 +3912,6 @@
|
||||||
\nLe graphique sera disponible à l\'issue du calcul.</string>
|
\nLe graphique sera disponible à l\'issue du calcul.</string>
|
||||||
<string name="snowmobile_render_descr">Pour la conduite en motoneige avec des routes et des pistes dédiées.</string>
|
<string name="snowmobile_render_descr">Pour la conduite en motoneige avec des routes et des pistes dédiées.</string>
|
||||||
<string name="shared_string_graph">Graphique</string>
|
<string name="shared_string_graph">Graphique</string>
|
||||||
|
<string name="app_mode_gap">Écart</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s - %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3950,4 +3950,9 @@ Lon %2$s</string>
|
||||||
<string name="perform_oauth_authorization">Entrar polo OAuth</string>
|
<string name="perform_oauth_authorization">Entrar polo OAuth</string>
|
||||||
<string name="clear_osm_token">Limpar token do OpenStreetMap OAuth</string>
|
<string name="clear_osm_token">Limpar token do OpenStreetMap OAuth</string>
|
||||||
<string name="osm_edit_logout_success">Sesión rematada</string>
|
<string name="osm_edit_logout_success">Sesión rematada</string>
|
||||||
|
<string name="snowmobile_render_descr">Para estradas e pistas exclusivas de motos de neve.</string>
|
||||||
|
<string name="file_already_imported">O ficheiro xa foi importado no OsmAnd</string>
|
||||||
|
<string name="use_two_phase_routing">Usar algoritmo de enrutamento A* de 2 fases</string>
|
||||||
|
<string name="shared_string_graph">Gráfica</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -454,7 +454,7 @@
|
||||||
<string name="poi_attraction_train">Vonat (látványosság)</string>
|
<string name="poi_attraction_train">Vonat (látványosság)</string>
|
||||||
<string name="poi_attraction_water_slide">Vízi csúszda</string>
|
<string name="poi_attraction_water_slide">Vízi csúszda</string>
|
||||||
<string name="poi_hunting_lodge">Vadászház</string>
|
<string name="poi_hunting_lodge">Vadászház</string>
|
||||||
<string name="poi_internet_access_wlan">Internetcsatlakozás: WLAN</string>
|
<string name="poi_internet_access_wlan">Internetcsatlakozás: WLAN (wifi)</string>
|
||||||
<string name="poi_internet_access_terminal">Internetcsatlakozás: munkaállomás</string>
|
<string name="poi_internet_access_terminal">Internetcsatlakozás: munkaállomás</string>
|
||||||
<string name="poi_internet_access_wired">Internetcsatlakozás: kábel</string>
|
<string name="poi_internet_access_wired">Internetcsatlakozás: kábel</string>
|
||||||
<string name="poi_internet_access_public">Internetcsatlakozás: nyilvános</string>
|
<string name="poi_internet_access_public">Internetcsatlakozás: nyilvános</string>
|
||||||
|
@ -836,7 +836,7 @@
|
||||||
<string name="poi_denomination_georgian_orthodox">Grúz ortodox</string>
|
<string name="poi_denomination_georgian_orthodox">Grúz ortodox</string>
|
||||||
<string name="poi_denomination_romanian_orthodox">Román ortodox</string>
|
<string name="poi_denomination_romanian_orthodox">Román ortodox</string>
|
||||||
<string name="poi_denomination_coptic_orthodox">Kopt ortodox</string>
|
<string name="poi_denomination_coptic_orthodox">Kopt ortodox</string>
|
||||||
<string name="poi_internet_access_yes">Internetcsatlakozás</string>
|
<string name="poi_internet_access_yes">Internetcsatlakozás van</string>
|
||||||
<string name="poi_internet_access_no">Internetcsatlakozás nincs</string>
|
<string name="poi_internet_access_no">Internetcsatlakozás nincs</string>
|
||||||
<string name="poi_dance_floor">Tánctér</string>
|
<string name="poi_dance_floor">Tánctér</string>
|
||||||
<string name="poi_nightclub">Night club; Diszkó</string>
|
<string name="poi_nightclub">Night club; Diszkó</string>
|
||||||
|
@ -1547,7 +1547,7 @@
|
||||||
<string name="poi_internet_access_type_wlan">Wi-Fi</string>
|
<string name="poi_internet_access_type_wlan">Wi-Fi</string>
|
||||||
<string name="poi_internet_access_type_terminal">Munkaállomás</string>
|
<string name="poi_internet_access_type_terminal">Munkaállomás</string>
|
||||||
<string name="poi_internet_access_type_wired">Vezetékes</string>
|
<string name="poi_internet_access_type_wired">Vezetékes</string>
|
||||||
<string name="poi_internet_access_type_public">Nyilvános</string>
|
<string name="poi_internet_access_type_public">Internetcsatlakozás: nyilvános</string>
|
||||||
<string name="poi_internet_access_type_service">Segítenek</string>
|
<string name="poi_internet_access_type_service">Segítenek</string>
|
||||||
<string name="poi_internet_access_type_no">Internetcsatlakozás nincs</string>
|
<string name="poi_internet_access_type_no">Internetcsatlakozás nincs</string>
|
||||||
<string name="poi_internet_access_type_yes">Internetcsatlakozás van</string>
|
<string name="poi_internet_access_type_yes">Internetcsatlakozás van</string>
|
||||||
|
@ -3836,4 +3836,8 @@
|
||||||
<string name="poi_nuts">Mag- és aszaltgyümölcsbolt</string>
|
<string name="poi_nuts">Mag- és aszaltgyümölcsbolt</string>
|
||||||
<string name="poi_beehive">Méhkaptár</string>
|
<string name="poi_beehive">Méhkaptár</string>
|
||||||
<string name="poi_fuel_lng">LNG (cseppfolyósított földgáz)</string>
|
<string name="poi_fuel_lng">LNG (cseppfolyósított földgáz)</string>
|
||||||
|
<string name="poi_parking_layby">Út mellett parkolósáv (UK)</string>
|
||||||
|
<string name="poi_parking_sheds">Fedett parkolóhely</string>
|
||||||
|
<string name="poi_parking_rooftop">Tető</string>
|
||||||
|
<string name="poi_internet_access_fee_customers">Internetcsatlakozás: ügyfeleknek</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3509,7 +3509,7 @@
|
||||||
<string name="clear_recorded_data">Rögzített adatok törlése</string>
|
<string name="clear_recorded_data">Rögzített adatok törlése</string>
|
||||||
<string name="terrain_empty_state_text">Engedélyezésével domborzatárnyékolás vagy lejtőtérkép jeleníthető meg. Ezekről a térképfajtákról többet olvashat a honlapunkon.</string>
|
<string name="terrain_empty_state_text">Engedélyezésével domborzatárnyékolás vagy lejtőtérkép jeleníthető meg. Ezekről a térképfajtákról többet olvashat a honlapunkon.</string>
|
||||||
<string name="app_mode_ski_touring">Túrasízés</string>
|
<string name="app_mode_ski_touring">Túrasízés</string>
|
||||||
<string name="app_mode_ski_snowmobile">Motoros hószán</string>
|
<string name="app_mode_ski_snowmobile">Motoros szán</string>
|
||||||
<string name="custom_osmand_plugin">Egyéni OsmAnd bővítmény</string>
|
<string name="custom_osmand_plugin">Egyéni OsmAnd bővítmény</string>
|
||||||
<string name="settings_item_read_error">Sikertelen olvasás innen: \'%1$s\'.</string>
|
<string name="settings_item_read_error">Sikertelen olvasás innen: \'%1$s\'.</string>
|
||||||
<string name="settings_item_write_error">Sikertelen írás ide: \'%1$s\'.</string>
|
<string name="settings_item_write_error">Sikertelen írás ide: \'%1$s\'.</string>
|
||||||
|
@ -3920,4 +3920,10 @@
|
||||||
<string name="osm_edit_logout_success">Sikeresen kijelentkezett</string>
|
<string name="osm_edit_logout_success">Sikeresen kijelentkezett</string>
|
||||||
<string name="use_two_phase_routing">Kétszakaszos A* útvonaltervezési algoritmus használata</string>
|
<string name="use_two_phase_routing">Kétszakaszos A* útvonaltervezési algoritmus használata</string>
|
||||||
<string name="file_already_imported">A fájl már importálva van az OsmAndba</string>
|
<string name="file_already_imported">A fájl már importálva van az OsmAndba</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s - %2$s</string>
|
||||||
|
<string name="snowmobile_render_descr">Motorosszánutakhoz kifejezetten motoros szán számára kijelölt utakon.</string>
|
||||||
|
<string name="shared_string_graph">Grafikon</string>
|
||||||
|
<string name="message_need_calculate_route_before_show_graph">%1$s adatok csak az utakról állnak rendelkezésre. Használja az „Útvonal tervezése pontok között” funkciót.</string>
|
||||||
|
<string name="message_graph_will_be_available_after_recalculation">Várja meg az útvonal újraszámítását.
|
||||||
|
\nAz ábra az újraszámítás után lesz látható.</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3905,4 +3905,32 @@
|
||||||
<string name="sort_name_ascending">Nome: A – Z</string>
|
<string name="sort_name_ascending">Nome: A – Z</string>
|
||||||
<string name="start_finish_icons">Icona Partenza/Arrivo</string>
|
<string name="start_finish_icons">Icona Partenza/Arrivo</string>
|
||||||
<string name="contour_lines_thanks">Grazie per l\'acquisto del \'Plugin delle curve di livello\'</string>
|
<string name="contour_lines_thanks">Grazie per l\'acquisto del \'Plugin delle curve di livello\'</string>
|
||||||
|
<string name="what_is_new">Novità</string>
|
||||||
|
<string name="snowmobile_render_descr">Per slitte a motore con strade e sentieri dedicati.</string>
|
||||||
|
<string name="osm_live_payment_desc_hw">Sottoscrizione addebitata per il periodo selezionato. Cancellala nell\'AppGallery in ogni momento.</string>
|
||||||
|
<string name="osm_live_payment_subscription_management_hw">Il pagamento sarà addebitato nella tuo account AppGallery alla conferma dell\'acquisto.
|
||||||
|
\n
|
||||||
|
\nLe sottoscrizioni si rinnovano automaticamente finché non vengono cancellate prima della date del rinnovo. Il tuo account sarà addebitato per i rinnovi periodici solo (mensile/trimestrale/annuale) solo alla data di rinnovo.
|
||||||
|
\n
|
||||||
|
\nPuoi gestire le tue sottoscrizioni nelle impostazioni della tua AppGallery.</string>
|
||||||
|
<string name="routing_attr_avoid_footways_description">Evita i marciapiedi</string>
|
||||||
|
<string name="routing_attr_avoid_footways_name">Evita i marciapiedi</string>
|
||||||
|
<string name="development">Sviluppo</string>
|
||||||
|
<string name="use_live_public_transport">Dati OsmAnd Live</string>
|
||||||
|
<string name="use_live_routing">Dati OsmAnd Live</string>
|
||||||
|
<string name="complex_routing_descr">Calcolo del percorso in due fasi per la navigazione in auto.</string>
|
||||||
|
<string name="use_native_pt">Sviluppo Trasporto Pubblico nativo</string>
|
||||||
|
<string name="use_native_pt_desc">Cambia a Java (safe) calcolo del percorso su Trasporto Pubblico</string>
|
||||||
|
<string name="perform_oauth_authorization_description">Effettua una connessione OAuth per usare le funzionalità osmedit</string>
|
||||||
|
<string name="perform_oauth_authorization">Connettiti via OAuth</string>
|
||||||
|
<string name="clear_osm_token">Cancella il token OAuth OpenStreetMap</string>
|
||||||
|
<string name="osm_edit_logout_success">Disconnessione effettuata</string>
|
||||||
|
<string name="file_already_imported">Il file è già importato in OsmAnd</string>
|
||||||
|
<string name="use_two_phase_routing">Utilizza l\'algoritmo di calcolo a 2-fasi A*</string>
|
||||||
|
<string name="shared_string_graph">Grafico</string>
|
||||||
|
<string name="message_need_calculate_route_before_show_graph">%1$s dati disponibili solo per le strade, necessiti di calcolare un percorso utilizzando \"Percorso fra punti\" per ottenerlo.</string>
|
||||||
|
<string name="message_graph_will_be_available_after_recalculation">Attendi per il ricalcolo del percorso.
|
||||||
|
\nIl grafico sarà disponibile dopo il ricalcolo.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
|
<string name="app_mode_gap">Buco</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3938,4 +3938,5 @@
|
||||||
<string name="shared_string_graph">תרשים</string>
|
<string name="shared_string_graph">תרשים</string>
|
||||||
<string name="message_graph_will_be_available_after_recalculation">נא להמתין לחישוב המסלול מחדש.
|
<string name="message_graph_will_be_available_after_recalculation">נא להמתין לחישוב המסלול מחדש.
|
||||||
\nהתרשים יהיה זמין לאחר החישוב מחדש.</string>
|
\nהתרשים יהיה זמין לאחר החישוב מחדש.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -17,10 +17,10 @@
|
||||||
<string name="new_destination_point_dialog">Du har allerede angitt et reisemål:</string>
|
<string name="new_destination_point_dialog">Du har allerede angitt et reisemål:</string>
|
||||||
<string name="shared_string_target_points">Reisemål</string>
|
<string name="shared_string_target_points">Reisemål</string>
|
||||||
<string name="intermediate_point_too_far">Mellomliggende reisemål %1$s er for langt fra den nærmeste veien.</string>
|
<string name="intermediate_point_too_far">Mellomliggende reisemål %1$s er for langt fra den nærmeste veien.</string>
|
||||||
<string name="arrived_at_intermediate_point">Ankommet mellomliggende reisemål</string>
|
<string name="arrived_at_intermediate_point">Mellomliggende reisemål er nådd</string>
|
||||||
<string name="context_menu_item_intermediate_point">Legg til som mellomliggende reisemål</string>
|
<string name="context_menu_item_intermediate_point">Legg til som mellomliggende reisemål</string>
|
||||||
<string name="map_widget_intermediate_distance">Mellomliggende reisemål</string>
|
<string name="map_widget_intermediate_distance">Mellomliggende reisemål</string>
|
||||||
<string name="ending_point_too_far">Sluttpunkt for langt fra nærmeste vei.</string>
|
<string name="ending_point_too_far">Endepunkt for langt fra nærmeste vei.</string>
|
||||||
<string name="add_tag">Legg til merke</string>
|
<string name="add_tag">Legg til merke</string>
|
||||||
<string name="btn_advanced_mode">Avansert modus…</string>
|
<string name="btn_advanced_mode">Avansert modus…</string>
|
||||||
<string name="poi_filter_parking">Parkering</string>
|
<string name="poi_filter_parking">Parkering</string>
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
<string name="local_indexes_cat_poi">Interessepunkt-data</string>
|
<string name="local_indexes_cat_poi">Interessepunkt-data</string>
|
||||||
<string name="ttsvoice">TTS-tale</string>
|
<string name="ttsvoice">TTS-tale</string>
|
||||||
<string name="search_offline_clear_search">Nytt søk</string>
|
<string name="search_offline_clear_search">Nytt søk</string>
|
||||||
<string name="map_text_size_descr">Navnetekststørrelse på kartet:</string>
|
<string name="map_text_size_descr">Tekststørrelse for navn på kartet:</string>
|
||||||
<string name="map_text_size">Skriftstørrelse for kart</string>
|
<string name="map_text_size">Skriftstørrelse for kart</string>
|
||||||
<string name="internet_connection_required_for_online_route">Nettbasert navigering fungerer ikke frakoblet.</string>
|
<string name="internet_connection_required_for_online_route">Nettbasert navigering fungerer ikke frakoblet.</string>
|
||||||
<string name="tts_language_not_supported_title">Språk ikke støttet</string>
|
<string name="tts_language_not_supported_title">Språk ikke støttet</string>
|
||||||
|
@ -406,7 +406,7 @@
|
||||||
<string name="route_general_information">Total distanse %1$s, reisetid %2$d t %3$d min.</string>
|
<string name="route_general_information">Total distanse %1$s, reisetid %2$d t %3$d min.</string>
|
||||||
<string name="router_service_descr">Nettbasert eller frakoblet navigeringstjeneste.</string>
|
<string name="router_service_descr">Nettbasert eller frakoblet navigeringstjeneste.</string>
|
||||||
<string name="router_service">Navigeringstjeneste</string>
|
<string name="router_service">Navigeringstjeneste</string>
|
||||||
<string name="sd_dir_not_accessible">Datalagringsmappen på minnekortet er ikke tilgjengelig!</string>
|
<string name="sd_dir_not_accessible">Lagringsmappen på minnekortet er ikke tilgjengelig!</string>
|
||||||
<string name="download_question">Laste ned {0} - {1} \?</string>
|
<string name="download_question">Laste ned {0} - {1} \?</string>
|
||||||
<string name="download_question_exist">Nettfrakoblede data for {0} finnes allerede ({1}). Oppdater ({2})\?</string>
|
<string name="download_question_exist">Nettfrakoblede data for {0} finnes allerede ({1}). Oppdater ({2})\?</string>
|
||||||
<string name="address">Adresse</string>
|
<string name="address">Adresse</string>
|
||||||
|
@ -456,7 +456,7 @@
|
||||||
<string name="search_button">Søk</string>
|
<string name="search_button">Søk</string>
|
||||||
<string name="search_activity">Søk</string>
|
<string name="search_activity">Søk</string>
|
||||||
<string name="searchpoi_activity">Velg interessepunkt</string>
|
<string name="searchpoi_activity">Velg interessepunkt</string>
|
||||||
<string name="search_POI_level_btn">Finn mer</string>
|
<string name="search_POI_level_btn">Finn flere</string>
|
||||||
<string name="incremental_search_city">Søk etter by trinnvis</string>
|
<string name="incremental_search_city">Søk etter by trinnvis</string>
|
||||||
<string name="incremental_search_street">Søk etter gate trinnvis</string>
|
<string name="incremental_search_street">Søk etter gate trinnvis</string>
|
||||||
<string name="incremental_search_building">Søk etter bygning trinnvis</string>
|
<string name="incremental_search_building">Søk etter bygning trinnvis</string>
|
||||||
|
@ -472,8 +472,8 @@
|
||||||
<string name="navigate_point_top_text">Angi bredde- og lengdegrad i det valgte formatet (G - grader, M - minutter, S - sekunder)</string>
|
<string name="navigate_point_top_text">Angi bredde- og lengdegrad i det valgte formatet (G - grader, M - minutter, S - sekunder)</string>
|
||||||
<string name="navigate_point_latitude">Breddegrad</string>
|
<string name="navigate_point_latitude">Breddegrad</string>
|
||||||
<string name="navigate_point_longitude">Lengdegrad</string>
|
<string name="navigate_point_longitude">Lengdegrad</string>
|
||||||
<string name="navigate_point_format_D">DDD.DDDDD</string>
|
<string name="navigate_point_format_D">GGG.GGGGG</string>
|
||||||
<string name="navigate_point_format_DM">DDD MM,MMM</string>
|
<string name="navigate_point_format_DM">GGG MM,MMM</string>
|
||||||
<string name="navigate_point_format_DMS">GGG MM SS,S</string>
|
<string name="navigate_point_format_DMS">GGG MM SS,S</string>
|
||||||
<string name="search_address_top_text">Adresse</string>
|
<string name="search_address_top_text">Adresse</string>
|
||||||
<string name="search_address_region">Region</string>
|
<string name="search_address_region">Region</string>
|
||||||
|
@ -522,7 +522,7 @@
|
||||||
<string name="choose_osmand_theme_descr">Tilpass programutseende.</string>
|
<string name="choose_osmand_theme_descr">Tilpass programutseende.</string>
|
||||||
<string name="driving_region_us">USA</string>
|
<string name="driving_region_us">USA</string>
|
||||||
<string name="driving_region_canada">Canada</string>
|
<string name="driving_region_canada">Canada</string>
|
||||||
<string name="driving_region_europe_asia">Europa, Asia, Latin-Amerika & lignende</string>
|
<string name="driving_region_europe_asia">Europa, Asia, Latin-Amerika og lignende</string>
|
||||||
<string name="driving_region_uk">Storbritannia, India og lignende</string>
|
<string name="driving_region_uk">Storbritannia, India og lignende</string>
|
||||||
<string name="driving_region_descr">Velg bilkjøringssted: USA, Europa, Storbritannia, Asia og andre.</string>
|
<string name="driving_region_descr">Velg bilkjøringssted: USA, Europa, Storbritannia, Asia og andre.</string>
|
||||||
<string name="driving_region_japan">Japan</string>
|
<string name="driving_region_japan">Japan</string>
|
||||||
|
@ -603,7 +603,7 @@
|
||||||
<string name="lang_lv">Latvisk</string>
|
<string name="lang_lv">Latvisk</string>
|
||||||
<string name="lang_lt">Litauisk</string>
|
<string name="lang_lt">Litauisk</string>
|
||||||
<string name="lang_mr">Marathi</string>
|
<string name="lang_mr">Marathi</string>
|
||||||
<string name="lang_no">Norsk Bokmål</string>
|
<string name="lang_no">Norsk bokmål</string>
|
||||||
<string name="lang_pl">Polsk</string>
|
<string name="lang_pl">Polsk</string>
|
||||||
<string name="lang_pt">Portugisisk</string>
|
<string name="lang_pt">Portugisisk</string>
|
||||||
<string name="lang_ro">Rumensk</string>
|
<string name="lang_ro">Rumensk</string>
|
||||||
|
@ -637,7 +637,7 @@
|
||||||
<string name="rendering_attr_showCycleRoutes_name">Vis sykkelruter</string>
|
<string name="rendering_attr_showCycleRoutes_name">Vis sykkelruter</string>
|
||||||
<string name="show_zoom_buttons_navigation_descr">Vis zoom-knapper under navigering.</string>
|
<string name="show_zoom_buttons_navigation_descr">Vis zoom-knapper under navigering.</string>
|
||||||
<string name="show_zoom_buttons_navigation">Vis zoom-knapper</string>
|
<string name="show_zoom_buttons_navigation">Vis zoom-knapper</string>
|
||||||
<string name="map_widget_plain_time">Nåtid</string>
|
<string name="map_widget_plain_time">Gjeldende tid</string>
|
||||||
<string name="osmo_edit_color">Visningsfarge</string>
|
<string name="osmo_edit_color">Visningsfarge</string>
|
||||||
<string name="always_center_position_on_map">Sentrer posisjon på kart</string>
|
<string name="always_center_position_on_map">Sentrer posisjon på kart</string>
|
||||||
<string name="guidance_preferences_descr">Navigeringsinnstillinger</string>
|
<string name="guidance_preferences_descr">Navigeringsinnstillinger</string>
|
||||||
|
@ -675,7 +675,7 @@
|
||||||
<string name="rendering_category_others">Andre kartattributter</string>
|
<string name="rendering_category_others">Andre kartattributter</string>
|
||||||
<string name="rendering_attr_publicTransportMode_name">Buss-, trolleybuss-, skyttelbussruter</string>
|
<string name="rendering_attr_publicTransportMode_name">Buss-, trolleybuss-, skyttelbussruter</string>
|
||||||
<string name="rendering_attr_tramTrainRoutes_name">Trikk- og togruter</string>
|
<string name="rendering_attr_tramTrainRoutes_name">Trikk- og togruter</string>
|
||||||
<string name="rendering_attr_subwayMode_name">Undergrunnsruter</string>
|
<string name="rendering_attr_subwayMode_name">T-bane-ruter</string>
|
||||||
<string name="rendering_attr_trainLightrailRoutes_name">Togruter</string>
|
<string name="rendering_attr_trainLightrailRoutes_name">Togruter</string>
|
||||||
<string name="rendering_attr_tramRoutes_name">Trikkeruter</string>
|
<string name="rendering_attr_tramRoutes_name">Trikkeruter</string>
|
||||||
<string name="rendering_attr_trolleybusRoutes_name">Trolleybussruter</string>
|
<string name="rendering_attr_trolleybusRoutes_name">Trolleybussruter</string>
|
||||||
|
@ -721,7 +721,7 @@
|
||||||
<string name="lang_al">Albansk</string>
|
<string name="lang_al">Albansk</string>
|
||||||
<string name="lang_ar">Arabisk</string>
|
<string name="lang_ar">Arabisk</string>
|
||||||
<string name="lang_fa">Persisk</string>
|
<string name="lang_fa">Persisk</string>
|
||||||
<string name="lang_sc">Sardinsk</string>
|
<string name="lang_sc">Sardisk</string>
|
||||||
<string name="route_descr_select_destination">Velg reisemål</string>
|
<string name="route_descr_select_destination">Velg reisemål</string>
|
||||||
<string name="routing_attr_prefer_motorway_name">Foretrekk motorveier</string>
|
<string name="routing_attr_prefer_motorway_name">Foretrekk motorveier</string>
|
||||||
<string name="routing_attr_prefer_motorway_description">Foretrekk motorveier</string>
|
<string name="routing_attr_prefer_motorway_description">Foretrekk motorveier</string>
|
||||||
|
@ -1103,7 +1103,7 @@
|
||||||
<string name="mark_to_delete">Merk for å slette</string>
|
<string name="mark_to_delete">Merk for å slette</string>
|
||||||
<string name="agps_info">A-GPS-info</string>
|
<string name="agps_info">A-GPS-info</string>
|
||||||
<string name="shared_string_message">Melding</string>
|
<string name="shared_string_message">Melding</string>
|
||||||
<string name="agps_data_last_downloaded">A-GPS-data sist nedlastet: %1$s</string>
|
<string name="agps_data_last_downloaded">A-GPS-data nedlastet: %1$s</string>
|
||||||
<string name="welcome_text">OsmAnd tilbyr global nettfrakoblet kartlesing og navigering.</string>
|
<string name="welcome_text">OsmAnd tilbyr global nettfrakoblet kartlesing og navigering.</string>
|
||||||
<string name="current_route">Gjeldende rute</string>
|
<string name="current_route">Gjeldende rute</string>
|
||||||
<string name="shared_string_go">Start</string>
|
<string name="shared_string_go">Start</string>
|
||||||
|
@ -1257,7 +1257,7 @@
|
||||||
<string name="favorite_category_name">Kategorinavn</string>
|
<string name="favorite_category_name">Kategorinavn</string>
|
||||||
<string name="favorite_category_add_new_title">Legg til ny kategori</string>
|
<string name="favorite_category_add_new_title">Legg til ny kategori</string>
|
||||||
<string name="regions">Regioner</string>
|
<string name="regions">Regioner</string>
|
||||||
<string name="region_maps">Regionkart</string>
|
<string name="region_maps">Regionale kart</string>
|
||||||
<string name="world_maps">Verdenskart</string>
|
<string name="world_maps">Verdenskart</string>
|
||||||
<string name="hillshade_layer_disabled">Relieffskyggelag deaktivert</string>
|
<string name="hillshade_layer_disabled">Relieffskyggelag deaktivert</string>
|
||||||
<string name="share_menu_location">Del posisjon</string>
|
<string name="share_menu_location">Del posisjon</string>
|
||||||
|
@ -1271,7 +1271,7 @@
|
||||||
<string name="update_all">Oppdater alle (%1$s MB)</string>
|
<string name="update_all">Oppdater alle (%1$s MB)</string>
|
||||||
<string name="free_downloads_used">Gratis nedlastinger brukt</string>
|
<string name="free_downloads_used">Gratis nedlastinger brukt</string>
|
||||||
<string name="application_dir_description">Velg hvor du vil lagre kart og andre datafiler.</string>
|
<string name="application_dir_description">Velg hvor du vil lagre kart og andre datafiler.</string>
|
||||||
<string name="enter_country_name">Oppgi navn på land</string>
|
<string name="enter_country_name">Angi navn på land</string>
|
||||||
<string name="world_map_download_descr">Basiskart verden (som dekker hele verden ved lavt zoomnivå) mangler eller er utdatert. Vurder å laste det ned for en global oversikt.</string>
|
<string name="world_map_download_descr">Basiskart verden (som dekker hele verden ved lavt zoomnivå) mangler eller er utdatert. Vurder å laste det ned for en global oversikt.</string>
|
||||||
<string name="shared_string_qr_code">QR-kode</string>
|
<string name="shared_string_qr_code">QR-kode</string>
|
||||||
<string name="basemap_was_selected_to_download">Basiskart velges for nedlasting slik at programmet fungerer.</string>
|
<string name="basemap_was_selected_to_download">Basiskart velges for nedlasting slik at programmet fungerer.</string>
|
||||||
|
@ -1455,7 +1455,7 @@
|
||||||
<string name="poi_action_delete">slett</string>
|
<string name="poi_action_delete">slett</string>
|
||||||
<string name="poi_error_io_error_template">I/O-feil under utførelse av handlingen {0}.</string>
|
<string name="poi_error_io_error_template">I/O-feil under utførelse av handlingen {0}.</string>
|
||||||
<string name="user_hates_app_get_feedback">Fortell oss hvorfor.</string>
|
<string name="user_hates_app_get_feedback">Fortell oss hvorfor.</string>
|
||||||
<string name="failed_to_upload">Klarte ikke å laste opp</string>
|
<string name="failed_to_upload">Kunne ikke laste opp</string>
|
||||||
<string name="buy">Kjøp</string>
|
<string name="buy">Kjøp</string>
|
||||||
<string name="faq_item">Ofte stilte spørsmål</string>
|
<string name="faq_item">Ofte stilte spørsmål</string>
|
||||||
<string name="number_of_edits">Antall redigeringer</string>
|
<string name="number_of_edits">Antall redigeringer</string>
|
||||||
|
@ -1482,7 +1482,7 @@
|
||||||
<string name="use_osm_live_routing">OsmAnd Live-navigering</string>
|
<string name="use_osm_live_routing">OsmAnd Live-navigering</string>
|
||||||
<string name="access_no_destination">Reisemål er ikke angitt</string>
|
<string name="access_no_destination">Reisemål er ikke angitt</string>
|
||||||
<string name="access_shared_string_navigate_up">Naviger opp</string>
|
<string name="access_shared_string_navigate_up">Naviger opp</string>
|
||||||
<string name="open_street_map_login_and_pass">OpenStreetMap-brukernavn og passord</string>
|
<string name="open_street_map_login_and_pass">OSM-brukernavn og passord</string>
|
||||||
<string name="osm_live_subscription">OsmAnd Live-abonnement</string>
|
<string name="osm_live_subscription">OsmAnd Live-abonnement</string>
|
||||||
<string name="osm_live_hide_user_name">Ikke vis mitt navn i rapporter</string>
|
<string name="osm_live_hide_user_name">Ikke vis mitt navn i rapporter</string>
|
||||||
<string name="osm_live_ask_for_purchase">Kjøp først et OsmAnd Live-abonnement</string>
|
<string name="osm_live_ask_for_purchase">Kjøp først et OsmAnd Live-abonnement</string>
|
||||||
|
@ -1564,7 +1564,7 @@
|
||||||
<string name="current_track">Aktuelle spor</string>
|
<string name="current_track">Aktuelle spor</string>
|
||||||
<string name="show_current_gpx_title">Vis aktuelle spor</string>
|
<string name="show_current_gpx_title">Vis aktuelle spor</string>
|
||||||
<string name="rendering_attr_currentTrackWidth_description">GPX-bredde</string>
|
<string name="rendering_attr_currentTrackWidth_description">GPX-bredde</string>
|
||||||
<string name="storage_place_description">OsmAnds datalagring (for kart, GPX-filer, osv.): %1$s.</string>
|
<string name="storage_place_description">OsmAnds datalagring (for kart, sporfiler, etc.): %1$s.</string>
|
||||||
<string name="first_usage_greeting">Få anvisninger og oppdag nye steder uten å ha internettforbindelse</string>
|
<string name="first_usage_greeting">Få anvisninger og oppdag nye steder uten å ha internettforbindelse</string>
|
||||||
<string name="update_all_maps_now">Oppdater alle kart nå\?</string>
|
<string name="update_all_maps_now">Oppdater alle kart nå\?</string>
|
||||||
<string name="osm_live_payment_desc">Abonnementsavgift belastes månedsvis. Avbryt det på Google Play når som helst.</string>
|
<string name="osm_live_payment_desc">Abonnementsavgift belastes månedsvis. Avbryt det på Google Play når som helst.</string>
|
||||||
|
@ -1694,7 +1694,7 @@
|
||||||
<string name="upload_osm_note_description">Last opp ditt OSM-notat anonymt eller ved å bruke din profil hos OpenStreetMap.org.</string>
|
<string name="upload_osm_note_description">Last opp ditt OSM-notat anonymt eller ved å bruke din profil hos OpenStreetMap.org.</string>
|
||||||
<string name="gpx_no_tracks_title">Du har ingen GPX-filer enda</string>
|
<string name="gpx_no_tracks_title">Du har ingen GPX-filer enda</string>
|
||||||
<string name="gpx_no_tracks_title_folder">Du kan også legge til GPX-filer i mappen</string>
|
<string name="gpx_no_tracks_title_folder">Du kan også legge til GPX-filer i mappen</string>
|
||||||
<string name="gpx_add_track">Legg til mer…</string>
|
<string name="gpx_add_track">Legg til flere…</string>
|
||||||
<string name="trip_rec_notification_settings">Skru på hurtigopptak</string>
|
<string name="trip_rec_notification_settings">Skru på hurtigopptak</string>
|
||||||
<string name="trip_rec_notification_settings_desc">Vis et systemvarsel som kan starte turopptak.</string>
|
<string name="trip_rec_notification_settings_desc">Vis et systemvarsel som kan starte turopptak.</string>
|
||||||
<string name="save_track_min_speed">Minimumshastighet for logging</string>
|
<string name="save_track_min_speed">Minimumshastighet for logging</string>
|
||||||
|
@ -1801,7 +1801,7 @@
|
||||||
<string name="osmo_connect_menu">Koble til</string>
|
<string name="osmo_connect_menu">Koble til</string>
|
||||||
<string name="routing_attr_avoid_stairs_name">Ingen trapper</string>
|
<string name="routing_attr_avoid_stairs_name">Ingen trapper</string>
|
||||||
<string name="routing_attr_avoid_stairs_description">Unngår trapper</string>
|
<string name="routing_attr_avoid_stairs_description">Unngår trapper</string>
|
||||||
<string name="speech_rate_descr">Angi talehastigheten for TTS.</string>
|
<string name="speech_rate_descr">Angi talehastigheten for tekst-til-tale.</string>
|
||||||
<string name="speech_rate">Talehastighet</string>
|
<string name="speech_rate">Talehastighet</string>
|
||||||
<string name="complex_route_calculation_failed">Rask ruteberegning mislyktes (%s), faller tilbake på treg beregning.</string>
|
<string name="complex_route_calculation_failed">Rask ruteberegning mislyktes (%s), faller tilbake på treg beregning.</string>
|
||||||
<string name="disable_complex_routing_descr">Slå av to-fase ruteplanlegging for bilnavigering.</string>
|
<string name="disable_complex_routing_descr">Slå av to-fase ruteplanlegging for bilnavigering.</string>
|
||||||
|
@ -1856,7 +1856,7 @@
|
||||||
<string name="lang_new">Nepal bhasa</string>
|
<string name="lang_new">Nepal bhasa</string>
|
||||||
<string name="lang_ceb">Cebuano</string>
|
<string name="lang_ceb">Cebuano</string>
|
||||||
<string name="lang_ast">Asturiansk</string>
|
<string name="lang_ast">Asturiansk</string>
|
||||||
<string name="lang_hsb">Øvervendisk</string>
|
<string name="lang_hsb">Oversorbisk</string>
|
||||||
<string name="lang_kab">Kabylsk</string>
|
<string name="lang_kab">Kabylsk</string>
|
||||||
<string name="lang_zh_hk">Kinesisk (Hongkong)</string>
|
<string name="lang_zh_hk">Kinesisk (Hongkong)</string>
|
||||||
<string name="use_displayed_track_for_navigation">Bruk vist spor for navigering\?</string>
|
<string name="use_displayed_track_for_navigation">Bruk vist spor for navigering\?</string>
|
||||||
|
@ -1932,7 +1932,7 @@
|
||||||
<string name="quick_action_map_overlay_action">Legg til overlegg</string>
|
<string name="quick_action_map_overlay_action">Legg til overlegg</string>
|
||||||
<string name="quick_action_map_overlay_switch">Kartoverlegg er endret til \"%s\".</string>
|
<string name="quick_action_map_overlay_switch">Kartoverlegg er endret til \"%s\".</string>
|
||||||
<string name="points_delete_multiple_succesful">Punkt(er) slettet.</string>
|
<string name="points_delete_multiple_succesful">Punkt(er) slettet.</string>
|
||||||
<string name="points_delete_multiple">ER du sikker på at du vil slette %1$d punkt(er)\?</string>
|
<string name="points_delete_multiple">Er du sikker på at du vil slette %1$d punkt(er)\?</string>
|
||||||
<string name="average_speed">Gjennomsnittsfart</string>
|
<string name="average_speed">Gjennomsnittsfart</string>
|
||||||
<string name="select_gpx_folder">Velg mappe for GPX-fil</string>
|
<string name="select_gpx_folder">Velg mappe for GPX-fil</string>
|
||||||
<string name="osmand_extended_description_part1">OsmAnd (OSM Automated Navigation Directions) er et kart- og navigeringsprogram med tilgang til gratis, verdensomspennende og høykvalitets data fra OpenStreetMap (OSM).
|
<string name="osmand_extended_description_part1">OsmAnd (OSM Automated Navigation Directions) er et kart- og navigeringsprogram med tilgang til gratis, verdensomspennende og høykvalitets data fra OpenStreetMap (OSM).
|
||||||
|
@ -2003,7 +2003,7 @@
|
||||||
<string name="altitude_descent">Fall</string>
|
<string name="altitude_descent">Fall</string>
|
||||||
<string name="altitude_ascent">Stigning</string>
|
<string name="altitude_ascent">Stigning</string>
|
||||||
<string name="altitude_range">Høydeintervall</string>
|
<string name="altitude_range">Høydeintervall</string>
|
||||||
<string name="average_altitude">Gjennomsnittlig høyde</string>
|
<string name="average_altitude">Gjennomsnittshøyde</string>
|
||||||
<string name="route_head">Følg</string>
|
<string name="route_head">Følg</string>
|
||||||
<string name="shared_string_action_name">Handlingsnavn</string>
|
<string name="shared_string_action_name">Handlingsnavn</string>
|
||||||
<string name="display_zoom_level">Visningszoomnivå: %1$s</string>
|
<string name="display_zoom_level">Visningszoomnivå: %1$s</string>
|
||||||
|
@ -2025,7 +2025,7 @@
|
||||||
<string name="routing_attr_height_obstacles_description">Ta hensyn til terrenghøyde (data fra SRTM, ASTER og EU-DEM).</string>
|
<string name="routing_attr_height_obstacles_description">Ta hensyn til terrenghøyde (data fra SRTM, ASTER og EU-DEM).</string>
|
||||||
<string name="quick_action_bug_message">Melding</string>
|
<string name="quick_action_bug_message">Melding</string>
|
||||||
<string name="shared_string_permissions">Tillatelser</string>
|
<string name="shared_string_permissions">Tillatelser</string>
|
||||||
<string name="import_gpx_failed_descr">Kunne ikke importere filen. Kontroller at OsmAnd kan lese den.</string>
|
<string name="import_gpx_failed_descr">Kunne ikke importere filen. Kontroller at OsmAnd har tillatelse til å lese den.</string>
|
||||||
<string name="distance_moving">Korrigert avstand</string>
|
<string name="distance_moving">Korrigert avstand</string>
|
||||||
<string name="shared_string_reload">Last på nytt</string>
|
<string name="shared_string_reload">Last på nytt</string>
|
||||||
<string name="wrong_user_name">Feil brukernavn</string>
|
<string name="wrong_user_name">Feil brukernavn</string>
|
||||||
|
@ -2053,7 +2053,7 @@
|
||||||
<string name="quick_action_resume_pause_navigation">Navigering: sett på pause/gjenoppta</string>
|
<string name="quick_action_resume_pause_navigation">Navigering: sett på pause/gjenoppta</string>
|
||||||
<string name="quick_action_resume_pause_navigation_descr">Knapp for å ta en pause i eller gjenoppta navigeringen.</string>
|
<string name="quick_action_resume_pause_navigation_descr">Knapp for å ta en pause i eller gjenoppta navigeringen.</string>
|
||||||
<string name="right_side_navigation">Høyrekjøring</string>
|
<string name="right_side_navigation">Høyrekjøring</string>
|
||||||
<string name="quick_action_start_stop_navigation_descr">Trykk på denne knappen for å starte eller avslutte navigeringen.</string>
|
<string name="quick_action_start_stop_navigation_descr">Knapp for å starte eller avslutte navigering.</string>
|
||||||
<string name="store_tracks_in_monthly_directories">Lagre spor som er tatt opp i månedlige mapper</string>
|
<string name="store_tracks_in_monthly_directories">Lagre spor som er tatt opp i månedlige mapper</string>
|
||||||
<string name="store_tracks_in_monthly_directories_descrp">Lagre spor som er tatt opp, i undermapper per opptaksmåned (f.eks. 2018-01).</string>
|
<string name="store_tracks_in_monthly_directories_descrp">Lagre spor som er tatt opp, i undermapper per opptaksmåned (f.eks. 2018-01).</string>
|
||||||
<string name="mapillary_menu_descr_tile_cache">Last kartfliser på nytt for å se oppdaterte data.</string>
|
<string name="mapillary_menu_descr_tile_cache">Last kartfliser på nytt for å se oppdaterte data.</string>
|
||||||
|
@ -2085,7 +2085,7 @@
|
||||||
<string name="mapillary_image">Mapillary-bilde</string>
|
<string name="mapillary_image">Mapillary-bilde</string>
|
||||||
<string name="open_mapillary">Åpne Mapillary</string>
|
<string name="open_mapillary">Åpne Mapillary</string>
|
||||||
<string name="shared_string_install">Installer</string>
|
<string name="shared_string_install">Installer</string>
|
||||||
<string name="improve_coverage_mapillary">Forbedre billeddekningen med Mapillary</string>
|
<string name="improve_coverage_mapillary">Forbedre bildedekningen med Mapillary</string>
|
||||||
<string name="online_photos">Nettbaserte bilder</string>
|
<string name="online_photos">Nettbaserte bilder</string>
|
||||||
<string name="shared_string_add_photos">Legg til bilder</string>
|
<string name="shared_string_add_photos">Legg til bilder</string>
|
||||||
<string name="no_photos_descr">Ingen bilder her.</string>
|
<string name="no_photos_descr">Ingen bilder her.</string>
|
||||||
|
@ -2097,7 +2097,7 @@
|
||||||
<string name="nautical_maps">Sjøkart</string>
|
<string name="nautical_maps">Sjøkart</string>
|
||||||
<string name="restore_purchases">Gjenopprett kjøp</string>
|
<string name="restore_purchases">Gjenopprett kjøp</string>
|
||||||
<string name="do_not_send_anonymous_app_usage">Ikke send anonym bruksstatistikk</string>
|
<string name="do_not_send_anonymous_app_usage">Ikke send anonym bruksstatistikk</string>
|
||||||
<string name="parking_options">Parkeringsalternativer</string>
|
<string name="parking_options">Parkeringsmuligheter</string>
|
||||||
<string name="full_version_thanks">Takk for at du kjøpte betalingsversjonen av OsmAnd.</string>
|
<string name="full_version_thanks">Takk for at du kjøpte betalingsversjonen av OsmAnd.</string>
|
||||||
<string name="routing_attr_driving_style_speed_name">Kortere ruter</string>
|
<string name="routing_attr_driving_style_speed_name">Kortere ruter</string>
|
||||||
<string name="routing_attr_driving_style_balance_name">Balansert</string>
|
<string name="routing_attr_driving_style_balance_name">Balansert</string>
|
||||||
|
@ -2137,7 +2137,7 @@
|
||||||
<string name="shared_string_list">Liste</string>
|
<string name="shared_string_list">Liste</string>
|
||||||
<string name="passed">Sist brukt: %1$s</string>
|
<string name="passed">Sist brukt: %1$s</string>
|
||||||
<string name="mapillary_menu_filter_description">Filtrer bilder etter innsender, dato eller type. Kun aktivt på nærgående forstørrelsesnivå.</string>
|
<string name="mapillary_menu_filter_description">Filtrer bilder etter innsender, dato eller type. Kun aktivt på nærgående forstørrelsesnivå.</string>
|
||||||
<string name="improve_coverage_install_mapillary_desc">Installer Mapillary for å legge til et eller flere bilder til denne kartposisjonen.</string>
|
<string name="improve_coverage_install_mapillary_desc">Installer Mapillary for å legge til bilder i denne kartposisjonen.</string>
|
||||||
<string name="plugin_mapillary_descr">Foto på gatenivå for alle. Oppdag plasser, samarbeid, fang inn verden.</string>
|
<string name="plugin_mapillary_descr">Foto på gatenivå for alle. Oppdag plasser, samarbeid, fang inn verden.</string>
|
||||||
<string name="quick_action_showhide_osmbugs_title">Vis/skjul OSM-notater</string>
|
<string name="quick_action_showhide_osmbugs_title">Vis/skjul OSM-notater</string>
|
||||||
<string name="quick_action_osmbugs_show">Vis OSM-notater</string>
|
<string name="quick_action_osmbugs_show">Vis OSM-notater</string>
|
||||||
|
@ -2147,7 +2147,7 @@
|
||||||
<string name="index_item_depth_contours_osmand_ext">Havdybdekonturer</string>
|
<string name="index_item_depth_contours_osmand_ext">Havdybdekonturer</string>
|
||||||
<string name="download_depth_countours">Havdybdekonturer</string>
|
<string name="download_depth_countours">Havdybdekonturer</string>
|
||||||
<string name="route_points_category_name">Svinger å passere langs ruten</string>
|
<string name="route_points_category_name">Svinger å passere langs ruten</string>
|
||||||
<string name="rendering_attr_depthContours_description">Vis havdybdekonturer og punkter.</string>
|
<string name="rendering_attr_depthContours_description">Vis dybdekonturer og punkter.</string>
|
||||||
<string name="rendering_attr_depthContours_name">Havdybdekonturer</string>
|
<string name="rendering_attr_depthContours_name">Havdybdekonturer</string>
|
||||||
<string name="auto_split_recording_title">Del opp opptak automatisk etter avbrudd</string>
|
<string name="auto_split_recording_title">Del opp opptak automatisk etter avbrudd</string>
|
||||||
<string name="auto_split_recording_descr">Start nytt segment etter et avbrudd på 6 min., nytt spor etter avbrudd på 2 timer, eller ny fil etter et lengre avbrudd hvis datoen er endret.</string>
|
<string name="auto_split_recording_descr">Start nytt segment etter et avbrudd på 6 min., nytt spor etter avbrudd på 2 timer, eller ny fil etter et lengre avbrudd hvis datoen er endret.</string>
|
||||||
|
@ -2156,7 +2156,7 @@
|
||||||
\n- Synkronisere grupper og enheter med tjeneren;
|
\n- Synkronisere grupper og enheter med tjeneren;
|
||||||
\n- Behandle grupper og enheter i et personlig dashbord på nettstedet.</string>
|
\n- Behandle grupper og enheter i et personlig dashbord på nettstedet.</string>
|
||||||
<string name="simulate_initial_startup">Simuler første programstart</string>
|
<string name="simulate_initial_startup">Simuler første programstart</string>
|
||||||
<string name="audionotes_plugin_description">Programtillegget for Audio/video-notater tilbyr funksjoner for å ta lyd/video/bilde-notater på en tur, enten ved bruk av en knapp på kartet, eller direkte i kontekstmenyen for enhver posisjon på kartet.</string>
|
<string name="audionotes_plugin_description">Lag audio/foto/video-notater på en tur, enten ved bruk av en knapp på kartet eller posisjon-kontekstmeny.</string>
|
||||||
<string name="average">Gjennomsnitt</string>
|
<string name="average">Gjennomsnitt</string>
|
||||||
<string name="of">%1$d av %2$d</string>
|
<string name="of">%1$d av %2$d</string>
|
||||||
<string name="ascent_descent">Stigning/fall</string>
|
<string name="ascent_descent">Stigning/fall</string>
|
||||||
|
@ -2177,7 +2177,7 @@
|
||||||
<string name="order_by">Sorter etter:</string>
|
<string name="order_by">Sorter etter:</string>
|
||||||
<string name="map_orientation_change_in_accordance_with_speed">Kartorienteringsterskel</string>
|
<string name="map_orientation_change_in_accordance_with_speed">Kartorienteringsterskel</string>
|
||||||
<string name="map_orientation_change_in_accordance_with_speed_descr">Velg hastighet for skifte av kartorientering fra \'Bevegelsesretning\' til \'Kompassretning\' nedenfor.</string>
|
<string name="map_orientation_change_in_accordance_with_speed_descr">Velg hastighet for skifte av kartorientering fra \'Bevegelsesretning\' til \'Kompassretning\' nedenfor.</string>
|
||||||
<string name="srtm_purchase_header">Kjøp og installer \"Koter\"-programtillegget for å vise loddrett skyggelegging.</string>
|
<string name="srtm_purchase_header">Kjøp og installer \"Koter\"-tillegget for å vise graderte vertikale områder.</string>
|
||||||
<string name="native_app_allocated_memory">Totalt innebygget minne</string>
|
<string name="native_app_allocated_memory">Totalt innebygget minne</string>
|
||||||
<string name="starting_point_too_far">Startpunkt for langt fra nærmeste vei.</string>
|
<string name="starting_point_too_far">Startpunkt for langt fra nærmeste vei.</string>
|
||||||
<string name="shared_location">Delt posisjon</string>
|
<string name="shared_location">Delt posisjon</string>
|
||||||
|
@ -2213,7 +2213,7 @@
|
||||||
<string name="rendering_exception">Kunne ikke tegne valgt område.</string>
|
<string name="rendering_exception">Kunne ikke tegne valgt område.</string>
|
||||||
<string name="renderer_load_sucess">Kartgenerator lastet</string>
|
<string name="renderer_load_sucess">Kartgenerator lastet</string>
|
||||||
<string name="error_reading_gpx">Kunne ikke lese GPX-data.</string>
|
<string name="error_reading_gpx">Kunne ikke lese GPX-data.</string>
|
||||||
<string name="any_poi">Hvilke som helst</string>
|
<string name="any_poi">Alle</string>
|
||||||
<string name="thanks_yandex_traffic">Takk til Yandex for trafikkinfo.</string>
|
<string name="thanks_yandex_traffic">Takk til Yandex for trafikkinfo.</string>
|
||||||
<string name="layer_yandex_traffic">Yandex-trafikk</string>
|
<string name="layer_yandex_traffic">Yandex-trafikk</string>
|
||||||
<string name="background_service_provider">Stedsbestemmelsestjeneste</string>
|
<string name="background_service_provider">Stedsbestemmelsestjeneste</string>
|
||||||
|
@ -2238,7 +2238,7 @@
|
||||||
<string name="use_fast_recalculation">Smart omberegning av rute</string>
|
<string name="use_fast_recalculation">Smart omberegning av rute</string>
|
||||||
<string name="rate_this_app">Vurder dette programmet</string>
|
<string name="rate_this_app">Vurder dette programmet</string>
|
||||||
<string name="rate_this_app_long">Gi OsmAnd en poengsum på Google Play</string>
|
<string name="rate_this_app_long">Gi OsmAnd en poengsum på Google Play</string>
|
||||||
<string name="user_hates_app_get_feedback_long">Fortell oss hva du ønsker å endre i dette programmet.</string>
|
<string name="user_hates_app_get_feedback_long">Gi oss beskjed om forslag.</string>
|
||||||
<string name="shared_string_card_was_hidden">Kortet ble skjult</string>
|
<string name="shared_string_card_was_hidden">Kortet ble skjult</string>
|
||||||
<string name="count_of_lines">Antall linjer</string>
|
<string name="count_of_lines">Antall linjer</string>
|
||||||
<string name="poi_context_menu_modify_osm_change">Modifiser OSM-endring</string>
|
<string name="poi_context_menu_modify_osm_change">Modifiser OSM-endring</string>
|
||||||
|
@ -2370,7 +2370,7 @@
|
||||||
<string name="poi_namefinder_query_empty">Skriv for å finne interessepunkt</string>
|
<string name="poi_namefinder_query_empty">Skriv for å finne interessepunkt</string>
|
||||||
<string name="background_service_wait_int_descr">Setter høyeste tillatte ventetid for hver bakgrunns-posisjonsbestemmelse.</string>
|
<string name="background_service_wait_int_descr">Setter høyeste tillatte ventetid for hver bakgrunns-posisjonsbestemmelse.</string>
|
||||||
<string name="background_service_wait_int">Maksimal ventetid for posisjonsbestemmelse</string>
|
<string name="background_service_wait_int">Maksimal ventetid for posisjonsbestemmelse</string>
|
||||||
<string name="background_service_int_descr">Vekkingsintervall brukt av bakgrunnstjeneste:</string>
|
<string name="background_service_int_descr">Vekkingsintervall brukt av bakgrunnstjenesten:</string>
|
||||||
<string name="background_service_provider_descr">Stedsbestemmelsesmetode brukt av bakgrunnstjeneste:</string>
|
<string name="background_service_provider_descr">Stedsbestemmelsesmetode brukt av bakgrunnstjeneste:</string>
|
||||||
<string name="transport_search_after">Etterfølgende rute</string>
|
<string name="transport_search_after">Etterfølgende rute</string>
|
||||||
<string name="transport_search_before">Tidligere rute</string>
|
<string name="transport_search_before">Tidligere rute</string>
|
||||||
|
@ -2437,8 +2437,8 @@
|
||||||
<string name="audionotes_location_not_defined">Sted å assosiere med notatet er ikke definert ennå. \"Bruk posisjon…\" for å tilordne et notat til det angitte stedet.</string>
|
<string name="audionotes_location_not_defined">Sted å assosiere med notatet er ikke definert ennå. \"Bruk posisjon…\" for å tilordne et notat til det angitte stedet.</string>
|
||||||
<string name="add_waypoint_dialog_title">Legg til rutepunkt i innspilt GPX-spor</string>
|
<string name="add_waypoint_dialog_title">Legg til rutepunkt i innspilt GPX-spor</string>
|
||||||
<string name="voice_is_not_available_msg">Taleveiledning er ikke tilgjengelig, gå til \'Innstillinger\' → \'Navigeringsinnstillinger\' , velg profilen → \'Taleveiledning\' og velg eller last ned en talemeldingspakke.</string>
|
<string name="voice_is_not_available_msg">Taleveiledning er ikke tilgjengelig, gå til \'Innstillinger\' → \'Navigeringsinnstillinger\' , velg profilen → \'Taleveiledning\' og velg eller last ned en talemeldingspakke.</string>
|
||||||
<string name="use_fast_recalculation_desc">For lange turer, beregn på nytt bare den første delen av ruten.</string>
|
<string name="use_fast_recalculation_desc">Beregner på nytt bare den første delen av ruten. Kan brukes for lange turer.</string>
|
||||||
<string name="nautical_renderer">Nautisk</string>
|
<string name="nautical_renderer">Maritimt</string>
|
||||||
<string name="day_off_label">stengt (fridag)</string>
|
<string name="day_off_label">stengt (fridag)</string>
|
||||||
<string name="copy_location_name">Kopier sted/interessepunkt-navn</string>
|
<string name="copy_location_name">Kopier sted/interessepunkt-navn</string>
|
||||||
<string name="toast_empty_name_error">Sted uten navn</string>
|
<string name="toast_empty_name_error">Sted uten navn</string>
|
||||||
|
@ -3679,7 +3679,7 @@
|
||||||
<string name="quick_action_remove_next_destination_descr">Nåværende målpunkt på ruten vil slettes. Hvis det er målet, vil navigasjonen stoppe.</string>
|
<string name="quick_action_remove_next_destination_descr">Nåværende målpunkt på ruten vil slettes. Hvis det er målet, vil navigasjonen stoppe.</string>
|
||||||
<string name="app_mode_wheelchair">Rullestol</string>
|
<string name="app_mode_wheelchair">Rullestol</string>
|
||||||
<string name="app_mode_go_cart">Gokart</string>
|
<string name="app_mode_go_cart">Gokart</string>
|
||||||
<string name="plan_a_route">Planlegg en rute</string>
|
<string name="plan_a_route">Ruteplanlegging</string>
|
||||||
<string name="additional_actions_descr">Du får tilgang til disse handlingene ved å trykke på knappen “%1$s”.</string>
|
<string name="additional_actions_descr">Du får tilgang til disse handlingene ved å trykke på knappen “%1$s”.</string>
|
||||||
<string name="use_volume_buttons_as_zoom_descr">Styr zoomnivået på kartet med enhetens volumknapper.</string>
|
<string name="use_volume_buttons_as_zoom_descr">Styr zoomnivået på kartet med enhetens volumknapper.</string>
|
||||||
<string name="add_hidden_group_info">Det tillagte punktet vil ikke være synlig på kartet, siden den valgte gruppen er skjult, du kan finne det i \"%s\".</string>
|
<string name="add_hidden_group_info">Det tillagte punktet vil ikke være synlig på kartet, siden den valgte gruppen er skjult, du kan finne det i \"%s\".</string>
|
||||||
|
@ -3823,7 +3823,7 @@
|
||||||
<string name="simplified_track_description">Kun rutelinjen vil lagres, rutepunktene vil slettes.</string>
|
<string name="simplified_track_description">Kun rutelinjen vil lagres, rutepunktene vil slettes.</string>
|
||||||
<string name="context_menu_item_add_waypoint">Legg til spor-rutepunkt</string>
|
<string name="context_menu_item_add_waypoint">Legg til spor-rutepunkt</string>
|
||||||
<string name="quick_action_add_gpx">Legg til spor-rutepunkt</string>
|
<string name="quick_action_add_gpx">Legg til spor-rutepunkt</string>
|
||||||
<string name="complex_routing_descr">To-delt ruting for bilkjøring.</string>
|
<string name="complex_routing_descr">To-fase-ruting for bilnavigering.</string>
|
||||||
<string name="osm_live_payment_desc_hw">Abonnement påløper per valgte periode. Avbryt det når som helst fra programgalleriet.</string>
|
<string name="osm_live_payment_desc_hw">Abonnement påløper per valgte periode. Avbryt det når som helst fra programgalleriet.</string>
|
||||||
<string name="attach_to_the_roads">Følg veier</string>
|
<string name="attach_to_the_roads">Følg veier</string>
|
||||||
<string name="monitoring_min_distance">Minimumsforskyvning</string>
|
<string name="monitoring_min_distance">Minimumsforskyvning</string>
|
||||||
|
@ -3868,4 +3868,8 @@
|
||||||
<string name="osm_edit_logout_success">Utlogget</string>
|
<string name="osm_edit_logout_success">Utlogget</string>
|
||||||
<string name="use_two_phase_routing">Bruk 2-stegs A*-rutingsalgoritme</string>
|
<string name="use_two_phase_routing">Bruk 2-stegs A*-rutingsalgoritme</string>
|
||||||
<string name="file_already_imported">Filen er allerede importert i OsmAnd</string>
|
<string name="file_already_imported">Filen er allerede importert i OsmAnd</string>
|
||||||
|
<string name="message_graph_will_be_available_after_recalculation">Vent på omberegning av ruten.
|
||||||
|
\nGraf vil være tilgjengelig etter omberegning.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
|
<string name="shared_string_graph">Graf</string>
|
||||||
</resources>
|
</resources>
|
|
@ -30,7 +30,7 @@
|
||||||
<string name="back_to_location">Terug naar locatie</string>
|
<string name="back_to_location">Terug naar locatie</string>
|
||||||
<string name="accessibility_mode">Toegankelijkheidsmodus</string>
|
<string name="accessibility_mode">Toegankelijkheidsmodus</string>
|
||||||
<string name="accessibility_mode_descr">Zet toegankelijkheidsmodus aan.</string>
|
<string name="accessibility_mode_descr">Zet toegankelijkheidsmodus aan.</string>
|
||||||
<string name="accessibility_default">Gelijk aan systeeminstelling</string>
|
<string name="accessibility_default">Gelijk aan de Android systeeminstelling</string>
|
||||||
<string name="backToMenu">Terug naar menu</string>
|
<string name="backToMenu">Terug naar menu</string>
|
||||||
<string name="zoomOut">Zoom uit</string>
|
<string name="zoomOut">Zoom uit</string>
|
||||||
<string name="zoomIn">Zoom in</string>
|
<string name="zoomIn">Zoom in</string>
|
||||||
|
@ -251,8 +251,8 @@
|
||||||
<string name="error_doing_search">Fout bij offline zoeken.</string>
|
<string name="error_doing_search">Fout bij offline zoeken.</string>
|
||||||
<string name="search_osm_offline">Zoek adres in de offline kaarten</string>
|
<string name="search_osm_offline">Zoek adres in de offline kaarten</string>
|
||||||
<string name="system_locale">Systeem</string>
|
<string name="system_locale">Systeem</string>
|
||||||
<string name="preferred_locale_descr">App menu-taal (OsmAnd dient opnieuw gestart).</string>
|
<string name="preferred_locale_descr">App toon talen (OsmAnd dient opnieuw gestart).</string>
|
||||||
<string name="preferred_locale">Taal</string>
|
<string name="preferred_locale">Toon talen</string>
|
||||||
<string name="unit_of_length_descr">Wijzig de eenheid van afstand voor metingen.</string>
|
<string name="unit_of_length_descr">Wijzig de eenheid van afstand voor metingen.</string>
|
||||||
<string name="unit_of_length">Afstand eenheden</string>
|
<string name="unit_of_length">Afstand eenheden</string>
|
||||||
<string name="si_mi_feet">Mijlen/voeten</string>
|
<string name="si_mi_feet">Mijlen/voeten</string>
|
||||||
|
@ -824,7 +824,7 @@
|
||||||
<string name="intermediate_point">Tussenpunt %1$s</string>
|
<string name="intermediate_point">Tussenpunt %1$s</string>
|
||||||
<string name="gps_not_available">Schakel GPS in via de instellingen</string>
|
<string name="gps_not_available">Schakel GPS in via de instellingen</string>
|
||||||
<string name="map_widget_show_destination_arrow">Richting van de bestemming tonen</string>
|
<string name="map_widget_show_destination_arrow">Richting van de bestemming tonen</string>
|
||||||
<string name="enable_plugin_monitoring_services">Activeer de GPX-Track opnemen- Plugin om de afgelegde weg vast te leggen (GPX-track, online tracking)</string>
|
<string name="enable_plugin_monitoring_services">Activeer de \"GPX-Track opnemen\" Plug-in om de afgelegde weg vast te leggen (GPX-track, online tracking)</string>
|
||||||
<string name="non_optimal_route_calculation">Bereken mogelijk niet-optimale route voor lange afstanden</string>
|
<string name="non_optimal_route_calculation">Bereken mogelijk niet-optimale route voor lange afstanden</string>
|
||||||
<string name="rendering_attr_roadColors_description">Kies kleurschema voor wegen:</string>
|
<string name="rendering_attr_roadColors_description">Kies kleurschema voor wegen:</string>
|
||||||
<string name="rendering_attr_roadColors_name">Kleurschema voor wegen</string>
|
<string name="rendering_attr_roadColors_name">Kleurschema voor wegen</string>
|
||||||
|
@ -921,7 +921,7 @@
|
||||||
<string name="osmand_play_title_30_chars">OsmAnd Kaarten & Navigatie</string>
|
<string name="osmand_play_title_30_chars">OsmAnd Kaarten & Navigatie</string>
|
||||||
<string name="osmand_plus_play_title_30_chars">OsmAnd+ Kaarten & Navigatie</string>
|
<string name="osmand_plus_play_title_30_chars">OsmAnd+ Kaarten & Navigatie</string>
|
||||||
<string name="hno">Huisnummer</string>
|
<string name="hno">Huisnummer</string>
|
||||||
<string name="monitoring_settings">GPX-track</string>
|
<string name="monitoring_settings">Track opnemen</string>
|
||||||
<string name="monitoring_settings_descr">Stel in hoe uw trips op te nemen.</string>
|
<string name="monitoring_settings_descr">Stel in hoe uw trips op te nemen.</string>
|
||||||
<string name="street_name">Straatnaam</string>
|
<string name="street_name">Straatnaam</string>
|
||||||
<string name="choose_osmand_theme_descr">Aanpassen van app uitzicht aan uw wensen.</string>
|
<string name="choose_osmand_theme_descr">Aanpassen van app uitzicht aan uw wensen.</string>
|
||||||
|
@ -952,8 +952,8 @@
|
||||||
<string name="plugin_distance_point">Punt</string>
|
<string name="plugin_distance_point">Punt</string>
|
||||||
<string name="gpx_file_name">GPX-bestandsnaam</string>
|
<string name="gpx_file_name">GPX-bestandsnaam</string>
|
||||||
<string name="gpx_saved_sucessfully">GPX-bestand succesvol opgeslagen als {0}</string>
|
<string name="gpx_saved_sucessfully">GPX-bestand succesvol opgeslagen als {0}</string>
|
||||||
<string name="osmand_distance_planning_plugin_description">Deze plug-in voorziet een kaart-widget waarmee u een route kan ontwerpen door op de kaart te tikken, of gebruik te maken (of wijzigen) van bestaande GPX-bestanden. Plan zo een reis en bereken de afstand tussen punten. Het resultaat kan worden bewaard als GPX-bestand, om later te gebruiken als navigatieroute.</string>
|
<string name="osmand_distance_planning_plugin_description">Maak paden door op de kaart te tikken of door bestaande GPX-bestanden te gebruiken of te wijzigen om een reis te plannen en de afstand tussen punten te meten. Het resultaat kan worden opgeslagen als een GPX-bestand om later als richtlijn te gebruiken.</string>
|
||||||
<string name="osmand_distance_planning_plugin_name">Afstand meten en Route plannen</string>
|
<string name="osmand_distance_planning_plugin_name">Afstandscalculator en planningstool</string>
|
||||||
<string name="use_distance_measurement_help">* Tik om een punt te markeren.
|
<string name="use_distance_measurement_help">* Tik om een punt te markeren.
|
||||||
\n* Druk lang op de kaart om het vorige punt te verwijderen.
|
\n* Druk lang op de kaart om het vorige punt te verwijderen.
|
||||||
\n* Druk lang en houd vast op een punt om de beschrijving te zien en toe te voegen.
|
\n* Druk lang en houd vast op een punt om de beschrijving te zien en toe te voegen.
|
||||||
|
@ -1247,7 +1247,7 @@
|
||||||
<string name="speak_poi">Dichtbij POI</string>
|
<string name="speak_poi">Dichtbij POI</string>
|
||||||
<string name="shared_string_all">Alles</string>
|
<string name="shared_string_all">Alles</string>
|
||||||
<string name="index_tours">Reizen</string>
|
<string name="index_tours">Reizen</string>
|
||||||
<string name="record_plugin_name">GPX-track opnemen</string>
|
<string name="record_plugin_name">Track opnemen</string>
|
||||||
<string name="int_hour">u.</string>
|
<string name="int_hour">u.</string>
|
||||||
<string name="duration">Duur</string>
|
<string name="duration">Duur</string>
|
||||||
<string name="distance">Afstand</string>
|
<string name="distance">Afstand</string>
|
||||||
|
@ -1462,7 +1462,7 @@
|
||||||
<string name="shared_string_audio">Geluid</string>
|
<string name="shared_string_audio">Geluid</string>
|
||||||
<string name="shared_string_video">Video</string>
|
<string name="shared_string_video">Video</string>
|
||||||
<string name="shared_string_photo">Foto</string>
|
<string name="shared_string_photo">Foto</string>
|
||||||
<string name="delay_to_start_navigation_descr">Kies de wachttijd in om op het route-planning scherm te blijven.</string>
|
<string name="delay_to_start_navigation_descr">Geef de wachttijd op om op het route-planning scherm te blijven.</string>
|
||||||
<string name="delay_to_start_navigation">Start begeleiding na…</string>
|
<string name="delay_to_start_navigation">Start begeleiding na…</string>
|
||||||
<string name="shared_string_go">Start</string>
|
<string name="shared_string_go">Start</string>
|
||||||
<string name="action_create">Actietoets aanmaken</string>
|
<string name="action_create">Actietoets aanmaken</string>
|
||||||
|
@ -1639,7 +1639,7 @@
|
||||||
<string name="min_mile">min/m</string>
|
<string name="min_mile">min/m</string>
|
||||||
<string name="min_km">min/km</string>
|
<string name="min_km">min/km</string>
|
||||||
<string name="m_s">m/s</string>
|
<string name="m_s">m/s</string>
|
||||||
<string name="shared_string_trip_recording">GPX-Track opnemen</string>
|
<string name="shared_string_trip_recording">Track opnemen</string>
|
||||||
<string name="shared_string_navigation">Navigatie</string>
|
<string name="shared_string_navigation">Navigatie</string>
|
||||||
<string name="favourites_edit_dialog_title">Informatie over favoriet</string>
|
<string name="favourites_edit_dialog_title">Informatie over favoriet</string>
|
||||||
<string name="simulate_your_location_stop_descr">Positiesimulatie beëindigen.</string>
|
<string name="simulate_your_location_stop_descr">Positiesimulatie beëindigen.</string>
|
||||||
|
@ -2058,7 +2058,7 @@
|
||||||
<string name="gpx_add_track">Meer toevoegen…</string>
|
<string name="gpx_add_track">Meer toevoegen…</string>
|
||||||
<string name="shared_string_appearance">Weergave</string>
|
<string name="shared_string_appearance">Weergave</string>
|
||||||
<string name="trip_rec_notification_settings">Snelle opname activeren</string>
|
<string name="trip_rec_notification_settings">Snelle opname activeren</string>
|
||||||
<string name="trip_rec_notification_settings_desc">Toon systeemmelding waarmee ritopname toegestaan wordt.</string>
|
<string name="trip_rec_notification_settings_desc">Toon systeemmelding waarmee track opname toegestaan wordt.</string>
|
||||||
<string name="shared_string_notifications">Meldingen</string>
|
<string name="shared_string_notifications">Meldingen</string>
|
||||||
<string name="route_calculation">Route berekening</string>
|
<string name="route_calculation">Route berekening</string>
|
||||||
<string name="rendering_value_fine_name">Fijn</string>
|
<string name="rendering_value_fine_name">Fijn</string>
|
||||||
|
@ -2359,10 +2359,10 @@
|
||||||
<string name="shared_string_install">Installeer</string>
|
<string name="shared_string_install">Installeer</string>
|
||||||
<string name="improve_coverage_mapillary">Verbeter de fotocollectie van Mapillary</string>
|
<string name="improve_coverage_mapillary">Verbeter de fotocollectie van Mapillary</string>
|
||||||
<string name="improve_coverage_install_mapillary_desc">Installeer Mapillary om foto\'s aan deze kaartlocatie toe te voegen.</string>
|
<string name="improve_coverage_install_mapillary_desc">Installeer Mapillary om foto\'s aan deze kaartlocatie toe te voegen.</string>
|
||||||
<string name="mapillary_action_descr">Deel uw straatniveau uitzicht via Mapillary.</string>
|
<string name="mapillary_action_descr">Deel uw weergave op straatniveau via Mapillary.</string>
|
||||||
<string name="mapillary_widget_descr">Snel bijdragen aan Mapillary.</string>
|
<string name="mapillary_widget_descr">Snel bijdragen aan Mapillary.</string>
|
||||||
<string name="mapillary_descr">Foto\'s van buiten voor iedereen. Ondek plaatsen, werk samen, en leg de wereld vast.</string>
|
<string name="mapillary_descr">Online foto\'s op straatniveau voor iedereen. Ontdek plaatsen, werk samen, leg de wereld vast.</string>
|
||||||
<string name="plugin_mapillary_descr">Foto\'s van buiten voor iedereen. Ondek plaatsen, werk samen, en leg de wereld vast.</string>
|
<string name="plugin_mapillary_descr">Foto\'s op straatniveau voor iedereen. Ontdek plaatsen, werk samen, leg de wereld vast.</string>
|
||||||
<string name="shared_string_permissions">Rechten</string>
|
<string name="shared_string_permissions">Rechten</string>
|
||||||
<string name="import_gpx_failed_descr">Kan bestand niet importeren. Controleer of OsmAnd rechten heeft om het bestand te lezen.</string>
|
<string name="import_gpx_failed_descr">Kan bestand niet importeren. Controleer of OsmAnd rechten heeft om het bestand te lezen.</string>
|
||||||
<string name="distance_moving">Gecorrigeerde afstand</string>
|
<string name="distance_moving">Gecorrigeerde afstand</string>
|
||||||
|
@ -3297,7 +3297,7 @@
|
||||||
<string name="added_profiles_descr">Door plug-in toegevoegde profielen</string>
|
<string name="added_profiles_descr">Door plug-in toegevoegde profielen</string>
|
||||||
<string name="shared_string_turn_off">Uitschakelen</string>
|
<string name="shared_string_turn_off">Uitschakelen</string>
|
||||||
<string name="new_plugin_added">Nieuwe plug-in toegevoegd</string>
|
<string name="new_plugin_added">Nieuwe plug-in toegevoegd</string>
|
||||||
<string name="join_segments">verbind segmenten</string>
|
<string name="join_segments">Segmenten samenvoegen</string>
|
||||||
<string name="release_3_4">• App profiles: Create a custom profile for your own needs, with a custom icon and color
|
<string name="release_3_4">• App profiles: Create a custom profile for your own needs, with a custom icon and color
|
||||||
\n
|
\n
|
||||||
\n • Nu aan te passen standaard en min / max snelheden voor elk profiel
|
\n • Nu aan te passen standaard en min / max snelheden voor elk profiel
|
||||||
|
@ -3356,7 +3356,7 @@
|
||||||
<string name="multimedia_notes_prefs_descr">Afbeeldingsgrootte, geluids- en videokwaliteit</string>
|
<string name="multimedia_notes_prefs_descr">Afbeeldingsgrootte, geluids- en videokwaliteit</string>
|
||||||
<string name="osm_editing_prefs_descr">Login, wachtwoord, offline bewerken</string>
|
<string name="osm_editing_prefs_descr">Login, wachtwoord, offline bewerken</string>
|
||||||
<string name="accessibility_prefs_descr">Kies icoon, kleur en naam</string>
|
<string name="accessibility_prefs_descr">Kies icoon, kleur en naam</string>
|
||||||
<string name="live_monitoring_descr">Laat u toe uw positie te delen dankzij reisopname.</string>
|
<string name="live_monitoring_descr">Laat u toe uw positie te delen dankzij track opname.</string>
|
||||||
<string name="live_monitoring">Online volgen</string>
|
<string name="live_monitoring">Online volgen</string>
|
||||||
<string name="save_track_logging_accuracy">Opnamenauwkeurigheid</string>
|
<string name="save_track_logging_accuracy">Opnamenauwkeurigheid</string>
|
||||||
<string name="tracks_view_descr">De opgenomen tracks zijn opgeslagen in %1$s, of in de OsmAnd-map.</string>
|
<string name="tracks_view_descr">De opgenomen tracks zijn opgeslagen in %1$s, of in de OsmAnd-map.</string>
|
||||||
|
@ -3530,7 +3530,7 @@
|
||||||
<string name="shared_string_terrain">Terrein</string>
|
<string name="shared_string_terrain">Terrein</string>
|
||||||
<string name="slope_description">Helling gebruikt kleuren om de steilheid van het terrein te visualiseren.</string>
|
<string name="slope_description">Helling gebruikt kleuren om de steilheid van het terrein te visualiseren.</string>
|
||||||
<string name="terrain_slider_description">Stel de minimale en maximale zoomniveaus in waarbij de laag wordt weergegeven.</string>
|
<string name="terrain_slider_description">Stel de minimale en maximale zoomniveaus in waarbij de laag wordt weergegeven.</string>
|
||||||
<string name="slope_download_description">Om Hellingen te tonen zijn extra kaarten nodig.</string>
|
<string name="slope_download_description">Om hellingen te tonen zijn extra kaarten nodig.</string>
|
||||||
<string name="slope_read_more">Meer over Hellingen in %1$s.</string>
|
<string name="slope_read_more">Meer over Hellingen in %1$s.</string>
|
||||||
<string name="shared_string_transparency">Transparantie</string>
|
<string name="shared_string_transparency">Transparantie</string>
|
||||||
<string name="shared_string_zoom_levels">Zoomniveaus</string>
|
<string name="shared_string_zoom_levels">Zoomniveaus</string>
|
||||||
|
@ -3666,7 +3666,7 @@
|
||||||
<string name="shared_string_legal">Legaal</string>
|
<string name="shared_string_legal">Legaal</string>
|
||||||
<string name="speed_camera_pois">Snelheidscamera’s als POI’s</string>
|
<string name="speed_camera_pois">Snelheidscamera’s als POI’s</string>
|
||||||
<string name="hillshade_description">De reliëfschaduwkaart maakt gebruik van donkere schaduwen om hellingen, bergtoppen en valleien te visualiseren.</string>
|
<string name="hillshade_description">De reliëfschaduwkaart maakt gebruik van donkere schaduwen om hellingen, bergtoppen en valleien te visualiseren.</string>
|
||||||
<string name="hillshade_download_description">Om Reliëfschaduw te tonen zijn extra kaarten nodig.</string>
|
<string name="hillshade_download_description">Om reliëfschaduw te tonen zijn extra kaarten nodig.</string>
|
||||||
<string name="shared_string_hillshade">Reliëfschaduw</string>
|
<string name="shared_string_hillshade">Reliëfschaduw</string>
|
||||||
<string name="terrain_empty_state_text">Selecteer deze optie om een reliëfschaduw- of hellingskaart te tonen. Op onze site staat meer informatie over deze kaarttypes.</string>
|
<string name="terrain_empty_state_text">Selecteer deze optie om een reliëfschaduw- of hellingskaart te tonen. Op onze site staat meer informatie over deze kaarttypes.</string>
|
||||||
<string name="map_source_zoom_levels_descr">Heeft invloed op de weergave bij gebruik als kaart of als extra kaartlaag/achtergrondlaag.
|
<string name="map_source_zoom_levels_descr">Heeft invloed op de weergave bij gebruik als kaart of als extra kaartlaag/achtergrondlaag.
|
||||||
|
@ -3696,4 +3696,79 @@
|
||||||
<string name="app_mode_wheelchair_forward">Rolstoel vooraanzicht</string>
|
<string name="app_mode_wheelchair_forward">Rolstoel vooraanzicht</string>
|
||||||
<string name="osm_edit_closed_note">Opgeloste OSM-opmerking</string>
|
<string name="osm_edit_closed_note">Opgeloste OSM-opmerking</string>
|
||||||
<string name="app_mode_go_cart">Kart</string>
|
<string name="app_mode_go_cart">Kart</string>
|
||||||
|
<string name="map_widget_monitoring">Track opnemen</string>
|
||||||
|
<string name="save_global_track_interval_descr">Specificeer het registratie-interval voor de algemene trackregistratie (ingeschakeld via de track-widget op de kaart).</string>
|
||||||
|
<string name="gpx_monitoring_stop">Pauzeer track opname</string>
|
||||||
|
<string name="gpx_monitoring_start">Hervat track opnemen</string>
|
||||||
|
<string name="street_level_imagery">Beelden op srraatniveau</string>
|
||||||
|
<string name="select_track_width">Selecteer dikte</string>
|
||||||
|
<string name="track_show_start_finish_icons">Toon start en aankomst pictogrammen</string>
|
||||||
|
<string name="gpx_direction_arrows">Richtingaanwijzers</string>
|
||||||
|
<string name="add_hidden_group_info">Het toegevoegde punt zal niet zichtbaar zijn op de kaart, aangezien de geselecteerde groep verborgen is, je kan het vinden in \"%s\".</string>
|
||||||
|
<string name="system_default_theme">Standaard</string>
|
||||||
|
<string name="route_between_points">Route tussen punten</string>
|
||||||
|
<string name="route_between_points_warning_desc">"Vervolgens, zet uw track vast op de dichtstbijzijnde toegestane weg met een van uw navigatieprofielen om deze optie te gebruiken."</string>
|
||||||
|
<string name="message_need_calculate_route_before_show_graph">%1$s gegevens alleen beschikbaar op de wegen, u moet een route berekenen met behulp van \"Route tussen punten\" om deze te krijgen.</string>
|
||||||
|
<string name="route_between_points_desc">Selecteer hoe de punten verbonden worden, via een rechte lijn, of een route berekenen tussen de punten zoals hieronder aangegeven.</string>
|
||||||
|
<string name="route_between_points_next_segment_button_desc">Alleen het volgende segment wordt opnieuw berekend met het geselecteerde profiel.</string>
|
||||||
|
<string name="next_segment">Volgende segment</string>
|
||||||
|
<string name="all_next_segments">Alle volgende segmenten</string>
|
||||||
|
<string name="all_next_segments_will_be_recalc">Alle volgende segmenten worden opnieuw berekend met het geselecteerde profiel.</string>
|
||||||
|
<string name="whole_track">De ganse track</string>
|
||||||
|
<string name="route_between_points_whole_track_button_desc">De ganse track wordt herberekend volgens het geselecteerde profiel.</string>
|
||||||
|
<string name="pass_whole_track_descr">Punt van de track om te navigeren</string>
|
||||||
|
<string name="shared_string_save_as_gpx">Bewaar als nieuw trackbestand</string>
|
||||||
|
<string name="save_as_new_track">Bewaar als nieuwe track</string>
|
||||||
|
<string name="release_3_7">Nieuwe offline pistekaarten
|
||||||
|
\n
|
||||||
|
\n • Volledige aanpassing van favorieten en GPX-waypoints - aangepaste kleuren, pictogrammen, vormen
|
||||||
|
\n
|
||||||
|
\n • Pas de volgorde van items aan in \"Contextmenu\", \"Configureer kaart\" en \"........\"
|
||||||
|
\n
|
||||||
|
\n •Wikipedia als een afzonderlijke laag in Kaart configureren, selecteer alleen de benodigde talen
|
||||||
|
\n
|
||||||
|
\n • Creëer uw eigen POI-filter / kaarten met totale flexibiliteit
|
||||||
|
\n
|
||||||
|
\n • Opties toegevoegd om instellingen voor aangepaste profielen te herstellen
|
||||||
|
\n
|
||||||
|
\n • Volledige GPX-routes van navigatieondersteunende rijstroken en volledige afslaginstructies
|
||||||
|
\n
|
||||||
|
\n •Verbeterde UI-formaten op tablets
|
||||||
|
\n
|
||||||
|
\n •Herstel bugs met RTL
|
||||||
|
\n
|
||||||
|
\n</string>
|
||||||
|
<string name="add_to_a_track">Voeg toe aan een track</string>
|
||||||
|
<string name="add_segment_to_the_track">Voeg toe aan een trackbestand</string>
|
||||||
|
<string name="simplified_track">Vereenvoudigde track</string>
|
||||||
|
<string name="simplified_track_description">Alleen de routelijn wordt opgeslagen, de waypoints worden verwijderd.</string>
|
||||||
|
<string name="shared_string_done">Bewaar</string>
|
||||||
|
<string name="reverse_route">Route omkeren</string>
|
||||||
|
<string name="route_between_points_add_track_desc">"Selecteer een track waaraan je een nieuw segment wil toevoegen."</string>
|
||||||
|
<string name="plan_route_select_track_file_for_open">Selecteer een trackbestand om te openen.</string>
|
||||||
|
<string name="plan_route_exit_dialog_descr">Weet u zeker dat u alle wijzigingen in de geplande route wilt annuleren door deze te sluiten\?</string>
|
||||||
|
<string name="plan_route_trim_before">Opsmukken voor</string>
|
||||||
|
<string name="plan_route_trim_after">Opsmukken na</string>
|
||||||
|
<string name="plan_route_change_route_type_before">Wijzig het routetype voor</string>
|
||||||
|
<string name="plan_route_change_route_type_after">Wijzig het routetype na</string>
|
||||||
|
<string name="release_3_8">• Bijgewerkt Plan een route functie: maakt het mogelijk om verschillende navigatietypes per segment te gebruiken en tracks op te nemen
|
||||||
|
\n
|
||||||
|
\n • Nieuw menu voor tracks: selecteer kleur, dikte, weergeven van richtingspijlen, start / finish-pictogrammen.
|
||||||
|
\n
|
||||||
|
\n • Verbeterde zichtbaarheid van fietsknooppunten.
|
||||||
|
\n
|
||||||
|
\n • Tracks kun je nu aantikken en hebben een contextmenu met basisinformatie.
|
||||||
|
\n
|
||||||
|
\n • Verbeterde zoekalgoritmen.
|
||||||
|
\n
|
||||||
|
\n • Verbeterde volg track-opties bij navigatie
|
||||||
|
\n
|
||||||
|
\n • Problemen opgelost met het importeren / exporteren van profielinstellingen
|
||||||
|
\n
|
||||||
|
\n</string>
|
||||||
|
<string name="plan_route_import_track">Importeer track</string>
|
||||||
|
<string name="plan_route_last_edited">Laatst bewerkt</string>
|
||||||
|
<string name="plan_route_create_new_route">Maak een nieuwe route</string>
|
||||||
|
<string name="plan_route_open_existing_track">Open een bestaande track</string>
|
||||||
|
<string name="plan_a_route">Plan een route</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3265,7 +3265,7 @@
|
||||||
<string name="language_and_output">Język i wyjście</string>
|
<string name="language_and_output">Język i wyjście</string>
|
||||||
<string name="plugins_settings">Ustawienia wtyczki</string>
|
<string name="plugins_settings">Ustawienia wtyczki</string>
|
||||||
<string name="shared_string_by_default">Domyślnie</string>
|
<string name="shared_string_by_default">Domyślnie</string>
|
||||||
<string name="download_detailed_map">Pobierz szczegółową mapę %S, aby zobaczyć ten obszar.</string>
|
<string name="download_detailed_map">Pobierz szczegółową mapę %s, aby zobaczyć ten obszar.</string>
|
||||||
<string name="change_data_storage_full_description">Przenieść pliki danych OsmAnd do nowego położenia\?
|
<string name="change_data_storage_full_description">Przenieść pliki danych OsmAnd do nowego położenia\?
|
||||||
\n%1$s > %2$s</string>
|
\n%1$s > %2$s</string>
|
||||||
<string name="enter_path_to_folder">Proszę wprowadzić ścieżkę do katalogu</string>
|
<string name="enter_path_to_folder">Proszę wprowadzić ścieżkę do katalogu</string>
|
||||||
|
@ -3769,11 +3769,11 @@
|
||||||
<string name="uninstall_speed_cameras">Odinstaluj fotoradary</string>
|
<string name="uninstall_speed_cameras">Odinstaluj fotoradary</string>
|
||||||
<string name="shared_string_legal">Prawny</string>
|
<string name="shared_string_legal">Prawny</string>
|
||||||
<string name="speed_camera_pois">Punkty fotoradarów</string>
|
<string name="speed_camera_pois">Punkty fotoradarów</string>
|
||||||
<string name="speed_cameras_legal_descr">W niektórych krajachi regionach uzywanie aplikacji ostrzegających o fotoradarach jest zabronione przez prawo.
|
<string name="speed_cameras_legal_descr">W niektórych krajach i regionach używanie aplikacji ostrzegających o fotoradarach jest zabronione przez prawo.
|
||||||
\n
|
\n
|
||||||
\nMusisz dokonać wyboru w zależności od prawa danego kraju.
|
\nMusisz dokonać wyboru w zależności od prawa danego kraju.
|
||||||
\n
|
\n
|
||||||
\nWybierz %1$S i będziesz otrzymywać powiadomienia i ostrzeżenia o fotoradarach.
|
\nWybierz %1$s i będziesz otrzymywać powiadomienia i ostrzeżenia o fotoradarach.
|
||||||
\n
|
\n
|
||||||
\nWybierz %2$s. Wszystkie dane o fotoradarach: ostrzeżenia, powiadomienia, miejsca użyteczne zostaną usunięte, aż OsmAnd zostanie zainstalowany ponownie.</string>
|
\nWybierz %2$s. Wszystkie dane o fotoradarach: ostrzeżenia, powiadomienia, miejsca użyteczne zostaną usunięte, aż OsmAnd zostanie zainstalowany ponownie.</string>
|
||||||
<string name="keep_active">Nie wyłączaj</string>
|
<string name="keep_active">Nie wyłączaj</string>
|
||||||
|
@ -3814,7 +3814,7 @@
|
||||||
<string name="gpx_split_interval_none_descr">Wybierz żądaną opcję podziału: według czasu lub odległości.</string>
|
<string name="gpx_split_interval_none_descr">Wybierz żądaną opcję podziału: według czasu lub odległości.</string>
|
||||||
<string name="track_coloring_solid">Stałe</string>
|
<string name="track_coloring_solid">Stałe</string>
|
||||||
<string name="gpx_parse_error">OsmAnd GPX nie jest dobrze uformowany, prosimy o kontakt z zespołem wsparcia technicznego w celu dalszego zbadania sprawy.</string>
|
<string name="gpx_parse_error">OsmAnd GPX nie jest dobrze uformowany, prosimy o kontakt z zespołem wsparcia technicznego w celu dalszego zbadania sprawy.</string>
|
||||||
<string name="turn_screen_on_wake_time_descr">Wybierz limit czasu ekranu po przebudzeniu. (\"%1$s\" nie powoduje przekroczenia limitu czasu).</string>
|
<string name="turn_screen_on_wake_time_descr">Wybierz limit czasu ekranu po przebudzeniu. (\"%1$s\" nie powoduje przekroczenia limitu czasu.)</string>
|
||||||
<string name="track_show_start_finish_icons">Pokaż ikony początku i końca</string>
|
<string name="track_show_start_finish_icons">Pokaż ikony początku i końca</string>
|
||||||
<string name="gpx_split_interval_descr">Wybierz przedział czasowy, w którym będą wyświetlane znaki z odległością lub czasem na torze.</string>
|
<string name="gpx_split_interval_descr">Wybierz przedział czasowy, w którym będą wyświetlane znaki z odległością lub czasem na torze.</string>
|
||||||
<string name="shared_string_custom">Dostosowany</string>
|
<string name="shared_string_custom">Dostosowany</string>
|
||||||
|
@ -3891,7 +3891,7 @@
|
||||||
<string name="open_saved_track">Otwórz zapisaną ścieżkę</string>
|
<string name="open_saved_track">Otwórz zapisaną ścieżkę</string>
|
||||||
<string name="shared_string_is_saved">jest zapisywany</string>
|
<string name="shared_string_is_saved">jest zapisywany</string>
|
||||||
<string name="one_point_error">Należy dodać co najmniej dwa punkty.</string>
|
<string name="one_point_error">Należy dodać co najmniej dwa punkty.</string>
|
||||||
<string name="disable_recording_once_app_killed_descrp">Wstrzyma rejestrowanie ścieżki, gdy aplikacja zostanie zabita (za pośrednictwem ostatnich aplikacji). (Wskazanie tła OsmAnd znika z paska powiadomień Androida).</string>
|
<string name="disable_recording_once_app_killed_descrp">Wstrzyma rejestrowanie ścieżki, gdy aplikacja zostanie zabita (za pośrednictwem ostatnich aplikacji). (Wskazanie tła OsmAnd znika z paska powiadomień Androida.)</string>
|
||||||
<string name="shared_string_redo">Ponów</string>
|
<string name="shared_string_redo">Ponów</string>
|
||||||
<string name="release_3_8">• Zaktualizowana funkcja planu trasy: umożliwia korzystanie z różnych typów nawigacji na segment i dołączanie ścieżek
|
<string name="release_3_8">• Zaktualizowana funkcja planu trasy: umożliwia korzystanie z różnych typów nawigacji na segment i dołączanie ścieżek
|
||||||
\n
|
\n
|
||||||
|
@ -3933,4 +3933,6 @@
|
||||||
<string name="perform_oauth_authorization">Zaloguj się przez OAuth</string>
|
<string name="perform_oauth_authorization">Zaloguj się przez OAuth</string>
|
||||||
<string name="clear_osm_token">Wyczyść token OpenStreetMap OAuth</string>
|
<string name="clear_osm_token">Wyczyść token OpenStreetMap OAuth</string>
|
||||||
<string name="osm_edit_logout_success">Wylogowanie powiodło się</string>
|
<string name="osm_edit_logout_success">Wylogowanie powiodło się</string>
|
||||||
|
<string name="file_already_imported">Plik jest już zaimportowany do OsmAnd</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3800,7 +3800,7 @@
|
||||||
<string name="poi_booth">Tipo de cabine</string>
|
<string name="poi_booth">Tipo de cabine</string>
|
||||||
<string name="poi_video_yes">Sim</string>
|
<string name="poi_video_yes">Sim</string>
|
||||||
<string name="poi_video_no">Não</string>
|
<string name="poi_video_no">Não</string>
|
||||||
<string name="poi_internet_access_fee_customers">Sinal para encontrar o poste</string>
|
<string name="poi_internet_access_fee_customers">Acesso à Internet: clientes</string>
|
||||||
<string name="poi_traffic_signals_sound_locate">Somente quando andar é permitido</string>
|
<string name="poi_traffic_signals_sound_locate">Somente quando andar é permitido</string>
|
||||||
<string name="poi_tactile_paving_contrasted">Contrastado</string>
|
<string name="poi_tactile_paving_contrasted">Contrastado</string>
|
||||||
<string name="poi_tactile_paving_primitive">Primitivo</string>
|
<string name="poi_tactile_paving_primitive">Primitivo</string>
|
||||||
|
@ -3845,4 +3845,6 @@
|
||||||
<string name="poi_beehive">Colmeia</string>
|
<string name="poi_beehive">Colmeia</string>
|
||||||
<string name="poi_nuts">Loja de nozes</string>
|
<string name="poi_nuts">Loja de nozes</string>
|
||||||
<string name="poi_fuel_lng">GNL</string>
|
<string name="poi_fuel_lng">GNL</string>
|
||||||
|
<string name="poi_parking_sheds">Galpões</string>
|
||||||
|
<string name="poi_gpx_point">Ponto GPX</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3928,4 +3928,5 @@
|
||||||
<string name="message_need_calculate_route_before_show_graph">Dados de %1$s disponíveis apenas nas estradas, você precisa calcular uma rota usando “Rota entre pontos” para obtê-la.</string>
|
<string name="message_need_calculate_route_before_show_graph">Dados de %1$s disponíveis apenas nas estradas, você precisa calcular uma rota usando “Rota entre pontos” para obtê-la.</string>
|
||||||
<string name="message_graph_will_be_available_after_recalculation">Aguarde o recálculo da rota.
|
<string name="message_graph_will_be_available_after_recalculation">Aguarde o recálculo da rota.
|
||||||
\nO gráfico estará disponível após o recálculo.</string>
|
\nO gráfico estará disponível após o recálculo.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3935,4 +3935,6 @@
|
||||||
<string name="message_need_calculate_route_before_show_graph">%1$s dados disponíveis apenas nas estradas, precisa calcular uma rota a usar \"Rota entre pontos\" para obtê-la.</string>
|
<string name="message_need_calculate_route_before_show_graph">%1$s dados disponíveis apenas nas estradas, precisa calcular uma rota a usar \"Rota entre pontos\" para obtê-la.</string>
|
||||||
<string name="message_graph_will_be_available_after_recalculation">Espere pelo recalculo da rota.
|
<string name="message_graph_will_be_available_after_recalculation">Espere pelo recalculo da rota.
|
||||||
\nO gráfico estará disponível após o recalculo.</string>
|
\nO gráfico estará disponível após o recalculo.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
|
<string name="app_mode_gap">Lacuna</string>
|
||||||
</resources>
|
</resources>
|
|
@ -1974,7 +1974,7 @@
|
||||||
<string name="downloads">Загрузки</string>
|
<string name="downloads">Загрузки</string>
|
||||||
<string name="show_free_version_banner">Показывать баннер бесплатной версии</string>
|
<string name="show_free_version_banner">Показывать баннер бесплатной версии</string>
|
||||||
<string name="show_free_version_banner_description">Показывать баннер бесплатной версии даже в платной версии.</string>
|
<string name="show_free_version_banner_description">Показывать баннер бесплатной версии даже в платной версии.</string>
|
||||||
<string name="confirm_download_roadmaps">В карте дорог не необходимости, так как у вас уже есть стандартная (полная) карта. Загрузить в любом случае?</string>
|
<string name="confirm_download_roadmaps">В карте дорог нет необходимости, так как у вас уже есть стандартная (полная) карта. Загрузить в любом случае?</string>
|
||||||
<string name="value_downloaded_of_max">%1$.1f из %2$.1f МБ</string>
|
<string name="value_downloaded_of_max">%1$.1f из %2$.1f МБ</string>
|
||||||
<string name="file_size_in_mb">%.1f МБ</string>
|
<string name="file_size_in_mb">%.1f МБ</string>
|
||||||
<string name="update_all">Обновить все (%1$s МБ)</string>
|
<string name="update_all">Обновить все (%1$s МБ)</string>
|
||||||
|
|
|
@ -3796,7 +3796,7 @@
|
||||||
<string name="poi_booth">Casta de cabina</string>
|
<string name="poi_booth">Casta de cabina</string>
|
||||||
<string name="poi_video_yes">Eja</string>
|
<string name="poi_video_yes">Eja</string>
|
||||||
<string name="poi_video_no">Nono</string>
|
<string name="poi_video_no">Nono</string>
|
||||||
<string name="poi_internet_access_fee_customers">Sinnale pro agatare su palu</string>
|
<string name="poi_internet_access_fee_customers">Atzessu a ìnternet: clientes</string>
|
||||||
<string name="poi_traffic_signals_sound_locate">Petzi cando si podet camminare</string>
|
<string name="poi_traffic_signals_sound_locate">Petzi cando si podet camminare</string>
|
||||||
<string name="poi_tactile_paving_contrasted">Cuntrastadu</string>
|
<string name="poi_tactile_paving_contrasted">Cuntrastadu</string>
|
||||||
<string name="poi_tactile_paving_primitive">Primitivu</string>
|
<string name="poi_tactile_paving_primitive">Primitivu</string>
|
||||||
|
@ -3841,4 +3841,8 @@
|
||||||
<string name="poi_departures_board">Tabellone de sas tzucadas</string>
|
<string name="poi_departures_board">Tabellone de sas tzucadas</string>
|
||||||
<string name="poi_drinking_water_refill">Ricàrriga de abba potàbile</string>
|
<string name="poi_drinking_water_refill">Ricàrriga de abba potàbile</string>
|
||||||
<string name="poi_fuel_lng">GNL (LNG)</string>
|
<string name="poi_fuel_lng">GNL (LNG)</string>
|
||||||
|
<string name="poi_parking_layby">Ispiatzu (layby)</string>
|
||||||
|
<string name="poi_parking_sheds">Cabannas</string>
|
||||||
|
<string name="poi_parking_rooftop">Cobertura</string>
|
||||||
|
<string name="poi_gpx_point">Puntu GPX</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3931,4 +3931,5 @@
|
||||||
<string name="shared_string_graph">Gràficu</string>
|
<string name="shared_string_graph">Gràficu</string>
|
||||||
<string name="message_graph_will_be_available_after_recalculation">Iseta su càrculu nou de s\'àndala.
|
<string name="message_graph_will_be_available_after_recalculation">Iseta su càrculu nou de s\'àndala.
|
||||||
\nSu gràficu at a èssere a disponimentu a pustis de su càrculu.</string>
|
\nSu gràficu at a èssere a disponimentu a pustis de su càrculu.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3933,4 +3933,6 @@
|
||||||
<string name="message_need_calculate_route_before_show_graph">Údaje %1$s sú dostupné len na cestách, pre ich získanie musíte vypočítať trasu pomocou “Trasa medzi bodmi”.</string>
|
<string name="message_need_calculate_route_before_show_graph">Údaje %1$s sú dostupné len na cestách, pre ich získanie musíte vypočítať trasu pomocou “Trasa medzi bodmi”.</string>
|
||||||
<string name="message_graph_will_be_available_after_recalculation">Počkajte na prepočet trasy.
|
<string name="message_graph_will_be_available_after_recalculation">Počkajte na prepočet trasy.
|
||||||
\nGraf bude dostupný po prepočte.</string>
|
\nGraf bude dostupný po prepočte.</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
|
<string name="app_mode_gap">Medzera</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3788,7 +3788,7 @@
|
||||||
<string name="poi_booth">Вид стенда</string>
|
<string name="poi_booth">Вид стенда</string>
|
||||||
<string name="poi_video_yes">Так</string>
|
<string name="poi_video_yes">Так</string>
|
||||||
<string name="poi_video_no">Ні</string>
|
<string name="poi_video_no">Ні</string>
|
||||||
<string name="poi_internet_access_fee_customers">Сигнал, щоб знайти полюс</string>
|
<string name="poi_internet_access_fee_customers">Доступ до Інтернету: клієнти</string>
|
||||||
<string name="poi_traffic_signals_sound_locate">Допускається лише при ходінні</string>
|
<string name="poi_traffic_signals_sound_locate">Допускається лише при ходінні</string>
|
||||||
<string name="poi_tactile_paving_contrasted">Контрастний</string>
|
<string name="poi_tactile_paving_contrasted">Контрастний</string>
|
||||||
<string name="poi_tactile_paving_primitive">Примітивний</string>
|
<string name="poi_tactile_paving_primitive">Примітивний</string>
|
||||||
|
@ -3833,4 +3833,8 @@
|
||||||
<string name="poi_beehive">Вулик</string>
|
<string name="poi_beehive">Вулик</string>
|
||||||
<string name="poi_nuts">Насіннєвий магазин</string>
|
<string name="poi_nuts">Насіннєвий магазин</string>
|
||||||
<string name="poi_fuel_lng">СПГ</string>
|
<string name="poi_fuel_lng">СПГ</string>
|
||||||
|
<string name="poi_parking_layby">Придорожня стоянка</string>
|
||||||
|
<string name="poi_parking_sheds">Навіси</string>
|
||||||
|
<string name="poi_parking_rooftop">Дах</string>
|
||||||
|
<string name="poi_gpx_point">Точка GPX</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3929,4 +3929,6 @@
|
||||||
<string name="message_need_calculate_route_before_show_graph">%1$s дані доступні лише для доріг, вам потрібно обчислити маршрут за допомогою «Маршрут між точками», щоб отримати його.</string>
|
<string name="message_need_calculate_route_before_show_graph">%1$s дані доступні лише для доріг, вам потрібно обчислити маршрут за допомогою «Маршрут між точками», щоб отримати його.</string>
|
||||||
<string name="message_graph_will_be_available_after_recalculation">Дочекайтеся переобчислення маршруту.
|
<string name="message_graph_will_be_available_after_recalculation">Дочекайтеся переобчислення маршруту.
|
||||||
\nГрафік буде доступний після переобчислення.</string>
|
\nГрафік буде доступний після переобчислення.</string>
|
||||||
|
<string name="app_mode_gap">Розрив</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3799,7 +3799,7 @@
|
||||||
<string name="poi_booth">亭類型</string>
|
<string name="poi_booth">亭類型</string>
|
||||||
<string name="poi_video_yes">是</string>
|
<string name="poi_video_yes">是</string>
|
||||||
<string name="poi_video_no">否</string>
|
<string name="poi_video_no">否</string>
|
||||||
<string name="poi_internet_access_fee_customers">找到極點的訊號</string>
|
<string name="poi_internet_access_fee_customers">網際網路存取:顧客</string>
|
||||||
<string name="poi_traffic_signals_sound_locate">僅在步行時允許</string>
|
<string name="poi_traffic_signals_sound_locate">僅在步行時允許</string>
|
||||||
<string name="poi_tactile_paving_contrasted">對比</string>
|
<string name="poi_tactile_paving_contrasted">對比</string>
|
||||||
<string name="poi_tactile_paving_primitive">粗糙</string>
|
<string name="poi_tactile_paving_primitive">粗糙</string>
|
||||||
|
@ -3844,4 +3844,8 @@
|
||||||
<string name="poi_beehive">蜂箱</string>
|
<string name="poi_beehive">蜂箱</string>
|
||||||
<string name="poi_nuts">堅果店</string>
|
<string name="poi_nuts">堅果店</string>
|
||||||
<string name="poi_fuel_lng">LNG</string>
|
<string name="poi_fuel_lng">LNG</string>
|
||||||
|
<string name="poi_parking_layby">停車區</string>
|
||||||
|
<string name="poi_parking_sheds">車棚</string>
|
||||||
|
<string name="poi_parking_rooftop">屋頂</string>
|
||||||
|
<string name="poi_gpx_point">GPX 點</string>
|
||||||
</resources>
|
</resources>
|
|
@ -3928,4 +3928,6 @@
|
||||||
<string name="message_need_calculate_route_before_show_graph">%1$s 資料僅供道路使用,您需要使用「兩點間的路線」來計算路線。</string>
|
<string name="message_need_calculate_route_before_show_graph">%1$s 資料僅供道路使用,您需要使用「兩點間的路線」來計算路線。</string>
|
||||||
<string name="message_graph_will_be_available_after_recalculation">等待路線重新計算。
|
<string name="message_graph_will_be_available_after_recalculation">等待路線重新計算。
|
||||||
\n重新計算後即可使用圖表。</string>
|
\n重新計算後即可使用圖表。</string>
|
||||||
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
|
<string name="app_mode_gap">分隔</string>
|
||||||
</resources>
|
</resources>
|
|
@ -11,6 +11,14 @@
|
||||||
Thx - Hardy
|
Thx - Hardy
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
<string name="icon_group_travel">Travel</string>
|
||||||
|
<string name="icon_group_emergency">Emergency</string>
|
||||||
|
<string name="icon_group_sport">Sport</string>
|
||||||
|
<string name="icon_group_symbols">Symbols</string>
|
||||||
|
<string name="icon_group_service">Service</string>
|
||||||
|
<string name="icon_group_transport">Transport</string>
|
||||||
|
<string name="icon_group_special">Special</string>
|
||||||
|
<string name="icon_group_amenity">Amenity</string>
|
||||||
<string name="app_mode_gap">Gap</string>
|
<string name="app_mode_gap">Gap</string>
|
||||||
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
<string name="ltr_or_rtl_combine_via_dash">%1$s — %2$s</string>
|
||||||
<string name="message_graph_will_be_available_after_recalculation">Wait for the route recalculation.\nGraph will be available after recalculation.</string>
|
<string name="message_graph_will_be_available_after_recalculation">Wait for the route recalculation.\nGraph will be available after recalculation.</string>
|
||||||
|
@ -105,7 +113,7 @@
|
||||||
<string name="route_between_points_warning_desc">Next, snap your track to the nearest allowed road with one of your navigation profiles to use this option.</string>
|
<string name="route_between_points_warning_desc">Next, snap your track to the nearest allowed road with one of your navigation profiles to use this option.</string>
|
||||||
<string name="next_segment">Next segment</string>
|
<string name="next_segment">Next segment</string>
|
||||||
<string name="whole_track">Whole track</string>
|
<string name="whole_track">Whole track</string>
|
||||||
<string name="route_between_points_desc">Select how to connect points, by a straight line, or calculate a route between them as specified below.</string>
|
<string name="route_between_points_desc">Choose how to connect the points, by a straight line, or calculate a route between them as specified below.</string>
|
||||||
<string name="route_between_points_next_segment_button_desc">Only the next segment will be recalculated using the selected profile.</string>
|
<string name="route_between_points_next_segment_button_desc">Only the next segment will be recalculated using the selected profile.</string>
|
||||||
<string name="route_between_points_whole_track_button_desc">The whole track will be recalculated using the selected profile.</string>
|
<string name="route_between_points_whole_track_button_desc">The whole track will be recalculated using the selected profile.</string>
|
||||||
<string name="reverse_route">Reverse route</string>
|
<string name="reverse_route">Reverse route</string>
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<ListPreference android:summary="@string/settings_preset_descr" android:title="@string/settings_preset" android:key="default_application_mode_string"></ListPreference>
|
|
||||||
<ListPreference android:key="rotate_map" android:title="@string/rotate_map_to_bearing" android:summary="@string/rotate_map_to_bearing_descr"></ListPreference>
|
|
||||||
<ListPreference android:key="map_screen_orientation" android:title="@string/map_screen_orientation" android:summary="@string/map_screen_orientation_descr"></ListPreference>
|
|
||||||
<PreferenceCategory android:title="@string/localization_pref_title" android:key="localization">
|
|
||||||
<ListPreference android:key="preferred_locale" android:title="@string/preferred_locale" android:summary="@string/preferred_locale_descr"></ListPreference>
|
|
||||||
<Preference android:key="default_driving_region" android:title="@string/driving_region" android:summary="@string/driving_region_descr"></Preference>
|
|
||||||
<!-- ListPreference android:key="map_preferred_locale" android:title="@string/map_preferred_locale" android:summary="@string/map_preferred_locale_descr"></ListPreference -->
|
|
||||||
<ListPreference android:key="default_metric_system" android:title="@string/unit_of_length" android:summary="@string/unit_of_length_descr"></ListPreference>
|
|
||||||
<ListPreference android:key="coordinates_format" android:title="@string/coords_format" android:summary="@string/coords_format_descr"></ListPreference>
|
|
||||||
<ListPreference android:key="angular_measurement" android:title="@string/angular_measeurement" android:summary="@string/angular_measeurement_descr"></ListPreference>
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
<PreferenceCategory android:title="@string/misc_pref_title" android:key="misc">
|
|
||||||
<ListPreference android:key="osmand_theme" android:title="@string/choose_osmand_theme" android:summary="@string/choose_osmand_theme_descr"></ListPreference>
|
|
||||||
<ListPreference android:key="external_input_device" android:title="@string/external_input_device" android:summary="@string/external_input_device_descr"></ListPreference>
|
|
||||||
</PreferenceCategory>
|
|
||||||
<PreferenceCategory android:title="@string/settings_privacy">
|
|
||||||
<PreferenceScreen android:title="@string/proxy_pref_title" android:description="@string/proxy_pref_descr" android:key="proxy">
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="enable_proxy" android:title="@string/enable_proxy_title" android:summary="@string/enable_proxy_descr" android:defaultValue="false" />
|
|
||||||
<EditTextPreference
|
|
||||||
android:key="proxy_host" android:title="@string/proxy_host_title" android:summary="@string/proxy_host_descr" android:dependency="enable_proxy"
|
|
||||||
android:defaultValue="127.0.0.1" />
|
|
||||||
<EditTextPreference
|
|
||||||
android:key="proxy_port" android:title="@string/proxy_port_title" android:summary="@string/proxy_port_descr" android:dependency="enable_proxy"
|
|
||||||
android:defaultValue="8118" />
|
|
||||||
</PreferenceScreen>
|
|
||||||
</PreferenceCategory>
|
|
||||||
</PreferenceScreen>
|
|
|
@ -1,106 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<PreferenceCategory
|
|
||||||
android:key="routing_preferences"
|
|
||||||
android:title="@string/routing_preferences_descr">
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="fast_route_mode"
|
|
||||||
android:summary="@string/fast_route_mode_descr"
|
|
||||||
android:title="@string/fast_route_mode"/>
|
|
||||||
<Preference
|
|
||||||
android:key="avoid_in_routing"
|
|
||||||
android:summary="@string/avoid_in_routing_descr_"
|
|
||||||
android:title="@string/avoid_in_routing_title"/>
|
|
||||||
<Preference
|
|
||||||
android:key="prefer_in_routing"
|
|
||||||
android:summary="@string/prefer_in_routing_descr"
|
|
||||||
android:title="@string/prefer_in_routing_title"/>
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
<PreferenceCategory
|
|
||||||
android:key="guidance_preferences"
|
|
||||||
android:title="@string/guidance_preferences_descr">
|
|
||||||
<ListPreference
|
|
||||||
android:key="auto_follow_route"
|
|
||||||
android:summary="@string/choose_auto_follow_route_descr"
|
|
||||||
android:title="@string/choose_auto_follow_route"/>
|
|
||||||
<Preference
|
|
||||||
android:key="auto_zoom_map_on_off"
|
|
||||||
android:summary="@string/auto_zoom_map_descr"
|
|
||||||
android:title="@string/auto_zoom_map"/>
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="snap_to_road"
|
|
||||||
android:summary="@string/snap_to_road_descr"
|
|
||||||
android:title="@string/snap_to_road"/>
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="enable_time_conditional_routing"
|
|
||||||
android:title="@string/temporary_conditional_routing"/>
|
|
||||||
<Preference
|
|
||||||
android:key="show_routing_alarms"
|
|
||||||
android:summary="@string/show_warnings_descr"
|
|
||||||
android:title="@string/show_warnings_title"/>
|
|
||||||
<Preference
|
|
||||||
android:key="speak_routing_alarms"
|
|
||||||
android:summary="@string/speak_descr"
|
|
||||||
android:title="@string/speak_title"/>
|
|
||||||
<ListPreference
|
|
||||||
android:key="keep_informing"
|
|
||||||
android:summary="@string/keep_informing_descr"
|
|
||||||
android:title="@string/keep_informing"/>
|
|
||||||
<ListPreference
|
|
||||||
android:key="arrival_distance_factor"
|
|
||||||
android:summary="@string/arrival_distance_descr"
|
|
||||||
android:title="@string/arrival_distance"/>
|
|
||||||
<ListPreference
|
|
||||||
android:key="default_speed_system"
|
|
||||||
android:summary="@string/default_speed_system_descr"
|
|
||||||
android:title="@string/default_speed_system"/>
|
|
||||||
<ListPreference
|
|
||||||
android:key="speed_limit_exceed"
|
|
||||||
android:summary="@string/speed_limit_exceed_message"
|
|
||||||
android:title="@string/speed_limit_exceed"/>
|
|
||||||
<ListPreference
|
|
||||||
android:key="speed_for_map_to_direction_of_movement"
|
|
||||||
android:summary="@string/map_orientation_change_in_accordance_with_speed_descr"
|
|
||||||
android:title="@string/map_orientation_change_in_accordance_with_speed"/>
|
|
||||||
<!--
|
|
||||||
<CheckBoxPreference android:title="@string/show_zoom_buttons_navigation" android:summary="@string/show_zoom_buttons_navigation_descr" android:key="show_zoom_buttons_navigation" />
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<ListPreference
|
|
||||||
android:key="delay_to_start_navigation"
|
|
||||||
android:title="@string/delay_to_start_navigation"
|
|
||||||
android:summary="@string/delay_to_start_navigation_descr" />
|
|
||||||
-->
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
<PreferenceCategory
|
|
||||||
android:key="turn_screen_on"
|
|
||||||
android:title="@string/wake_on_voice">
|
|
||||||
|
|
||||||
<Preference
|
|
||||||
android:selectable="false"
|
|
||||||
android:summary="@string/wake_on_voice_descr" />
|
|
||||||
|
|
||||||
<ListPreference
|
|
||||||
android:key="turn_screen_on_time_int"
|
|
||||||
android:summary="@string/turn_screen_on_time_descr"
|
|
||||||
android:title="@string/shared_string_time"/>
|
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="turn_screen_on_sensor"
|
|
||||||
android:summary="@string/turn_screen_on_sensor_descr"
|
|
||||||
android:title="@string/turn_screen_on_sensor"/>
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
<PreferenceCategory
|
|
||||||
android:key="voice"
|
|
||||||
android:title="@string/voice_pref_title">
|
|
||||||
<ListPreference
|
|
||||||
android:key="voice_provider"
|
|
||||||
android:summary="@string/voice_provider_descr"
|
|
||||||
android:title="@string/voice_provider"/>
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
|
|
@ -53,6 +53,13 @@
|
||||||
android:title="@string/import_profile"
|
android:title="@string/import_profile"
|
||||||
tools:icon="@drawable/ic_action_import" />
|
tools:icon="@drawable/ic_action_import" />
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
android:key="export_profiles"
|
||||||
|
android:layout="@layout/preference_button"
|
||||||
|
android:persistent="false"
|
||||||
|
android:title="@string/shared_string_export"
|
||||||
|
tools:icon="@drawable/ic_action_export" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="reorder_profiles"
|
android:key="reorder_profiles"
|
||||||
android:layout="@layout/preference_button"
|
android:layout="@layout/preference_button"
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<Preference android:key="general_settings" android:title="@string/general_settings_2" android:summary="@string/general_settings_descr"/>
|
|
||||||
<Preference android:key="routing_settings" android:title="@string/routing_settings_2" android:summary="@string/routing_settings_descr"/>
|
|
||||||
<Preference android:key="subscription_settings" android:title="@string/osm_live_subscription" android:summary="@string/osm_live_subscription_desc"/>
|
|
||||||
<Preference android:key="privacy_and_security" android:title="@string/settings_privacy_and_security" android:summary="@string/settings_privacy_and_security_desc"/>
|
|
||||||
<PreferenceCategory android:key="plugin_settings" android:title="@string/plugin_settings" />
|
|
||||||
</PreferenceScreen>
|
|
|
@ -67,6 +67,7 @@ import net.osmand.plus.R;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -884,4 +885,65 @@ public class AndroidUtils {
|
||||||
}
|
}
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getRoutingStringPropertyName(Context ctx, String propertyName, String defValue) {
|
||||||
|
String value = getStringByProperty(ctx, "routing_attr_" + propertyName + "_name");
|
||||||
|
return value != null ? value : defValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getRoutingStringPropertyDescription(Context ctx, String propertyName, String defValue) {
|
||||||
|
String value = getStringByProperty(ctx, "routing_attr_" + propertyName + "_description");
|
||||||
|
return value != null ? value : defValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getRenderingStringPropertyName(Context ctx, String propertyName, String defValue) {
|
||||||
|
String value = getStringByProperty(ctx, "rendering_attr_" + propertyName + "_name");
|
||||||
|
return value != null ? value : defValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getRenderingStringPropertyDescription(Context ctx, String propertyName, String defValue) {
|
||||||
|
String value = getStringByProperty(ctx, "rendering_attr_" + propertyName + "_description");
|
||||||
|
return value != null ? value : defValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getIconStringPropertyName(Context ctx, String propertyName) {
|
||||||
|
String value = getStringByProperty(ctx, "icon_group_" + propertyName);
|
||||||
|
return value != null ? value : propertyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getRenderingStringPropertyValue(Context ctx, String propertyValue) {
|
||||||
|
if (propertyValue == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String propertyValueReplaced = propertyValue.replaceAll("\\s+", "_");
|
||||||
|
String value = getStringByProperty(ctx, "rendering_value_" + propertyValueReplaced + "_name");
|
||||||
|
return value != null ? value : propertyValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getStringRouteInfoPropertyValue(Context ctx, String propertyValue) {
|
||||||
|
if (propertyValue == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String propertyValueReplaced = propertyValue.replaceAll("\\s+", "_");
|
||||||
|
String value = getStringByProperty(ctx, "routeInfo_" + propertyValueReplaced + "_name");
|
||||||
|
return value != null ? value : propertyValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getStringByProperty(@NonNull Context ctx, @NonNull String property) {
|
||||||
|
try {
|
||||||
|
Field field = R.string.class.getField(property);
|
||||||
|
return getStringForField(ctx, field);
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.err.println(e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getStringForField(@NonNull Context ctx, @Nullable Field field) throws IllegalAccessException {
|
||||||
|
if (field != null) {
|
||||||
|
Integer in = (Integer) field.get(null);
|
||||||
|
return ctx.getString(in);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -2312,7 +2312,7 @@ public class OsmandAidlApi {
|
||||||
File exportDir = app.getSettings().getExternalStorageDirectory();
|
File exportDir = app.getSettings().getExternalStorageDirectory();
|
||||||
String fileName = appMode.toHumanString();
|
String fileName = appMode.toHumanString();
|
||||||
SettingsHelper settingsHelper = app.getSettingsHelper();
|
SettingsHelper settingsHelper = app.getSettingsHelper();
|
||||||
settingsItems.addAll(settingsHelper.getFilteredSettingsItems(settingsHelper.getAdditionalData(), settingsTypes));
|
settingsItems.addAll(settingsHelper.getFilteredSettingsItems(settingsHelper.getAdditionalData(false), settingsTypes));
|
||||||
settingsHelper.exportSettings(exportDir, fileName, null, settingsItems, true);
|
settingsHelper.exportSettings(exportDir, fileName, null, settingsItems, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,119 +0,0 @@
|
||||||
package net.osmand.plus.activities;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
import android.os.Build.VERSION;
|
|
||||||
import android.os.Build.VERSION_CODES;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.util.TypedValue;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.Spinner;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.appcompat.widget.Toolbar;
|
|
||||||
import androidx.core.view.ViewCompat;
|
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
|
|
||||||
public abstract class ActionBarPreferenceActivity extends AppCompatPreferenceActivity {
|
|
||||||
private Toolbar tb;
|
|
||||||
private View shadowView;
|
|
||||||
|
|
||||||
public Toolbar getToolbar() {
|
|
||||||
return tb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(final Bundle savedInstanceState) {
|
|
||||||
//settings needed it's own theme because of check boxes not styled properly
|
|
||||||
OsmandSettings settings = ((OsmandApplication) getApplication()).getSettings();
|
|
||||||
int t = settings.isLightContent()
|
|
||||||
? R.style.OsmandLightTheme_NoActionbar_Preferences
|
|
||||||
: R.style.OsmandDarkTheme_NoActionbar_Preferences;
|
|
||||||
setTheme(t);
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
boolean lightTheme = settings.isLightContent();
|
|
||||||
setContentView(R.layout.preference_activity);
|
|
||||||
tb = (Toolbar) findViewById(R.id.toolbar);
|
|
||||||
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {
|
|
||||||
shadowView = findViewById(R.id.shadowView);
|
|
||||||
final ViewGroup parent = (ViewGroup) shadowView.getParent();
|
|
||||||
parent.removeView(shadowView);
|
|
||||||
shadowView = null;
|
|
||||||
}
|
|
||||||
tb.setClickable(true);
|
|
||||||
int activeButtonsAndLinksTextColorResId = lightTheme ? R.color.active_buttons_and_links_text_light : R.color.active_buttons_and_links_text_dark;
|
|
||||||
int navigationIconResId = AndroidUtils.getNavigationIconResId(getApplication());
|
|
||||||
Drawable icBack = ((OsmandApplication) getApplication()).getUIUtilities().getIcon(navigationIconResId, activeButtonsAndLinksTextColorResId);
|
|
||||||
tb.setNavigationIcon(icBack);
|
|
||||||
tb.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
|
||||||
tb.setBackgroundColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTabBackground)));
|
|
||||||
tb.setTitleTextColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTextColor)));
|
|
||||||
tb.setNavigationOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(final View v) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
getSpinner().setVisibility(View.GONE);
|
|
||||||
getTypeButton().setVisibility(View.GONE);
|
|
||||||
setProgressVisibility(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int getResIdFromAttribute(final Activity activity, final int attr) {
|
|
||||||
if (attr == 0)
|
|
||||||
return 0;
|
|
||||||
final TypedValue typedvalueattr = new TypedValue();
|
|
||||||
activity.getTheme().resolveAttribute(attr, typedvalueattr, true);
|
|
||||||
return typedvalueattr.resourceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void setEnabledActionBarShadow(final boolean enable) {
|
|
||||||
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {
|
|
||||||
ViewCompat.setElevation(tb, enable ? 4 : 0);
|
|
||||||
} else {
|
|
||||||
if (shadowView == null)
|
|
||||||
shadowView = findViewById(R.id.shadowView);
|
|
||||||
shadowView.setVisibility(enable ? View.VISIBLE : View.GONE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Spinner getSpinner() {
|
|
||||||
return (Spinner) findViewById(R.id.spinner_nav);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected LinearLayout getTypeButton() {
|
|
||||||
return (LinearLayout) findViewById(R.id.type_selection_button);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected TextView getModeTitleTV() {
|
|
||||||
return (TextView) findViewById(R.id.mode_title);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected TextView getModeSubTitleTV() {
|
|
||||||
return (TextView) findViewById(R.id.mode_subtitle);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected ImageView getModeIconIV() {
|
|
||||||
return (ImageView) findViewById(R.id.mode_icon);
|
|
||||||
}
|
|
||||||
protected ImageView getDropDownArrow() {
|
|
||||||
return (ImageView) findViewById(R.id.type_down_arrow);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void setProgressVisibility(boolean visibility) {
|
|
||||||
if (visibility) {
|
|
||||||
findViewById(R.id.ProgressBar).setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
findViewById(R.id.ProgressBar).setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,110 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2014 The Android Open Source Project
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package net.osmand.plus.activities;
|
|
||||||
|
|
||||||
import android.content.res.Configuration;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.preference.PreferenceActivity;
|
|
||||||
import android.view.MenuInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import androidx.annotation.LayoutRes;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.appcompat.app.ActionBar;
|
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
|
||||||
import androidx.appcompat.widget.Toolbar;
|
|
||||||
/**
|
|
||||||
* A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls
|
|
||||||
* to be used with AppCompat.
|
|
||||||
*
|
|
||||||
* This technique can be used with an {@link android.app.Activity} class, not just
|
|
||||||
* {@link android.preference.PreferenceActivity}.
|
|
||||||
*/
|
|
||||||
public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
|
|
||||||
private AppCompatDelegate mDelegate;
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
getDelegate().installViewFactory();
|
|
||||||
getDelegate().onCreate(savedInstanceState);
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
|
||||||
super.onPostCreate(savedInstanceState);
|
|
||||||
getDelegate().onPostCreate(savedInstanceState);
|
|
||||||
}
|
|
||||||
public ActionBar getSupportActionBar() {
|
|
||||||
return getDelegate().getSupportActionBar();
|
|
||||||
}
|
|
||||||
public void setSupportActionBar(@Nullable Toolbar toolbar) {
|
|
||||||
getDelegate().setSupportActionBar(toolbar);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public MenuInflater getMenuInflater() {
|
|
||||||
return getDelegate().getMenuInflater();
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void setContentView(@LayoutRes int layoutResID) {
|
|
||||||
getDelegate().setContentView(layoutResID);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void setContentView(View view) {
|
|
||||||
getDelegate().setContentView(view);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void setContentView(View view, ViewGroup.LayoutParams params) {
|
|
||||||
getDelegate().setContentView(view, params);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void addContentView(View view, ViewGroup.LayoutParams params) {
|
|
||||||
getDelegate().addContentView(view, params);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected void onPostResume() {
|
|
||||||
super.onPostResume();
|
|
||||||
getDelegate().onPostResume();
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected void onTitleChanged(CharSequence title, int color) {
|
|
||||||
super.onTitleChanged(title, color);
|
|
||||||
getDelegate().setTitle(title);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void onConfigurationChanged(Configuration newConfig) {
|
|
||||||
super.onConfigurationChanged(newConfig);
|
|
||||||
getDelegate().onConfigurationChanged(newConfig);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected void onStop() {
|
|
||||||
super.onStop();
|
|
||||||
getDelegate().onStop();
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
getDelegate().onDestroy();
|
|
||||||
}
|
|
||||||
public void invalidateOptionsMenu() {
|
|
||||||
getDelegate().invalidateOptionsMenu();
|
|
||||||
}
|
|
||||||
private AppCompatDelegate getDelegate() {
|
|
||||||
if (mDelegate == null) {
|
|
||||||
mDelegate = AppCompatDelegate.create(this, null);
|
|
||||||
}
|
|
||||||
return mDelegate;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,101 +0,0 @@
|
||||||
package net.osmand.plus.activities;
|
|
||||||
|
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.preference.Preference;
|
|
||||||
import android.preference.PreferenceCategory;
|
|
||||||
import android.preference.PreferenceScreen;
|
|
||||||
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandPlugin;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.Version;
|
|
||||||
import net.osmand.plus.liveupdates.OsmLiveActivity;
|
|
||||||
|
|
||||||
public class SettingsActivity extends SettingsBaseActivity {
|
|
||||||
|
|
||||||
public static final String INTENT_KEY_SETTINGS_SCREEN = "INTENT_KEY_SETTINGS_SCREEN";
|
|
||||||
public static final int SCREEN_GENERAL_SETTINGS = 1;
|
|
||||||
public static final int SCREEN_NAVIGATION_SETTINGS = 2;
|
|
||||||
|
|
||||||
private static final int PLUGINS_SELECTION_REQUEST = 1;
|
|
||||||
private static final String CONTRIBUTION_VERSION_FLAG = "CONTRIBUTION_VERSION_FLAG";
|
|
||||||
|
|
||||||
|
|
||||||
private Preference general;
|
|
||||||
private Preference routing;
|
|
||||||
private Preference subscription;
|
|
||||||
private Preference privacy;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
((OsmandApplication) getApplication()).applyTheme(this);
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
addPreferencesFromResource(R.xml.settings_pref);
|
|
||||||
PreferenceScreen screen = getPreferenceScreen();
|
|
||||||
general = (Preference) screen.findPreference("general_settings");
|
|
||||||
general.setOnPreferenceClickListener(this);
|
|
||||||
routing = (Preference) screen.findPreference("routing_settings");
|
|
||||||
routing.setOnPreferenceClickListener(this);
|
|
||||||
subscription = (Preference) screen.findPreference("subscription_settings");
|
|
||||||
subscription.setOnPreferenceClickListener(this);
|
|
||||||
privacy = (Preference) screen.findPreference("privacy_and_security");
|
|
||||||
privacy.setOnPreferenceClickListener(this);
|
|
||||||
|
|
||||||
getToolbar().setTitle(Version.getFullVersion(getMyApplication()));
|
|
||||||
|
|
||||||
Intent intent = getIntent();
|
|
||||||
if(intent != null && intent.getIntExtra(INTENT_KEY_SETTINGS_SCREEN, 0) != 0){
|
|
||||||
int s = intent.getIntExtra(INTENT_KEY_SETTINGS_SCREEN, 0);
|
|
||||||
if(s == SCREEN_GENERAL_SETTINGS){
|
|
||||||
startActivity(new Intent(this, SettingsGeneralActivity.class));
|
|
||||||
} else if(s == SCREEN_NAVIGATION_SETTINGS){
|
|
||||||
startActivity(new Intent(this, SettingsNavigationActivity.class));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PreferenceCategory plugins = (PreferenceCategory) screen.findPreference("plugin_settings");
|
|
||||||
for(OsmandPlugin op : OsmandPlugin.getEnabledPlugins()) {
|
|
||||||
// final Class<? extends Activity> sa = op.getSettingsActivity();
|
|
||||||
// if(sa != null) {
|
|
||||||
// Preference preference = new Preference(this);
|
|
||||||
// preference.setTitle(op.getName());
|
|
||||||
// preference.setKey(op.getId());
|
|
||||||
// preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public boolean onPreferenceClick(Preference preference) {
|
|
||||||
// startActivity(new Intent(SettingsActivity.this, sa));
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// plugins.addPreference(preference);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
if (preference == general) {
|
|
||||||
startActivity(new Intent(this, SettingsGeneralActivity.class));
|
|
||||||
return true;
|
|
||||||
} else if (preference == routing) {
|
|
||||||
startActivity(new Intent(this, SettingsNavigationActivity.class));
|
|
||||||
return true;
|
|
||||||
} else if (preference == subscription) {
|
|
||||||
Intent intent = new Intent(this, OsmLiveActivity.class);
|
|
||||||
intent.putExtra(OsmLiveActivity.SHOW_SETTINGS_ONLY_INTENT_PARAM, true);
|
|
||||||
startActivity(intent);
|
|
||||||
return true;
|
|
||||||
} else if (preference == privacy) {
|
|
||||||
Intent intent = new Intent(this, PrivacyAndSecurityActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
super.onPreferenceClick(preference);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,610 +0,0 @@
|
||||||
package net.osmand.plus.activities;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.DialogInterface.OnDismissListener;
|
|
||||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.preference.CheckBoxPreference;
|
|
||||||
import android.preference.EditTextPreference;
|
|
||||||
import android.preference.ListPreference;
|
|
||||||
import android.preference.Preference;
|
|
||||||
import android.preference.Preference.OnPreferenceChangeListener;
|
|
||||||
import android.preference.Preference.OnPreferenceClickListener;
|
|
||||||
import android.preference.PreferenceGroup;
|
|
||||||
import android.preference.PreferenceScreen;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
import androidx.appcompat.app.AlertDialog.Builder;
|
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
|
||||||
import net.osmand.PlatformUtil;
|
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
|
||||||
import net.osmand.plus.settings.backend.CommonPreference;
|
|
||||||
import net.osmand.plus.settings.backend.OsmandPreference;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.profiles.AppProfileArrayAdapter;
|
|
||||||
import net.osmand.plus.profiles.ProfileDataObject;
|
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
|
|
||||||
public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
|
|
||||||
implements OnPreferenceChangeListener, OnPreferenceClickListener {
|
|
||||||
|
|
||||||
private static final Log LOG = PlatformUtil.getLog(SettingsBaseActivity.class);
|
|
||||||
public static final String INTENT_APP_MODE = "INTENT_APP_MODE";
|
|
||||||
private static final String PREV_MODE_KEY = "previous_mode";
|
|
||||||
private static final String SELECTED_MODE_KEY = "selected_mode";
|
|
||||||
|
|
||||||
protected OsmandSettings settings;
|
|
||||||
protected final boolean profileSettings;
|
|
||||||
protected List<ApplicationMode> modes = new ArrayList<ApplicationMode>();
|
|
||||||
private ApplicationMode previousAppMode;
|
|
||||||
protected ApplicationMode selectedAppMode;
|
|
||||||
|
|
||||||
private Map<String, Preference> screenPreferences = new LinkedHashMap<String, Preference>();
|
|
||||||
private Map<String, OsmandPreference<Boolean>> booleanPreferences = new LinkedHashMap<String, OsmandPreference<Boolean>>();
|
|
||||||
private Map<String, OsmandPreference<?>> listPreferences = new LinkedHashMap<String, OsmandPreference<?>>();
|
|
||||||
private Map<String, OsmandPreference<String>> editTextPreferences = new LinkedHashMap<String, OsmandPreference<String>>();
|
|
||||||
|
|
||||||
private Map<String, Map<String, ?>> listPrefValues = new LinkedHashMap<String, Map<String, ?>>();
|
|
||||||
|
|
||||||
public SettingsBaseActivity() {
|
|
||||||
this(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isModeSelected = false;
|
|
||||||
|
|
||||||
public SettingsBaseActivity(boolean profile) {
|
|
||||||
profileSettings = profile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckBoxPreference registerBooleanPreference(OsmandPreference<Boolean> b, PreferenceGroup screen) {
|
|
||||||
CheckBoxPreference p = (CheckBoxPreference) screen.findPreference(b.getId());
|
|
||||||
p.setOnPreferenceChangeListener(this);
|
|
||||||
screenPreferences.put(b.getId(), p);
|
|
||||||
booleanPreferences.put(b.getId(), b);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public CheckBoxPreference createCheckBoxPreference(OsmandPreference<Boolean> b, int title, int summary) {
|
|
||||||
CheckBoxPreference p = new CheckBoxPreference(this);
|
|
||||||
p.setTitle(title);
|
|
||||||
p.setKey(b.getId());
|
|
||||||
p.setSummary(summary);
|
|
||||||
p.setOnPreferenceChangeListener(this);
|
|
||||||
screenPreferences.put(b.getId(), p);
|
|
||||||
booleanPreferences.put(b.getId(), b);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckBoxPreference createCheckBoxPreference(OsmandPreference<Boolean> b, String title, String summary) {
|
|
||||||
CheckBoxPreference p = new CheckBoxPreference(this);
|
|
||||||
p.setTitle(title);
|
|
||||||
p.setKey(b.getId());
|
|
||||||
p.setSummary(summary);
|
|
||||||
p.setOnPreferenceChangeListener(this);
|
|
||||||
screenPreferences.put(b.getId(), p);
|
|
||||||
booleanPreferences.put(b.getId(), b);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckBoxPreference createCheckBoxPreference(OsmandPreference<Boolean> b) {
|
|
||||||
CheckBoxPreference p = new CheckBoxPreference(this);
|
|
||||||
p.setKey(b.getId());
|
|
||||||
p.setOnPreferenceChangeListener(this);
|
|
||||||
screenPreferences.put(b.getId(), p);
|
|
||||||
booleanPreferences.put(b.getId(), b);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getRoutingStringPropertyName(Context ctx, String propertyName, String defValue) {
|
|
||||||
try {
|
|
||||||
Field f = R.string.class.getField("routing_attr_" + propertyName + "_name");
|
|
||||||
if (f != null) {
|
|
||||||
Integer in = (Integer) f.get(null);
|
|
||||||
return ctx.getString(in);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.err.println(e.getMessage());
|
|
||||||
}
|
|
||||||
return defValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getRoutingStringPropertyDescription(Context ctx, String propertyName, String defValue) {
|
|
||||||
try {
|
|
||||||
Field f = R.string.class.getField("routing_attr_" + propertyName + "_description");
|
|
||||||
if (f != null) {
|
|
||||||
Integer in = (Integer) f.get(null);
|
|
||||||
return ctx.getString(in);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.err.println(e.getMessage());
|
|
||||||
}
|
|
||||||
return defValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getStringPropertyName(Context ctx, String propertyName, String defValue) {
|
|
||||||
try {
|
|
||||||
Field f = R.string.class.getField("rendering_attr_" + propertyName + "_name");
|
|
||||||
if (f != null) {
|
|
||||||
Integer in = (Integer) f.get(null);
|
|
||||||
return ctx.getString(in);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.err.println(e.getMessage());
|
|
||||||
}
|
|
||||||
return defValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getStringPropertyDescription(Context ctx, String propertyName, String defValue) {
|
|
||||||
try {
|
|
||||||
Field f = R.string.class.getField("rendering_attr_" + propertyName + "_description");
|
|
||||||
if (f != null) {
|
|
||||||
Integer in = (Integer) f.get(null);
|
|
||||||
return ctx.getString(in);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
//e.printStackTrace();
|
|
||||||
System.err.println(e.getMessage());
|
|
||||||
}
|
|
||||||
return defValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getStringPropertyValue(Context ctx, String propertyValue) {
|
|
||||||
try {
|
|
||||||
if(propertyValue == null) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
final String propertyValueReplaced = propertyValue.replaceAll("\\s+","_");
|
|
||||||
Field f = R.string.class.getField("rendering_value_" + propertyValueReplaced + "_name");
|
|
||||||
if (f != null) {
|
|
||||||
Integer in = (Integer) f.get(null);
|
|
||||||
return ctx.getString(in);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.err.println(e.getMessage());
|
|
||||||
}
|
|
||||||
return propertyValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getStringRouteInfoPropertyValue(Context ctx, String propertyValue) {
|
|
||||||
try {
|
|
||||||
if(propertyValue == null) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
final String propertyValueReplaced = propertyValue.replaceAll("\\s+","_");
|
|
||||||
Field f = R.string.class.getField("routeInfo_" + propertyValueReplaced + "_name");
|
|
||||||
if (f != null) {
|
|
||||||
Integer in = (Integer) f.get(null);
|
|
||||||
return ctx.getString(in);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.err.println(e.getMessage());
|
|
||||||
}
|
|
||||||
return propertyValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> void registerListPreference(OsmandPreference<T> b, PreferenceGroup screen, String[] names, T[] values) {
|
|
||||||
ListPreference p = (ListPreference) screen.findPreference(b.getId());
|
|
||||||
prepareListPreference(b, names, values, p);
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> ListPreference createListPreference(OsmandPreference<T> b, String[] names, T[] values, int title, int summary) {
|
|
||||||
ListPreference p = new ListPreference(this);
|
|
||||||
p.setTitle(title);
|
|
||||||
p.setKey(b.getId());
|
|
||||||
p.setDialogTitle(title);
|
|
||||||
p.setSummary(summary);
|
|
||||||
prepareListPreference(b, names, values, p);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> ListPreference createListPreference(OsmandPreference<T> b, String[] names, T[] values, String title, String summary) {
|
|
||||||
ListPreference p = new ListPreference(this);
|
|
||||||
p.setTitle(title);
|
|
||||||
p.setKey(b.getId());
|
|
||||||
p.setDialogTitle(title);
|
|
||||||
p.setSummary(summary);
|
|
||||||
prepareListPreference(b, names, values, p);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> ListPreference createListPreference(OsmandPreference<T> b, String[] names, T[] values) {
|
|
||||||
ListPreference p = new ListPreference(this);
|
|
||||||
p.setKey(b.getId());
|
|
||||||
prepareListPreference(b, names, values, p);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
private <T> void prepareListPreference(OsmandPreference<T> b, String[] names, T[] values, ListPreference p) {
|
|
||||||
p.setOnPreferenceChangeListener(this);
|
|
||||||
LinkedHashMap<String, Object> vals = new LinkedHashMap<String, Object>();
|
|
||||||
screenPreferences.put(b.getId(), p);
|
|
||||||
listPreferences.put(b.getId(), b);
|
|
||||||
listPrefValues.put(b.getId(), vals);
|
|
||||||
assert names.length == values.length;
|
|
||||||
for (int i = 0; i < names.length; i++) {
|
|
||||||
vals.put(names[i], values[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void registerDisablePreference(OsmandPreference p, String value, OsmandPreference<Boolean> disable) {
|
|
||||||
LinkedHashMap<String, Object> vals = (LinkedHashMap<String, Object>) listPrefValues.get(p.getId());
|
|
||||||
vals.put(value, disable);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void registerEditTextPreference(OsmandPreference<String> b, PreferenceScreen screen) {
|
|
||||||
EditTextPreference p = (EditTextPreference) screen.findPreference(b.getId());
|
|
||||||
p.setOnPreferenceChangeListener(this);
|
|
||||||
screenPreferences.put(b.getId(), p);
|
|
||||||
editTextPreferences.put(b.getId(), b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public EditTextPreference createEditTextPreference(OsmandPreference<String> b, int title, int summary) {
|
|
||||||
EditTextPreference p = new EditTextPreference(this);
|
|
||||||
p.setTitle(title);
|
|
||||||
p.setKey(b.getId());
|
|
||||||
p.setDialogTitle(title);
|
|
||||||
p.setSummary(summary);
|
|
||||||
p.setOnPreferenceChangeListener(this);
|
|
||||||
screenPreferences.put(b.getId(), p);
|
|
||||||
editTextPreferences.put(b.getId(), b);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void registerTimeListPreference(OsmandPreference<Integer> b, PreferenceScreen screen, int[] seconds, int[] minutes, int coeff) {
|
|
||||||
int minutesLength = minutes == null ? 0 : minutes.length;
|
|
||||||
int secondsLength = seconds == null ? 0 : seconds.length;
|
|
||||||
Integer[] ints = new Integer[secondsLength + minutesLength];
|
|
||||||
String[] intDescriptions = new String[ints.length];
|
|
||||||
for (int i = 0; i < secondsLength; i++) {
|
|
||||||
ints[i] = seconds[i] * coeff;
|
|
||||||
intDescriptions[i] = seconds[i] + " " + getString(R.string.int_seconds); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
for (int i = 0; i < minutesLength; i++) {
|
|
||||||
ints[secondsLength + i] = (minutes[i] * 60) * coeff;
|
|
||||||
intDescriptions[secondsLength + i] = minutes[i] + " " + getString(R.string.int_min); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
registerListPreference(b, screen, intDescriptions, ints);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ListPreference createTimeListPreference(OsmandPreference<Integer> b, int[] seconds, int[] minutes, int coeff, int title, int summary) {
|
|
||||||
return createTimeListPreference(b, seconds, minutes, coeff, null, title, summary);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ListPreference createTimeListPreference(OsmandPreference<Integer> b, int[] seconds, int[] minutes,
|
|
||||||
int coeff, CommonPreference<Boolean> disable, int title, int summary) {
|
|
||||||
int minutesLength = minutes == null ? 0 : minutes.length;
|
|
||||||
int secondsLength = seconds == null ? 0 : seconds.length;
|
|
||||||
Integer[] ints = new Integer[secondsLength + minutesLength];
|
|
||||||
String[] intDescriptions = new String[ints.length];
|
|
||||||
int k = 0;
|
|
||||||
for (int i = 0; i < secondsLength; i++) {
|
|
||||||
ints[k] = seconds[i] * coeff;
|
|
||||||
intDescriptions[k] = seconds[i] + " " + getString(R.string.int_seconds); //$NON-NLS-1$
|
|
||||||
k++;
|
|
||||||
}
|
|
||||||
OsmandApplication app = getMyApplication();
|
|
||||||
for (int i = 0; i < minutesLength; i++) {
|
|
||||||
ints[k] = (minutes[i] * 60) * coeff;
|
|
||||||
intDescriptions[k] = OsmAndFormatter.getFormattedDuration(minutes[i] * 60, app);
|
|
||||||
k++;
|
|
||||||
}
|
|
||||||
ListPreference lp = createListPreference(b, intDescriptions, ints, title, summary);
|
|
||||||
if (disable != null) {
|
|
||||||
registerDisablePreference(b, getString(R.string.confirm_every_run), disable);
|
|
||||||
}
|
|
||||||
return lp;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
|
||||||
int itemId = item.getItemId();
|
|
||||||
switch (itemId) {
|
|
||||||
case android.R.id.home:
|
|
||||||
finish();
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
OsmandApplication app = getMyApplication();
|
|
||||||
settings = app.getSettings();
|
|
||||||
getToolbar().setTitle(R.string.shared_string_settings);
|
|
||||||
|
|
||||||
if (profileSettings) {
|
|
||||||
modes.clear();
|
|
||||||
findViewById(R.id.selector_shadow).setVisibility(View.VISIBLE);
|
|
||||||
if (this instanceof SettingsNavigationActivity) {
|
|
||||||
for (ApplicationMode a : ApplicationMode.values(app)) {
|
|
||||||
if (a != ApplicationMode.DEFAULT) {
|
|
||||||
modes.add(a);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
modes.addAll(ApplicationMode.values(app));
|
|
||||||
}
|
|
||||||
|
|
||||||
getTypeButton().setVisibility(View.VISIBLE);
|
|
||||||
getTypeButton().setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
selectAppModeDialog().show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
setPreferenceScreen(getPreferenceManager().createPreferenceScreen(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected AlertDialog.Builder selectAppModeDialog() {
|
|
||||||
AlertDialog.Builder singleSelectDialogBuilder = new Builder(SettingsBaseActivity.this);
|
|
||||||
singleSelectDialogBuilder.setTitle(R.string.profile_settings);
|
|
||||||
|
|
||||||
final List<ProfileDataObject> activeModes = new ArrayList<>();
|
|
||||||
for (ApplicationMode am : ApplicationMode.values(getMyApplication())) {
|
|
||||||
boolean isSelected = am == selectedAppMode;
|
|
||||||
|
|
||||||
if (am != ApplicationMode.DEFAULT || !(this instanceof SettingsNavigationActivity)) {
|
|
||||||
activeModes.add(new ProfileDataObject(
|
|
||||||
am.toHumanString(),
|
|
||||||
getAppModeDescription(am),
|
|
||||||
am.getStringKey(),
|
|
||||||
am.getIconRes(),
|
|
||||||
isSelected,
|
|
||||||
am.getIconColorInfo()
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final AppProfileArrayAdapter modeNames = new AppProfileArrayAdapter(
|
|
||||||
SettingsBaseActivity.this, R.layout.bottom_sheet_item_with_descr_and_radio_btn, activeModes, isModeSelected);
|
|
||||||
|
|
||||||
singleSelectDialogBuilder.setNegativeButton(R.string.shared_string_cancel,
|
|
||||||
new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
dialog.dismiss();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
singleSelectDialogBuilder.setOnDismissListener(new OnDismissListener() {
|
|
||||||
@Override
|
|
||||||
public void onDismiss(DialogInterface dialog) {
|
|
||||||
if (!isModeSelected) {
|
|
||||||
List<ApplicationMode> m = ApplicationMode.values(getMyApplication());
|
|
||||||
setSelectedAppMode(m.get(m.size() > 1 ? 1 : 0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
singleSelectDialogBuilder.setAdapter(modeNames, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
settings.APPLICATION_MODE.set(modes.get(which));
|
|
||||||
updateModeButton(modes.get(which));
|
|
||||||
updateAllSettings();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return singleSelectDialogBuilder;
|
|
||||||
}
|
|
||||||
|
|
||||||
void updateModeButton(ApplicationMode mode) {
|
|
||||||
OsmandApplication app = getMyApplication();
|
|
||||||
boolean nightMode = !app.getSettings().isLightContent();
|
|
||||||
String title = mode.toHumanString();
|
|
||||||
|
|
||||||
getModeTitleTV().setText(title);
|
|
||||||
getModeSubTitleTV().setText(getAppModeDescription(mode));
|
|
||||||
settings.APPLICATION_MODE.set(mode);
|
|
||||||
selectedAppMode = mode;
|
|
||||||
getModeIconIV().setImageDrawable(getMyApplication().getUIUtilities().getIcon(mode.getIconRes(),
|
|
||||||
mode.getIconColorInfo().getColor(nightMode)));
|
|
||||||
getDropDownArrow().setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_arrow_drop_down, !nightMode));
|
|
||||||
isModeSelected = true;
|
|
||||||
updateAllSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getAppModeDescription(ApplicationMode mode) {
|
|
||||||
String descr;
|
|
||||||
if (!mode.isCustomProfile()) {
|
|
||||||
descr = getString(R.string.profile_type_base_string);
|
|
||||||
} else {
|
|
||||||
descr = String.format(getString(R.string.profile_type_descr_string),
|
|
||||||
mode.getParent().toHumanString());
|
|
||||||
if (mode.getRoutingProfile() != null && mode.getRoutingProfile().contains("/")) {
|
|
||||||
descr = descr.concat(", " + mode.getRoutingProfile()
|
|
||||||
.substring(0, mode.getRoutingProfile().indexOf("/")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return descr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
if (profileSettings) {
|
|
||||||
if (previousAppMode == null) {
|
|
||||||
previousAppMode = settings.getApplicationMode();
|
|
||||||
}
|
|
||||||
if (getIntent() != null && getIntent().hasExtra(INTENT_APP_MODE)) {
|
|
||||||
String modeStr = getIntent().getStringExtra(INTENT_APP_MODE);
|
|
||||||
ApplicationMode mode = ApplicationMode.valueOfStringKey(modeStr, previousAppMode);
|
|
||||||
setSelectedAppMode(mode);
|
|
||||||
} else {
|
|
||||||
setSelectedAppMode(selectedAppMode);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
updateAllSettings();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void setSelectedAppMode(ApplicationMode am) {
|
|
||||||
for (ApplicationMode a : modes) {
|
|
||||||
if (am != null && am == a) {
|
|
||||||
updateModeButton(a);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPause() {
|
|
||||||
super.onPause();
|
|
||||||
if(profileSettings) {
|
|
||||||
settings.APPLICATION_MODE.set(previousAppMode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onSaveInstanceState(Bundle outState) {
|
|
||||||
super.onSaveInstanceState(outState);
|
|
||||||
if (profileSettings) {
|
|
||||||
if (previousAppMode != null) {
|
|
||||||
outState.putString(PREV_MODE_KEY, previousAppMode.getStringKey());
|
|
||||||
}
|
|
||||||
if (selectedAppMode != null) {
|
|
||||||
outState.putString(SELECTED_MODE_KEY, selectedAppMode.getStringKey());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onRestoreInstanceState(Bundle state) {
|
|
||||||
super.onRestoreInstanceState(state);
|
|
||||||
if (state != null) {
|
|
||||||
if (profileSettings && state.containsKey(SELECTED_MODE_KEY) && state.containsKey(PREV_MODE_KEY)) {
|
|
||||||
for (ApplicationMode am : ApplicationMode.values(getMyApplication())) {
|
|
||||||
if (am.getStringKey() == state.get(SELECTED_MODE_KEY)) {
|
|
||||||
setSelectedAppMode(am);
|
|
||||||
}
|
|
||||||
if (am.getStringKey() == state.get(PREV_MODE_KEY)) {
|
|
||||||
previousAppMode = am;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateAllSettings() {
|
|
||||||
for (OsmandPreference<Boolean> b : booleanPreferences.values()) {
|
|
||||||
CheckBoxPreference pref = (CheckBoxPreference) screenPreferences.get(b.getId());
|
|
||||||
pref.setChecked(b.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
for (OsmandPreference<?> p : listPreferences.values()) {
|
|
||||||
ListPreference listPref = (ListPreference) screenPreferences.get(p.getId());
|
|
||||||
Map<String, ?> prefValues = listPrefValues.get(p.getId());
|
|
||||||
String[] entryValues = new String[prefValues.size()];
|
|
||||||
String[] entries = new String[prefValues.size()];
|
|
||||||
int i = 0;
|
|
||||||
for (Entry<String, ?> e : prefValues.entrySet()) {
|
|
||||||
entries[i] = e.getKey();
|
|
||||||
entryValues[i] = e.getValue() + ""; // case of null
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
listPref.setEntries(entries);
|
|
||||||
listPref.setEntryValues(entryValues);
|
|
||||||
listPref.setValue(p.get() + "");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (OsmandPreference<String> s : editTextPreferences.values()) {
|
|
||||||
EditTextPreference pref = (EditTextPreference) screenPreferences.get(s.getId());
|
|
||||||
pref.setText(s.get());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
|
||||||
// handle boolean preferences
|
|
||||||
OsmandPreference<Boolean> boolPref = booleanPreferences.get(preference.getKey());
|
|
||||||
OsmandPreference<Object> listPref = (OsmandPreference<Object>) listPreferences.get(preference.getKey());
|
|
||||||
OsmandPreference<String> editPref = editTextPreferences.get(preference.getKey());
|
|
||||||
if (boolPref != null) {
|
|
||||||
boolPref.set((Boolean) newValue);
|
|
||||||
} else if (editPref != null) {
|
|
||||||
editPref.set((String) newValue);
|
|
||||||
} else if (listPref != null) {
|
|
||||||
int ind = ((ListPreference) preference).findIndexOfValue((String) newValue);
|
|
||||||
CharSequence entry = ((ListPreference) preference).getEntries()[ind];
|
|
||||||
Map<String, ?> map = listPrefValues.get(preference.getKey());
|
|
||||||
Object obj = map.get(entry);
|
|
||||||
boolean changed ;
|
|
||||||
if(obj instanceof OsmandPreference) {
|
|
||||||
changed = true;
|
|
||||||
((OsmandPreference<Boolean>) obj).set(false);
|
|
||||||
} else {
|
|
||||||
changed = listPref.set(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
return changed;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Map<String, Map<String, ?>> getListPrefValues() {
|
|
||||||
return listPrefValues;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected OsmandApplication getMyApplication() {
|
|
||||||
return (OsmandApplication) getApplication();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void showWarnings(final OsmandApplication app, List<String> warnings) {
|
|
||||||
if (!warnings.isEmpty()) {
|
|
||||||
final StringBuilder b = AndroidUtils.formatWarnings(warnings);
|
|
||||||
app.runInUIThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Toast.makeText(app, b.toString(), Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void showBooleanSettings(String[] vals, final OsmandPreference<Boolean>[] prefs) {
|
|
||||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
|
||||||
boolean[] checkedItems = new boolean[prefs.length];
|
|
||||||
for (int i = 0; i < prefs.length; i++) {
|
|
||||||
checkedItems[i] = prefs[i].get();
|
|
||||||
}
|
|
||||||
bld.setMultiChoiceItems(vals, checkedItems, new OnMultiChoiceClickListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which, boolean isChecked) {
|
|
||||||
prefs[which].set(isChecked);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
bld.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,720 +0,0 @@
|
||||||
package net.osmand.plus.activities;
|
|
||||||
|
|
||||||
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.pm.ActivityInfo;
|
|
||||||
import android.content.pm.PackageManager;
|
|
||||||
import android.content.res.Configuration;
|
|
||||||
import android.os.AsyncTask;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.preference.CheckBoxPreference;
|
|
||||||
import android.preference.EditTextPreference;
|
|
||||||
import android.preference.ListPreference;
|
|
||||||
import android.preference.Preference;
|
|
||||||
import android.preference.Preference.OnPreferenceChangeListener;
|
|
||||||
import android.preference.Preference.OnPreferenceClickListener;
|
|
||||||
import android.preference.PreferenceGroup;
|
|
||||||
import android.preference.PreferenceScreen;
|
|
||||||
import android.util.Pair;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
import androidx.appcompat.widget.AppCompatCheckedTextView;
|
|
||||||
import androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback;
|
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
|
||||||
import net.osmand.IProgress;
|
|
||||||
import net.osmand.IndexConstants;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.osm.io.NetworkUtils;
|
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
|
||||||
import net.osmand.plus.helpers.enums.AngularConstants;
|
|
||||||
import net.osmand.plus.helpers.enums.DrivingRegion;
|
|
||||||
import net.osmand.plus.helpers.enums.MetricsConstants;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.Version;
|
|
||||||
import net.osmand.plus.base.MapViewTrackingUtilities;
|
|
||||||
import net.osmand.plus.dashboard.DashChooseAppDirFragment;
|
|
||||||
import net.osmand.plus.dashboard.DashChooseAppDirFragment.ChooseAppDirFragment;
|
|
||||||
import net.osmand.plus.dashboard.DashChooseAppDirFragment.MoveFilesToDifferentDirectory;
|
|
||||||
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
|
||||||
import net.osmand.plus.render.NativeOsmandLibrary;
|
|
||||||
import net.osmand.render.RenderingRulesStorage;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
public class SettingsGeneralActivity extends SettingsBaseActivity implements OnRequestPermissionsResultCallback {
|
|
||||||
|
|
||||||
public static final String IP_ADDRESS_PATTERN =
|
|
||||||
"^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
|
|
||||||
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
|
|
||||||
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
|
|
||||||
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])$";
|
|
||||||
|
|
||||||
private Preference applicationDir;
|
|
||||||
private ListPreference applicationModePreference;
|
|
||||||
private Preference drivingRegionPreference;
|
|
||||||
private ChooseAppDirFragment chooseAppDirFragment;
|
|
||||||
private boolean permissionRequested;
|
|
||||||
private boolean permissionGranted;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
((OsmandApplication) getApplication()).applyTheme(this);
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
getToolbar().setTitle(R.string.global_app_settings);
|
|
||||||
addPreferencesFromResource(R.xml.general_settings);
|
|
||||||
String[] entries;
|
|
||||||
String[] entrieValues;
|
|
||||||
PreferenceScreen screen = getPreferenceScreen();
|
|
||||||
OsmandApplication app = getMyApplication();
|
|
||||||
settings = app.getSettings();
|
|
||||||
|
|
||||||
ApplicationMode[] appModes = ApplicationMode.values(app).toArray(new ApplicationMode[0]);
|
|
||||||
entries = new String[appModes.length];
|
|
||||||
for (int i = 0; i < entries.length; i++) {
|
|
||||||
entries[i] = appModes[i].toHumanString();
|
|
||||||
}
|
|
||||||
registerListPreference(settings.DEFAULT_APPLICATION_MODE, screen, entries, appModes);
|
|
||||||
|
|
||||||
// List preferences
|
|
||||||
registerListPreference(settings.ROTATE_MAP, screen,
|
|
||||||
new String[]{getString(R.string.rotate_map_none_opt), getString(R.string.rotate_map_bearing_opt), getString(R.string.rotate_map_compass_opt)},
|
|
||||||
new Integer[]{OsmandSettings.ROTATE_MAP_NONE, OsmandSettings.ROTATE_MAP_BEARING, OsmandSettings.ROTATE_MAP_COMPASS});
|
|
||||||
|
|
||||||
registerListPreference(settings.MAP_SCREEN_ORIENTATION, screen,
|
|
||||||
new String[]{getString(R.string.map_orientation_portrait), getString(R.string.map_orientation_landscape), getString(R.string.map_orientation_default)},
|
|
||||||
new Integer[]{ActivityInfo.SCREEN_ORIENTATION_PORTRAIT, ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED});
|
|
||||||
|
|
||||||
drivingRegionPreference = screen.findPreference(settings.DRIVING_REGION.getId());
|
|
||||||
|
|
||||||
addLocalPrefs((PreferenceGroup) screen.findPreference("localization"));
|
|
||||||
addProxyPrefs((PreferenceGroup) screen.findPreference("proxy"));
|
|
||||||
addMiscPreferences((PreferenceGroup) screen.findPreference("misc"));
|
|
||||||
|
|
||||||
applicationModePreference = (ListPreference) screen.findPreference(settings.DEFAULT_APPLICATION_MODE.getId());
|
|
||||||
applicationModePreference.setOnPreferenceChangeListener(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addLocalPrefs(PreferenceGroup screen) {
|
|
||||||
drivingRegionPreference.setTitle(R.string.driving_region);
|
|
||||||
drivingRegionPreference.setSummary(R.string.driving_region_descr);
|
|
||||||
drivingRegionPreference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
final AlertDialog.Builder b = new AlertDialog.Builder(SettingsGeneralActivity.this);
|
|
||||||
|
|
||||||
b.setTitle(getString(R.string.driving_region));
|
|
||||||
|
|
||||||
final List<DrivingRegion> drs = new ArrayList<>();
|
|
||||||
drs.add(null);
|
|
||||||
drs.addAll(Arrays.asList(DrivingRegion.values()));
|
|
||||||
int sel = -1;
|
|
||||||
DrivingRegion selectedDrivingRegion = settings.DRIVING_REGION.get();
|
|
||||||
if (settings.DRIVING_REGION_AUTOMATIC.get()) {
|
|
||||||
sel = 0;
|
|
||||||
}
|
|
||||||
for (int i = 1; i < drs.size(); i++) {
|
|
||||||
if (sel == -1 && drs.get(i) == selectedDrivingRegion) {
|
|
||||||
sel = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final int selected = sel;
|
|
||||||
final ArrayAdapter<DrivingRegion> singleChoiceAdapter =
|
|
||||||
new ArrayAdapter<DrivingRegion>(SettingsGeneralActivity.this, R.layout.single_choice_description_item, R.id.text1, drs) {
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public View getView(int position, View convertView, @NonNull ViewGroup parent) {
|
|
||||||
View v = convertView;
|
|
||||||
if (v == null) {
|
|
||||||
LayoutInflater inflater = SettingsGeneralActivity.this.getLayoutInflater();
|
|
||||||
v = inflater.inflate(R.layout.single_choice_description_item, parent, false);
|
|
||||||
}
|
|
||||||
DrivingRegion item = getItem(position);
|
|
||||||
AppCompatCheckedTextView title = (AppCompatCheckedTextView) v.findViewById(R.id.text1);
|
|
||||||
TextView desc = (TextView) v.findViewById(R.id.description);
|
|
||||||
if (item != null) {
|
|
||||||
title.setText(getString(item.name));
|
|
||||||
desc.setVisibility(View.VISIBLE);
|
|
||||||
desc.setText(item.getDescription(v.getContext()));
|
|
||||||
} else {
|
|
||||||
title.setText(getString(R.string.driving_region_automatic));
|
|
||||||
desc.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
title.setChecked(position == selected);
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
b.setAdapter(singleChoiceAdapter, new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
if (drs.get(which) == null) {
|
|
||||||
settings.DRIVING_REGION_AUTOMATIC.set(true);
|
|
||||||
MapViewTrackingUtilities mapViewTrackingUtilities = getMyApplication().getMapViewTrackingUtilities();
|
|
||||||
if (mapViewTrackingUtilities != null) {
|
|
||||||
mapViewTrackingUtilities.resetDrivingRegionUpdate();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
settings.DRIVING_REGION_AUTOMATIC.set(false);
|
|
||||||
settings.DRIVING_REGION.set(drs.get(which));
|
|
||||||
}
|
|
||||||
updateAllSettings();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
b.setNegativeButton(R.string.shared_string_cancel, null);
|
|
||||||
b.show();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
String[] entries;
|
|
||||||
String[] entrieValues;
|
|
||||||
|
|
||||||
MetricsConstants[] mvls = MetricsConstants.values();
|
|
||||||
entries = new String[mvls.length];
|
|
||||||
for (int i = 0; i < entries.length; i++) {
|
|
||||||
entries[i] = mvls[i].toHumanString(getMyApplication());
|
|
||||||
}
|
|
||||||
registerListPreference(settings.METRIC_SYSTEM, screen, entries, mvls);
|
|
||||||
|
|
||||||
Integer[] cvls = new Integer[5];
|
|
||||||
cvls[0] = PointDescription.FORMAT_DEGREES;
|
|
||||||
cvls[1] = PointDescription.FORMAT_MINUTES;
|
|
||||||
cvls[2] = PointDescription.FORMAT_SECONDS;
|
|
||||||
cvls[3] = PointDescription.UTM_FORMAT;
|
|
||||||
cvls[4] = PointDescription.OLC_FORMAT;
|
|
||||||
entries = new String[5];
|
|
||||||
entries[0] = PointDescription.formatToHumanString(this, PointDescription.FORMAT_DEGREES);
|
|
||||||
entries[1] = PointDescription.formatToHumanString(this, PointDescription.FORMAT_MINUTES);
|
|
||||||
entries[2] = PointDescription.formatToHumanString(this, PointDescription.FORMAT_SECONDS);
|
|
||||||
entries[3] = PointDescription.formatToHumanString(this, PointDescription.UTM_FORMAT);
|
|
||||||
entries[4] = PointDescription.formatToHumanString(this, PointDescription.OLC_FORMAT);
|
|
||||||
registerListPreference(settings.COORDINATES_FORMAT, screen, entries, cvls);
|
|
||||||
|
|
||||||
AngularConstants[] ac = AngularConstants.values();
|
|
||||||
entries = new String[ac.length];
|
|
||||||
for (int i = 0; i < entries.length; i++) {
|
|
||||||
if (ac[i] == AngularConstants.DEGREES) {
|
|
||||||
entries[i] = AngularConstants.DEGREES.toHumanString(getMyApplication()) + " 180";
|
|
||||||
} else if (ac [i] == AngularConstants.DEGREES360) {
|
|
||||||
entries[i] = AngularConstants.DEGREES.toHumanString(getMyApplication()) + " 360";
|
|
||||||
} else {
|
|
||||||
entries[i] = ac[i].toHumanString(getMyApplication());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
registerListPreference(settings.ANGULAR_UNITS, screen, entries, ac);
|
|
||||||
|
|
||||||
Pair<String[], String[]> preferredLocaleInfo = getPreferredLocaleIdsAndValues(this);
|
|
||||||
if (preferredLocaleInfo != null) {
|
|
||||||
registerListPreference(settings.PREFERRED_LOCALE, screen, preferredLocaleInfo.first, preferredLocaleInfo.second);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add " (Display language)" to menu title in Latin letters for all non-en languages
|
|
||||||
if (!getResources().getString(R.string.preferred_locale).equals(getResources().getString(R.string.preferred_locale_no_translate))) {
|
|
||||||
((ListPreference) screen.findPreference(settings.PREFERRED_LOCALE.getId())).setTitle(getString(R.string.preferred_locale) + " (" + getString(R.string.preferred_locale_no_translate) + ")");
|
|
||||||
}
|
|
||||||
|
|
||||||
// This setting now only in "Confgure map" menu
|
|
||||||
//String[] values = ConfigureMapMenu.getMapNamesValues(this, ConfigureMapMenu.mapNamesIds);
|
|
||||||
//String[] ids = ConfigureMapMenu.getSortedMapNamesIds(this, ConfigureMapMenu.mapNamesIds, values);
|
|
||||||
//registerListPreference(settings.MAP_PREFERRED_LOCALE, screen, ConfigureMapMenu.getMapNamesValues(this, ids), ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Pair<String[], String[]> getPreferredLocaleIdsAndValues(Context ctx) {
|
|
||||||
// See language list and statistics at: https://hosted.weblate.org/projects/osmand/main/
|
|
||||||
// Hardy maintenance 2016-05-29:
|
|
||||||
// - Include languages if their translation is >= ~10% (but any language will be visible if it is the device's system locale)
|
|
||||||
// - Mark as "incomplete" if < ~80%
|
|
||||||
String incompleteSuffix = " (" + ctx.getString(R.string.incomplete_locale) + ")";
|
|
||||||
|
|
||||||
// Add " (Device language)" to system default entry in Latin letters, so it can be more easily identified if a foreign language has been selected by mistake
|
|
||||||
String latinSystemDefaultSuffix = " (" + ctx.getString(R.string.system_locale_no_translate) + ")";
|
|
||||||
|
|
||||||
//getResources().getAssets().getLocales();
|
|
||||||
String[] entryValues = new String[] {
|
|
||||||
"",
|
|
||||||
"en",
|
|
||||||
"af",
|
|
||||||
"ar",
|
|
||||||
"ast",
|
|
||||||
"az",
|
|
||||||
"be",
|
|
||||||
//"be_BY",
|
|
||||||
"bg",
|
|
||||||
"ca",
|
|
||||||
"cs",
|
|
||||||
"cy",
|
|
||||||
"da",
|
|
||||||
"de",
|
|
||||||
"el",
|
|
||||||
"en_GB",
|
|
||||||
"eo",
|
|
||||||
"es",
|
|
||||||
"es_AR",
|
|
||||||
"es_US",
|
|
||||||
"eu",
|
|
||||||
"fa",
|
|
||||||
"fi",
|
|
||||||
"fr",
|
|
||||||
"gl",
|
|
||||||
"iw",
|
|
||||||
"hr",
|
|
||||||
"hsb",
|
|
||||||
"hu",
|
|
||||||
"hy",
|
|
||||||
"is",
|
|
||||||
"it",
|
|
||||||
"ja",
|
|
||||||
"ka",
|
|
||||||
"kab",
|
|
||||||
"kn",
|
|
||||||
"ko",
|
|
||||||
"lt",
|
|
||||||
"lv",
|
|
||||||
"ml",
|
|
||||||
"mr",
|
|
||||||
"nb",
|
|
||||||
"nl",
|
|
||||||
"nn",
|
|
||||||
"oc",
|
|
||||||
"pl",
|
|
||||||
"pt",
|
|
||||||
"pt_BR",
|
|
||||||
"ro",
|
|
||||||
"ru",
|
|
||||||
"sc",
|
|
||||||
"sk",
|
|
||||||
"sl",
|
|
||||||
"sr",
|
|
||||||
"sr+Latn",
|
|
||||||
"sv",
|
|
||||||
"tr",
|
|
||||||
"uk",
|
|
||||||
"vi",
|
|
||||||
"zh_CN",
|
|
||||||
"zh_TW"};
|
|
||||||
|
|
||||||
String[] entries = new String[] {
|
|
||||||
ctx.getString(R.string.system_locale) + latinSystemDefaultSuffix,
|
|
||||||
ctx.getString(R.string.lang_en),
|
|
||||||
ctx.getString(R.string.lang_af) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_ar),
|
|
||||||
ctx.getString(R.string.lang_ast) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_az),
|
|
||||||
ctx.getString(R.string.lang_be),
|
|
||||||
// getString(R.string.lang_be_by),
|
|
||||||
ctx.getString(R.string.lang_bg),
|
|
||||||
ctx.getString(R.string.lang_ca),
|
|
||||||
ctx.getString(R.string.lang_cs),
|
|
||||||
ctx.getString(R.string.lang_cy) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_da),
|
|
||||||
ctx.getString(R.string.lang_de),
|
|
||||||
ctx.getString(R.string.lang_el),
|
|
||||||
ctx.getString(R.string.lang_en_gb),
|
|
||||||
ctx.getString(R.string.lang_eo),
|
|
||||||
ctx.getString(R.string.lang_es),
|
|
||||||
ctx.getString(R.string.lang_es_ar),
|
|
||||||
ctx.getString(R.string.lang_es_us),
|
|
||||||
ctx.getString(R.string.lang_eu),
|
|
||||||
ctx.getString(R.string.lang_fa),
|
|
||||||
ctx.getString(R.string.lang_fi) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_fr),
|
|
||||||
ctx.getString(R.string.lang_gl),
|
|
||||||
ctx.getString(R.string.lang_he),
|
|
||||||
ctx.getString(R.string.lang_hr) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_hsb) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_hu),
|
|
||||||
ctx.getString(R.string.lang_hy),
|
|
||||||
ctx.getString(R.string.lang_is),
|
|
||||||
ctx.getString(R.string.lang_it),
|
|
||||||
ctx.getString(R.string.lang_ja),
|
|
||||||
ctx.getString(R.string.lang_ka) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_kab) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_kn) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_ko),
|
|
||||||
ctx.getString(R.string.lang_lt),
|
|
||||||
ctx.getString(R.string.lang_lv),
|
|
||||||
ctx.getString(R.string.lang_ml),
|
|
||||||
ctx.getString(R.string.lang_mr) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_nb),
|
|
||||||
ctx.getString(R.string.lang_nl),
|
|
||||||
ctx.getString(R.string.lang_nn) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_oc) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_pl),
|
|
||||||
ctx.getString(R.string.lang_pt),
|
|
||||||
ctx.getString(R.string.lang_pt_br),
|
|
||||||
ctx.getString(R.string.lang_ro) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_ru),
|
|
||||||
ctx.getString(R.string.lang_sc),
|
|
||||||
ctx.getString(R.string.lang_sk),
|
|
||||||
ctx.getString(R.string.lang_sl),
|
|
||||||
ctx.getString(R.string.lang_sr),
|
|
||||||
ctx.getString(R.string.lang_sr_latn) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_sv),
|
|
||||||
ctx.getString(R.string.lang_tr),
|
|
||||||
ctx.getString(R.string.lang_uk),
|
|
||||||
ctx.getString(R.string.lang_vi) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_zh_cn) + incompleteSuffix,
|
|
||||||
ctx.getString(R.string.lang_zh_tw)};
|
|
||||||
|
|
||||||
String[] valuesPl = ConfigureMapMenu.getSortedMapNamesIds(ctx, entries, entries);
|
|
||||||
String[] idsPl = ConfigureMapMenu.getSortedMapNamesIds(ctx, entryValues, entries);
|
|
||||||
|
|
||||||
return Pair.create(valuesPl, idsPl);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void enableProxy(boolean enable) {
|
|
||||||
settings.ENABLE_PROXY.set(enable);
|
|
||||||
if (enable) {
|
|
||||||
NetworkUtils.setProxy(settings.PROXY_HOST.get(), settings.PROXY_PORT.get());
|
|
||||||
} else {
|
|
||||||
NetworkUtils.setProxy(null, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addProxyPrefs(PreferenceGroup proxy) {
|
|
||||||
CheckBoxPreference enableProxyPref = (CheckBoxPreference) proxy.findPreference(settings.ENABLE_PROXY.getId());
|
|
||||||
enableProxyPref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
|
||||||
enableProxy((Boolean) newValue);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
EditTextPreference hostPref = (EditTextPreference) proxy.findPreference(settings.PROXY_HOST.getId());
|
|
||||||
hostPref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
|
||||||
String ipAddress = (String) newValue;
|
|
||||||
if (ipAddress.matches(IP_ADDRESS_PATTERN)) {
|
|
||||||
settings.PROXY_HOST.set(ipAddress);
|
|
||||||
enableProxy(NetworkUtils.getProxy() != null);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
Toast.makeText(SettingsGeneralActivity.this, getString(R.string.wrong_format), Toast.LENGTH_SHORT).show();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
EditTextPreference portPref = (EditTextPreference) proxy.findPreference(settings.PROXY_PORT.getId());
|
|
||||||
portPref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
|
||||||
int port = -1;
|
|
||||||
String portString = (String) newValue;
|
|
||||||
try {
|
|
||||||
port = Integer.valueOf(portString.replaceAll("[^0-9]", ""));
|
|
||||||
} catch (NumberFormatException e1) {
|
|
||||||
}
|
|
||||||
settings.PROXY_PORT.set(port);
|
|
||||||
enableProxy(NetworkUtils.getProxy() != null);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void showAppDirDialog() {
|
|
||||||
if (Build.VERSION.SDK_INT >= 19) {
|
|
||||||
showAppDirDialogV19();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
AlertDialog.Builder editalert = new AlertDialog.Builder(SettingsGeneralActivity.this);
|
|
||||||
editalert.setTitle(R.string.application_dir);
|
|
||||||
final EditText input = new EditText(SettingsGeneralActivity.this);
|
|
||||||
input.setText(settings.getExternalStorageDirectory().getAbsolutePath());
|
|
||||||
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
|
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT);
|
|
||||||
lp.leftMargin = lp.rightMargin = 5;
|
|
||||||
lp.bottomMargin = lp.topMargin = 5;
|
|
||||||
input.setLayoutParams(lp);
|
|
||||||
settings.getExternalStorageDirectory().getAbsolutePath();
|
|
||||||
editalert.setView(input);
|
|
||||||
editalert.setNegativeButton(R.string.shared_string_cancel, null);
|
|
||||||
editalert.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
|
||||||
warnAboutChangingStorage(input.getText().toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
editalert.show();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showAppDirDialogV19() {
|
|
||||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
|
||||||
chooseAppDirFragment = new DashChooseAppDirFragment.ChooseAppDirFragment(this, (Dialog) null) {
|
|
||||||
@Override
|
|
||||||
protected void successCallback() {
|
|
||||||
updateApplicationDirTextAndSummary();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
if (permissionRequested && !permissionGranted) {
|
|
||||||
chooseAppDirFragment.setPermissionDenied();
|
|
||||||
}
|
|
||||||
bld.setView(chooseAppDirFragment.initView(getLayoutInflater(), null, null));
|
|
||||||
AlertDialog dlg = bld.show();
|
|
||||||
chooseAppDirFragment.setDialog(dlg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void addMiscPreferences(PreferenceGroup misc) {
|
|
||||||
if (!Version.isBlackberry(getMyApplication())) {
|
|
||||||
applicationDir = new Preference(this);
|
|
||||||
applicationDir.setTitle(R.string.application_dir);
|
|
||||||
applicationDir.setKey(OsmandSettings.EXTERNAL_STORAGE_DIR);
|
|
||||||
applicationDir.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
showAppDirDialog();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
misc.addPreference(applicationDir);
|
|
||||||
CheckBoxPreference nativeCheckbox = createCheckBoxPreference(settings.SAFE_MODE, R.string.safe_mode,
|
|
||||||
R.string.safe_mode_description);
|
|
||||||
// disable the checkbox if the library cannot be used
|
|
||||||
if ((NativeOsmandLibrary.isLoaded() && !NativeOsmandLibrary.isSupported()) || settings.NATIVE_RENDERING_FAILED.get()) {
|
|
||||||
nativeCheckbox.setEnabled(false);
|
|
||||||
nativeCheckbox.setChecked(true);
|
|
||||||
}
|
|
||||||
misc.addPreference(nativeCheckbox);
|
|
||||||
|
|
||||||
int nav = getResources().getConfiguration().navigation;
|
|
||||||
if (nav == Configuration.NAVIGATION_DPAD || nav == Configuration.NAVIGATION_TRACKBALL ||
|
|
||||||
nav == Configuration.NAVIGATION_WHEEL ||
|
|
||||||
nav == Configuration.NAVIGATION_UNDEFINED) {
|
|
||||||
misc.addPreference(createCheckBoxPreference(settings.USE_TRACKBALL_FOR_MOVEMENTS, R.string.use_trackball,
|
|
||||||
R.string.use_trackball_descr));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
registerListPreference(
|
|
||||||
settings.OSMAND_THEME, misc,
|
|
||||||
new String[]{getString(R.string.dark_theme), getString(R.string.light_theme)}, new Integer[]{OsmandSettings.OSMAND_DARK_THEME,
|
|
||||||
OsmandSettings.OSMAND_LIGHT_THEME});
|
|
||||||
|
|
||||||
registerListPreference(
|
|
||||||
settings.EXTERNAL_INPUT_DEVICE, misc,
|
|
||||||
new String[]{getString(R.string.sett_no_ext_input), getString(R.string.sett_generic_ext_input), getString(R.string.sett_wunderlinq_ext_input), getString(R.string.sett_parrot_ext_input)}, new Integer[]{OsmandSettings.NO_EXTERNAL_DEVICE,
|
|
||||||
OsmandSettings.GENERIC_EXTERNAL_DEVICE, OsmandSettings.WUNDERLINQ_EXTERNAL_DEVICE, OsmandSettings.PARROT_EXTERNAL_DEVICE});
|
|
||||||
|
|
||||||
misc.addPreference(createCheckBoxPreference(settings.MAP_EMPTY_STATE_ALLOWED, R.string.tap_on_map_to_hide_interface, R.string.tap_on_map_to_hide_interface_descr));
|
|
||||||
misc.addPreference(createCheckBoxPreference(settings.USE_KALMAN_FILTER_FOR_COMPASS, R.string.use_kalman_filter_compass, R.string.use_kalman_filter_compass_descr));
|
|
||||||
misc.addPreference(createCheckBoxPreference(settings.USE_MAGNETIC_FIELD_SENSOR_COMPASS, R.string.use_magnetic_sensor, R.string.use_magnetic_sensor_descr));
|
|
||||||
misc.addPreference(createCheckBoxPreference(settings.ANIMATE_MY_LOCATION,R.string.animate_my_location, R.string.animate_my_location_desc));
|
|
||||||
misc.addPreference(createCheckBoxPreference(settings.DO_NOT_USE_ANIMATIONS, R.string.do_not_use_animations, R.string.do_not_use_animations_descr));
|
|
||||||
misc.addPreference(createCheckBoxPreference(settings.DO_NOT_SHOW_STARTUP_MESSAGES, R.string.do_not_show_startup_messages, R.string.do_not_show_startup_messages_desc));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void updateApplicationDirTextAndSummary() {
|
|
||||||
if (applicationDir != null) {
|
|
||||||
String storageDir = settings.getExternalStorageDirectory().getAbsolutePath();
|
|
||||||
applicationDir.setSummary(storageDir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateAllSettings() {
|
|
||||||
super.updateAllSettings();
|
|
||||||
updateApplicationDirTextAndSummary();
|
|
||||||
applicationModePreference.setTitle(getString(R.string.settings_preset) + " ["
|
|
||||||
+ settings.APPLICATION_MODE.get().toHumanString() + "]");
|
|
||||||
drivingRegionPreference.setTitle(getString(R.string.driving_region) + " ["
|
|
||||||
+ getString(settings.DRIVING_REGION_AUTOMATIC.get() ? R.string.driving_region_automatic : settings.DRIVING_REGION.get().name) + "]");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
|
||||||
String id = preference.getKey();
|
|
||||||
super.onPreferenceChange(preference, newValue);
|
|
||||||
if (id.equals(settings.SAFE_MODE.getId())) {
|
|
||||||
if ((Boolean) newValue) {
|
|
||||||
loadNativeLibrary();
|
|
||||||
}
|
|
||||||
} else if (preference == applicationDir) {
|
|
||||||
return false;
|
|
||||||
} else if (id.equals(settings.DEFAULT_APPLICATION_MODE.getId())) {
|
|
||||||
settings.APPLICATION_MODE.set(settings.DEFAULT_APPLICATION_MODE.get());
|
|
||||||
updateAllSettings();
|
|
||||||
} else if (id.equals(settings.PREFERRED_LOCALE.getId())) {
|
|
||||||
// restart application to update locale
|
|
||||||
getMyApplication().checkPreferredLocale();
|
|
||||||
getMyApplication().restartApp(this);
|
|
||||||
} else if (id.equals(settings.OSMAND_THEME.getId())) {
|
|
||||||
getMyApplication().restartApp(this);
|
|
||||||
} else if (id.equals(settings.DO_NOT_USE_ANIMATIONS.getId())) {
|
|
||||||
getMyApplication().restartApp(this);
|
|
||||||
} else {
|
|
||||||
updateAllSettings();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void warnAboutChangingStorage(final String newValue) {
|
|
||||||
String newDir = newValue != null ? newValue.trim() : newValue;
|
|
||||||
if (!newDir.replace('/', ' ').trim().
|
|
||||||
toLowerCase().endsWith(IndexConstants.APP_DIR.replace('/', ' ').trim())) {
|
|
||||||
newDir += "/" + IndexConstants.APP_DIR;
|
|
||||||
}
|
|
||||||
final File path = new File(newDir);
|
|
||||||
path.mkdirs();
|
|
||||||
if (!path.canRead() || !path.exists()) {
|
|
||||||
Toast.makeText(this, R.string.specified_dir_doesnt_exist, Toast.LENGTH_LONG).show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
|
||||||
builder.setMessage(getString(R.string.application_dir_change_warning3));
|
|
||||||
builder.setPositiveButton(R.string.shared_string_yes, new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
MoveFilesToDifferentDirectory task =
|
|
||||||
new MoveFilesToDifferentDirectory(SettingsGeneralActivity.this,
|
|
||||||
settings.getExternalStorageDirectory(), path);
|
|
||||||
task.setRunOnSuccess(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
updateSettingsToNewDir(path.getParentFile().getAbsolutePath());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
builder.setNeutralButton(R.string.shared_string_no, new OnClickListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
updateSettingsToNewDir(path.getParentFile().getAbsolutePath());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
|
||||||
builder.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateSettingsToNewDir(final String newDir) {
|
|
||||||
// edit the preference
|
|
||||||
settings.setExternalStorageDirectoryPre19(newDir);
|
|
||||||
getMyApplication().getResourceManager().resetStoreDirectory();
|
|
||||||
reloadIndexes();
|
|
||||||
updateApplicationDirTextAndSummary();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void reloadIndexes() {
|
|
||||||
setProgressVisibility(true);
|
|
||||||
final CharSequence oldTitle = getToolbar().getTitle();
|
|
||||||
getToolbar().setTitle(getString(R.string.loading_data));
|
|
||||||
getToolbar().setSubtitle(getString(R.string.reading_indexes));
|
|
||||||
new AsyncTask<Void, Void, List<String>>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected List<String> doInBackground(Void... params) {
|
|
||||||
return getMyApplication().getResourceManager().reloadIndexes(IProgress.EMPTY_PROGRESS,
|
|
||||||
new ArrayList<String>());
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void onPostExecute(List<String> result) {
|
|
||||||
showWarnings(result);
|
|
||||||
getToolbar().setTitle(oldTitle);
|
|
||||||
getToolbar().setSubtitle("");
|
|
||||||
setProgressVisibility(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void loadNativeLibrary() {
|
|
||||||
if (!NativeOsmandLibrary.isLoaded()) {
|
|
||||||
final RenderingRulesStorage storage = getMyApplication().getRendererRegistry().getCurrentSelectedRenderer();
|
|
||||||
new AsyncTask<Void, Void, Void>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPreExecute() {
|
|
||||||
setProgressVisibility(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Void doInBackground(Void... params) {
|
|
||||||
NativeOsmandLibrary.getLibrary(storage, getMyApplication());
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPostExecute(Void result) {
|
|
||||||
setProgressVisibility(false);
|
|
||||||
if (!NativeOsmandLibrary.isNativeSupported(storage, getMyApplication())) {
|
|
||||||
Toast.makeText(SettingsGeneralActivity.this, R.string.native_library_not_supported, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
protected void showWarnings(List<String> warnings) {
|
|
||||||
if (!warnings.isEmpty()) {
|
|
||||||
final StringBuilder b = AndroidUtils.formatWarnings(warnings);
|
|
||||||
runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Toast.makeText(SettingsGeneralActivity.this, b.toString(), Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
if (permissionRequested) {
|
|
||||||
showAppDirDialogV19();
|
|
||||||
permissionRequested = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onRequestPermissionsResult(int requestCode,
|
|
||||||
String permissions[], int[] grantResults) {
|
|
||||||
permissionRequested = requestCode == DownloadActivity.PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE;
|
|
||||||
if (permissionRequested
|
|
||||||
&& grantResults.length > 0
|
|
||||||
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
|
||||||
permissionGranted = true;
|
|
||||||
} else {
|
|
||||||
permissionGranted = false;
|
|
||||||
Toast.makeText(this,
|
|
||||||
R.string.missing_write_external_storage_permission,
|
|
||||||
Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,915 +0,0 @@
|
||||||
package net.osmand.plus.activities;
|
|
||||||
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.media.AudioAttributes;
|
|
||||||
import android.media.AudioManager;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.preference.CheckBoxPreference;
|
|
||||||
import android.preference.ListPreference;
|
|
||||||
import android.preference.Preference;
|
|
||||||
import android.preference.PreferenceCategory;
|
|
||||||
import android.preference.PreferenceGroup;
|
|
||||||
import android.preference.PreferenceScreen;
|
|
||||||
import android.util.TypedValue;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
|
|
||||||
import com.google.android.material.slider.Slider;
|
|
||||||
|
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
|
||||||
import net.osmand.plus.ContextMenuItem;
|
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.helpers.enums.MetricsConstants;
|
|
||||||
import net.osmand.plus.settings.backend.CommonPreference;
|
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
|
||||||
import net.osmand.plus.helpers.enums.AutoZoomMap;
|
|
||||||
import net.osmand.plus.settings.backend.OsmandPreference;
|
|
||||||
import net.osmand.plus.helpers.enums.SpeedConstants;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.UiUtilities;
|
|
||||||
import net.osmand.plus.Version;
|
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
|
||||||
import net.osmand.plus.download.DownloadActivityType;
|
|
||||||
import net.osmand.plus.helpers.FileNameTranslationHelper;
|
|
||||||
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper;
|
|
||||||
import net.osmand.plus.routing.RouteProvider.RouteService;
|
|
||||||
import net.osmand.plus.routing.RoutingHelper;
|
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
|
||||||
import net.osmand.plus.voice.CommandPlayer;
|
|
||||||
import net.osmand.router.GeneralRouter;
|
|
||||||
import net.osmand.router.GeneralRouter.GeneralRouterProfile;
|
|
||||||
import net.osmand.router.GeneralRouter.RoutingParameter;
|
|
||||||
import net.osmand.router.GeneralRouter.RoutingParameterType;
|
|
||||||
import net.osmand.util.Algorithms;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class SettingsNavigationActivity extends SettingsBaseActivity {
|
|
||||||
public static final String MORE_VALUE = "MORE_VALUE";
|
|
||||||
|
|
||||||
private Preference avoidRouting;
|
|
||||||
private Preference preferRouting;
|
|
||||||
private Preference reliefFactorRouting;
|
|
||||||
private Preference autoZoom;
|
|
||||||
private Preference showAlarms;
|
|
||||||
private Preference speakAlarms;
|
|
||||||
private Preference defaultSpeed;
|
|
||||||
private Preference defaultSpeedOnly;
|
|
||||||
private ListPreference routerServicePreference;
|
|
||||||
private ListPreference speedLimitExceed;
|
|
||||||
|
|
||||||
private List<RoutingParameter> avoidParameters = new ArrayList<RoutingParameter>();
|
|
||||||
private List<RoutingParameter> preferParameters = new ArrayList<RoutingParameter>();
|
|
||||||
private List<RoutingParameter> reliefFactorParameters = new ArrayList<RoutingParameter>();
|
|
||||||
public static final String INTENT_SKIP_DIALOG = "INTENT_SKIP_DIALOG";
|
|
||||||
|
|
||||||
public SettingsNavigationActivity() {
|
|
||||||
super(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
((OsmandApplication) getApplication()).applyTheme(this);
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
settings = getMyApplication().getSettings();
|
|
||||||
if (!settings.hasAvailableApplicationMode()) {
|
|
||||||
Toast.makeText(this, R.string.turn_on_profile_desc, Toast.LENGTH_SHORT).show();
|
|
||||||
finish();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getToolbar().setTitle(R.string.routing_settings);
|
|
||||||
createUI();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
if(getIntent() != null && getIntent().hasExtra(INTENT_SKIP_DIALOG)) {
|
|
||||||
setSelectedAppMode(settings.getApplicationMode());
|
|
||||||
} else if (selectedAppMode == null) {
|
|
||||||
selectAppModeDialog().show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createUI() {
|
|
||||||
addPreferencesFromResource(R.xml.navigation_settings);
|
|
||||||
PreferenceScreen screen = getPreferenceScreen();
|
|
||||||
RouteService[] vls = RouteService.getAvailableRouters(getMyApplication());
|
|
||||||
String[] entries = new String[vls.length];
|
|
||||||
for (int i = 0; i < entries.length; i++) {
|
|
||||||
entries[i] = vls[i].getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
registerBooleanPreference(settings.SNAP_TO_ROAD, screen);
|
|
||||||
|
|
||||||
Integer[] intValues = new Integer[] { 0, 5, 10, 15, 20, 25, 30, 45, 60, 90};
|
|
||||||
entries = new String[intValues.length];
|
|
||||||
entries[0] = getString(R.string.shared_string_never);
|
|
||||||
for (int i = 1; i < intValues.length; i++) {
|
|
||||||
entries[i] = (int) intValues[i] + " " + getString(R.string.int_seconds);
|
|
||||||
}
|
|
||||||
registerListPreference(settings.AUTO_FOLLOW_ROUTE, screen, entries, intValues);
|
|
||||||
|
|
||||||
autoZoom = screen.findPreference("auto_zoom_map_on_off");
|
|
||||||
autoZoom.setOnPreferenceClickListener(this);
|
|
||||||
|
|
||||||
//keep informing option:
|
|
||||||
Integer[] keepInformingValues = new Integer[]{0, 1, 2, 3, 5, 7, 10, 15, 20, 25, 30};
|
|
||||||
String[] keepInformingNames = new String[keepInformingValues.length];
|
|
||||||
keepInformingNames[0] = getString(R.string.keep_informing_never);
|
|
||||||
for (int i = 1; i < keepInformingValues.length; i++)
|
|
||||||
{
|
|
||||||
keepInformingNames[i] = keepInformingValues[i] + " " + getString(R.string.int_min);
|
|
||||||
}
|
|
||||||
registerListPreference(settings.KEEP_INFORMING, screen, keepInformingNames, keepInformingValues);
|
|
||||||
|
|
||||||
SpeedConstants[] speedValues = SpeedConstants.values();
|
|
||||||
String[] speedNamesVls = new String[speedValues.length];
|
|
||||||
for(int i = 0; i < speedValues.length; i++) {
|
|
||||||
speedNamesVls[i] = speedValues[i].toHumanString(this);
|
|
||||||
};
|
|
||||||
registerListPreference(settings.SPEED_SYSTEM, screen, speedNamesVls, speedValues);
|
|
||||||
|
|
||||||
// registerBooleanPreference(settings.SHOW_ZOOM_BUTTONS_NAVIGATION, screen);
|
|
||||||
|
|
||||||
showAlarms = (Preference) screen.findPreference("show_routing_alarms");
|
|
||||||
showAlarms.setOnPreferenceClickListener(this);
|
|
||||||
|
|
||||||
speakAlarms = (Preference) screen.findPreference("speak_routing_alarms");
|
|
||||||
speakAlarms.setOnPreferenceClickListener(this);
|
|
||||||
|
|
||||||
Float[] arrivalValues = new Float[] {1.5f, 1f, 0.5f, 0.25f} ;
|
|
||||||
String[] arrivalNames = new String[] {
|
|
||||||
getString(R.string.arrival_distance_factor_early),
|
|
||||||
getString(R.string.arrival_distance_factor_normally),
|
|
||||||
getString(R.string.arrival_distance_factor_late),
|
|
||||||
getString(R.string.arrival_distance_factor_at_last)
|
|
||||||
};
|
|
||||||
registerListPreference(settings.ARRIVAL_DISTANCE_FACTOR, screen, arrivalNames, arrivalValues);
|
|
||||||
|
|
||||||
|
|
||||||
//array size must be equal!
|
|
||||||
Float[] speedLimitsKmh = new Float[]{-10f, -7f, -5f, 0f, 5f, 7f, 10f, 15f, 20f};
|
|
||||||
Float[] speedLimitsMph = new Float[]{-7f, -5f, -3f, 0f, 3f, 5f, 7f, 10f, 15f};
|
|
||||||
//array size must be equal!
|
|
||||||
Float[] speedLimitsKmhPos = new Float[]{0f, 5f, 7f, 10f, 15f, 20f};
|
|
||||||
Float[] speedLimitsMphPos = new Float[]{0f, 3f, 5f, 7f, 10f, 15f};
|
|
||||||
if (settings.METRIC_SYSTEM.get() == MetricsConstants.KILOMETERS_AND_METERS) {
|
|
||||||
String[] speedNames = new String[speedLimitsKmh.length];
|
|
||||||
String[] speedNamesPos = new String[speedLimitsKmhPos.length];
|
|
||||||
for (int i = 0; i < speedLimitsKmh.length; i++) {
|
|
||||||
speedNames[i] = speedLimitsKmh[i].intValue() + " " + getString(R.string.km_h);
|
|
||||||
}
|
|
||||||
for (int i = 0; i < speedLimitsKmhPos.length; i++) {
|
|
||||||
speedNamesPos[i] = speedLimitsKmhPos[i].intValue() + " " + getString(R.string.km_h);
|
|
||||||
}
|
|
||||||
registerListPreference(settings.SPEED_LIMIT_EXCEED_KMH, screen, speedNames, speedLimitsKmh);
|
|
||||||
registerListPreference(settings.SWITCH_MAP_DIRECTION_TO_COMPASS_KMH, screen, speedNamesPos, speedLimitsKmhPos);
|
|
||||||
} else {
|
|
||||||
String[] speedNames = new String[speedLimitsMph.length];
|
|
||||||
String[] speedNamesPos = new String[speedLimitsMphPos.length];
|
|
||||||
for (int i = 0; i < speedNames.length; i++) {
|
|
||||||
speedNames[i] = speedLimitsMph[i].intValue() + " " + getString(R.string.mile_per_hour);
|
|
||||||
}
|
|
||||||
for (int i = 0; i < speedNamesPos.length; i++) {
|
|
||||||
speedNamesPos[i] = speedLimitsMphPos[i].intValue() + " " + getString(R.string.mile_per_hour);
|
|
||||||
}
|
|
||||||
registerListPreference(settings.SPEED_LIMIT_EXCEED_KMH, screen, speedNames, speedLimitsKmh);
|
|
||||||
registerListPreference(settings.SWITCH_MAP_DIRECTION_TO_COMPASS_KMH, screen, speedNamesPos, speedLimitsKmhPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
PreferenceCategory category = (PreferenceCategory) screen.findPreference("guidance_preferences");
|
|
||||||
speedLimitExceed = (ListPreference) category.findPreference("speed_limit_exceed");
|
|
||||||
ApplicationMode mode = getMyApplication().getSettings().getApplicationMode();
|
|
||||||
if (!mode.isDerivedRoutingFrom(ApplicationMode.CAR)) {
|
|
||||||
category.removePreference(speedLimitExceed);
|
|
||||||
}
|
|
||||||
|
|
||||||
// deprecated 2.2
|
|
||||||
// Integer[] delayIntervals = new Integer[] { -1, 3, 5, 7, 10, 15, 20 };
|
|
||||||
// String[] delayIntervalNames = new String[delayIntervals.length];
|
|
||||||
// for (int i = 0; i < delayIntervals.length; i++) {
|
|
||||||
// if (i == 0) {
|
|
||||||
// delayIntervalNames[i] = getString(R.string.auto_follow_route_never);
|
|
||||||
// } else {
|
|
||||||
// delayIntervalNames[i] = delayIntervals[i] + " " + getString(R.string.int_seconds);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// registerListPreference(settings.DELAY_TO_START_NAVIGATION, screen, delayIntervalNames, delayIntervals);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
registerBooleanPreference(settings.ENABLE_TIME_CONDITIONAL_ROUTING, screen);
|
|
||||||
|
|
||||||
addTurnScreenOn((PreferenceGroup) screen.findPreference("turn_screen_on"));
|
|
||||||
|
|
||||||
addVoicePrefs((PreferenceGroup) screen.findPreference("voice"));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addTurnScreenOn(PreferenceGroup screen) {
|
|
||||||
Integer[] screenPowerSaveValues = new Integer[] { 0, 5, 10, 15, 20, 30, 45, 60 };
|
|
||||||
String[] screenPowerSaveNames = new String[screenPowerSaveValues.length];
|
|
||||||
screenPowerSaveNames[0] = getString(R.string.shared_string_never);
|
|
||||||
for (int i = 1; i < screenPowerSaveValues.length; i++) {
|
|
||||||
screenPowerSaveNames[i] = screenPowerSaveValues[i] + " "
|
|
||||||
+ getString(R.string.int_seconds);
|
|
||||||
}
|
|
||||||
registerListPreference(settings.TURN_SCREEN_ON_TIME_INT, screen, screenPowerSaveNames, screenPowerSaveValues);
|
|
||||||
registerBooleanPreference(settings.TURN_SCREEN_ON_SENSOR, screen);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void reloadVoiceListPreference(PreferenceScreen screen) {
|
|
||||||
String[] entries;
|
|
||||||
String[] entrieValues;
|
|
||||||
Set<String> voiceFiles = getMyApplication().getRoutingOptionsHelper().getVoiceFiles(this);
|
|
||||||
entries = new String[voiceFiles.size() + 2];
|
|
||||||
entrieValues = new String[voiceFiles.size() + 2];
|
|
||||||
int k = 0;
|
|
||||||
// entries[k++] = getString(R.string.shared_string_none);
|
|
||||||
entrieValues[k] = OsmandSettings.VOICE_PROVIDER_NOT_USE;
|
|
||||||
entries[k++] = getString(R.string.shared_string_do_not_use);
|
|
||||||
for (String s : voiceFiles) {
|
|
||||||
entries[k] = (s.contains("tts") ? getString(R.string.ttsvoice) + " " : "") +
|
|
||||||
FileNameTranslationHelper.getVoiceName(this, s);
|
|
||||||
entrieValues[k] = s;
|
|
||||||
k++;
|
|
||||||
}
|
|
||||||
entrieValues[k] = MORE_VALUE;
|
|
||||||
entries[k] = getString(R.string.install_more);
|
|
||||||
registerListPreference(settings.VOICE_PROVIDER, screen, entries, entrieValues);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addVoicePrefs(PreferenceGroup cat) {
|
|
||||||
if (!Version.isBlackberry((OsmandApplication) getApplication())) {
|
|
||||||
String[] streamTypes = new String[]{getString(R.string.voice_stream_music),
|
|
||||||
getString(R.string.voice_stream_notification), getString(R.string.voice_stream_voice_call)};
|
|
||||||
//getString(R.string.shared_string_default)};
|
|
||||||
Integer[] streamIntTypes = new Integer[]{AudioManager.STREAM_MUSIC,
|
|
||||||
AudioManager.STREAM_NOTIFICATION, AudioManager.STREAM_VOICE_CALL};
|
|
||||||
//AudioManager.USE_DEFAULT_STREAM_TYPE};
|
|
||||||
ListPreference lp = createListPreference(
|
|
||||||
settings.AUDIO_MANAGER_STREAM, streamTypes, streamIntTypes , R.string.choose_audio_stream,
|
|
||||||
R.string.choose_audio_stream_descr);
|
|
||||||
final Preference.OnPreferenceChangeListener prev = lp.getOnPreferenceChangeListener();
|
|
||||||
lp.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
|
||||||
prev.onPreferenceChange(preference, newValue);
|
|
||||||
CommandPlayer player = getMyApplication().getPlayer();
|
|
||||||
if (player != null) {
|
|
||||||
player.updateAudioStream(settings.AUDIO_MANAGER_STREAM.get());
|
|
||||||
}
|
|
||||||
// Sync corresponding AUDIO_USAGE value
|
|
||||||
ApplicationMode mode = getMyApplication().getSettings().getApplicationMode();
|
|
||||||
int stream = settings.AUDIO_MANAGER_STREAM.getModeValue(mode);
|
|
||||||
if (stream == AudioManager.STREAM_MUSIC) {
|
|
||||||
settings.AUDIO_USAGE.setModeValue(mode, AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE);
|
|
||||||
} else if (stream == AudioManager.STREAM_NOTIFICATION) {
|
|
||||||
settings.AUDIO_USAGE.setModeValue(mode, AudioAttributes.USAGE_NOTIFICATION);
|
|
||||||
} else if (stream == AudioManager.STREAM_VOICE_CALL) {
|
|
||||||
settings.AUDIO_USAGE.setModeValue(mode, AudioAttributes.USAGE_VOICE_COMMUNICATION);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sync DEFAULT value with CAR value, as we have other way to set it for now
|
|
||||||
settings.AUDIO_MANAGER_STREAM.setModeValue(ApplicationMode.DEFAULT, settings.AUDIO_MANAGER_STREAM.getModeValue(ApplicationMode.CAR));
|
|
||||||
settings.AUDIO_USAGE.setModeValue(ApplicationMode.DEFAULT, settings.AUDIO_USAGE.getModeValue(ApplicationMode.CAR));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
cat.addPreference(lp);
|
|
||||||
cat.addPreference(createCheckBoxPreference(settings.INTERRUPT_MUSIC, R.string.interrupt_music,
|
|
||||||
R.string.interrupt_music_descr));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void prepareRoutingPrefs(PreferenceScreen screen) {
|
|
||||||
PreferenceCategory cat = (PreferenceCategory) screen.findPreference("routing_preferences");
|
|
||||||
cat.removeAll();
|
|
||||||
CheckBoxPreference fastRoute = createCheckBoxPreference(settings.FAST_ROUTE_MODE, R.string.fast_route_mode, R.string.fast_route_mode_descr);
|
|
||||||
RouteService routeService = settings.getApplicationMode().getRouteService();
|
|
||||||
if (routeService != RouteService.OSMAND) {
|
|
||||||
if (routeService == RouteService.STRAIGHT) {
|
|
||||||
defaultSpeedOnly = new Preference(this);
|
|
||||||
defaultSpeedOnly.setTitle(R.string.default_speed_setting_title);
|
|
||||||
defaultSpeedOnly.setSummary(R.string.default_speed_setting_descr);
|
|
||||||
defaultSpeedOnly.setOnPreferenceClickListener(this);
|
|
||||||
cat.addPreference(defaultSpeedOnly);
|
|
||||||
}
|
|
||||||
cat.addPreference(fastRoute);
|
|
||||||
} else {
|
|
||||||
ApplicationMode am = settings.getApplicationMode();
|
|
||||||
GeneralRouter router = settings.getContext().getRouter(am);
|
|
||||||
clearParameters();
|
|
||||||
if (router != null) {
|
|
||||||
GeneralRouterProfile routerProfile = router.getProfile();
|
|
||||||
if (routerProfile != GeneralRouterProfile.PUBLIC_TRANSPORT) {
|
|
||||||
defaultSpeed = new Preference(this);
|
|
||||||
defaultSpeed.setTitle(R.string.default_speed_setting_title);
|
|
||||||
defaultSpeed.setSummary(R.string.default_speed_setting_descr);
|
|
||||||
defaultSpeed.setOnPreferenceClickListener(this);
|
|
||||||
cat.addPreference(defaultSpeed);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, RoutingParameter> parameters = router.getParameters();
|
|
||||||
if(parameters.containsKey(GeneralRouter.USE_SHORTEST_WAY)) {
|
|
||||||
cat.addPreference(fastRoute);
|
|
||||||
}
|
|
||||||
List<RoutingParameter> others = new ArrayList<GeneralRouter.RoutingParameter>();
|
|
||||||
for(Map.Entry<String, RoutingParameter> e : parameters.entrySet()) {
|
|
||||||
String param = e.getKey();
|
|
||||||
RoutingParameter routingParameter = e.getValue();
|
|
||||||
if (param.startsWith("avoid_")) {
|
|
||||||
avoidParameters.add(routingParameter);
|
|
||||||
} else if (param.startsWith("prefer_")) {
|
|
||||||
preferParameters.add(routingParameter);
|
|
||||||
} else if ("relief_smoothness_factor".equals(routingParameter.getGroup())) {
|
|
||||||
reliefFactorParameters.add(routingParameter);
|
|
||||||
} else if (!param.equals(GeneralRouter.USE_SHORTEST_WAY) && !RoutingOptionsHelper.DRIVING_STYLE.equals(routingParameter.getGroup())) {
|
|
||||||
others.add(routingParameter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (avoidParameters.size() > 0) {
|
|
||||||
avoidRouting = new Preference(this);
|
|
||||||
avoidRouting.setTitle(R.string.avoid_in_routing_title);
|
|
||||||
avoidRouting.setSummary(R.string.avoid_in_routing_descr_);
|
|
||||||
avoidRouting.setOnPreferenceClickListener(this);
|
|
||||||
cat.addPreference(avoidRouting);
|
|
||||||
}
|
|
||||||
if (preferParameters.size() > 0) {
|
|
||||||
preferRouting = new Preference(this);
|
|
||||||
preferRouting.setTitle(R.string.prefer_in_routing_title);
|
|
||||||
preferRouting.setSummary(R.string.prefer_in_routing_descr);
|
|
||||||
preferRouting.setOnPreferenceClickListener(this);
|
|
||||||
cat.addPreference(preferRouting);
|
|
||||||
}
|
|
||||||
if (reliefFactorParameters.size() > 0) {
|
|
||||||
reliefFactorRouting = new Preference(this);
|
|
||||||
reliefFactorRouting.setTitle(SettingsBaseActivity.getRoutingStringPropertyName(this, reliefFactorParameters.get(0).getGroup(),
|
|
||||||
Algorithms.capitalizeFirstLetterAndLowercase(reliefFactorParameters.get(0).getGroup().replace('_', ' '))));
|
|
||||||
reliefFactorRouting.setSummary(R.string.relief_smoothness_factor_descr);
|
|
||||||
reliefFactorRouting.setOnPreferenceClickListener(this);
|
|
||||||
cat.addPreference(reliefFactorRouting);
|
|
||||||
}
|
|
||||||
for(RoutingParameter p : others) {
|
|
||||||
Preference basePref;
|
|
||||||
if(p.getType() == RoutingParameterType.BOOLEAN) {
|
|
||||||
basePref = createCheckBoxPreference(settings.getCustomRoutingBooleanProperty(p.getId(), p.getDefaultBoolean()));
|
|
||||||
} else {
|
|
||||||
Object[] vls = p.getPossibleValues();
|
|
||||||
String[] svlss = new String[vls.length];
|
|
||||||
int i = 0;
|
|
||||||
for(Object o : vls) {
|
|
||||||
svlss[i++] = o.toString();
|
|
||||||
}
|
|
||||||
basePref = createListPreference(settings.getCustomRoutingProperty(p.getId(),
|
|
||||||
p.getType() == RoutingParameterType.NUMERIC ? "0.0" : "-"),
|
|
||||||
p.getPossibleValueDescriptions(), svlss,
|
|
||||||
SettingsBaseActivity.getRoutingStringPropertyName(this, p.getId(), p.getName()),
|
|
||||||
SettingsBaseActivity.getRoutingStringPropertyDescription(this, p.getId(), p.getDescription()));
|
|
||||||
}
|
|
||||||
basePref.setTitle(SettingsBaseActivity.getRoutingStringPropertyName(this, p.getId(), p.getName()));
|
|
||||||
basePref.setSummary(SettingsBaseActivity.getRoutingStringPropertyDescription(this, p.getId(), p.getDescription()));
|
|
||||||
cat.addPreference(basePref);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ApplicationMode mode = getMyApplication().getSettings().getApplicationMode();
|
|
||||||
if (mode.isDerivedRoutingFrom(ApplicationMode.CAR)) {
|
|
||||||
PreferenceCategory category = (PreferenceCategory) screen.findPreference("guidance_preferences");
|
|
||||||
category.addPreference(speedLimitExceed);
|
|
||||||
} else {
|
|
||||||
PreferenceCategory category = (PreferenceCategory) screen.findPreference("guidance_preferences");
|
|
||||||
category.removePreference(speedLimitExceed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getRoutinParameterTitle(Context context, RoutingParameter routingParameter) {
|
|
||||||
return SettingsBaseActivity.getRoutingStringPropertyName(context, routingParameter.getId(),
|
|
||||||
routingParameter.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isRoutingParameterSelected(OsmandSettings settings, ApplicationMode am, RoutingParameter routingParameter) {
|
|
||||||
final CommonPreference<Boolean> property =
|
|
||||||
settings.getCustomRoutingBooleanProperty(routingParameter.getId(), routingParameter.getDefaultBoolean());
|
|
||||||
if(am != null) {
|
|
||||||
return property.getModeValue(am);
|
|
||||||
} else {
|
|
||||||
return property.get();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setRoutingParameterSelected(OsmandSettings settings, ApplicationMode am, String routingParameterId, boolean defaultBoolean, boolean isChecked) {
|
|
||||||
final CommonPreference<Boolean> property = settings.getCustomRoutingBooleanProperty(routingParameterId, defaultBoolean);
|
|
||||||
if (am != null) {
|
|
||||||
property.setModeValue(am, isChecked);
|
|
||||||
} else {
|
|
||||||
property.set(isChecked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void clearParameters() {
|
|
||||||
preferParameters.clear();
|
|
||||||
avoidParameters.clear();
|
|
||||||
reliefFactorParameters.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateAllSettings() {
|
|
||||||
prepareRoutingPrefs(getPreferenceScreen());
|
|
||||||
reloadVoiceListPreference(getPreferenceScreen());
|
|
||||||
super.updateAllSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
|
||||||
String id = preference.getKey();
|
|
||||||
if (id.equals(settings.VOICE_PROVIDER.getId())) {
|
|
||||||
if (MORE_VALUE.equals(newValue)) {
|
|
||||||
// listPref.set(oldValue); // revert the change..
|
|
||||||
final Intent intent = new Intent(this, DownloadActivity.class);
|
|
||||||
intent.putExtra(DownloadActivity.TAB_TO_OPEN, DownloadActivity.DOWNLOAD_TAB);
|
|
||||||
intent.putExtra(DownloadActivity.FILTER_CAT, DownloadActivityType.VOICE_FILE.getTag());
|
|
||||||
startActivity(intent);
|
|
||||||
} else {
|
|
||||||
super.onPreferenceChange(preference, newValue);
|
|
||||||
getMyApplication().initVoiceCommandPlayer(this, settings.APPLICATION_MODE.get(),
|
|
||||||
false, null, true, false, false);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
super.onPreferenceChange(preference, newValue);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
if (preference == avoidRouting || preference == preferRouting) {
|
|
||||||
List<RoutingParameter> prms = preference == avoidRouting ? avoidParameters : preferParameters;
|
|
||||||
String[] vals = new String[prms.size()];
|
|
||||||
OsmandPreference[] bls = new OsmandPreference[prms.size()];
|
|
||||||
for (int i = 0; i < prms.size(); i++) {
|
|
||||||
RoutingParameter p = prms.get(i);
|
|
||||||
vals[i] = SettingsBaseActivity.getRoutingStringPropertyName(this, p.getId(), p.getName());
|
|
||||||
bls[i] = settings.getCustomRoutingBooleanProperty(p.getId(), p.getDefaultBoolean());
|
|
||||||
}
|
|
||||||
showBooleanSettings(this, vals, bls, preference.getTitle());
|
|
||||||
return true;
|
|
||||||
} else if (preference == autoZoom) {
|
|
||||||
final ApplicationMode am = settings.getApplicationMode();
|
|
||||||
final ContextMenuAdapter adapter = new ContextMenuAdapter(getMyApplication());
|
|
||||||
int i = 0;
|
|
||||||
int selectedIndex = -1;
|
|
||||||
adapter.addItem(ContextMenuItem.createBuilder(getString(R.string.auto_zoom_none))
|
|
||||||
.setSelected(false).createItem());
|
|
||||||
if (!settings.AUTO_ZOOM_MAP.get()) {
|
|
||||||
selectedIndex = 0;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
for (AutoZoomMap autoZoomMap : AutoZoomMap.values()) {
|
|
||||||
adapter.addItem(ContextMenuItem.createBuilder(getString(autoZoomMap.name))
|
|
||||||
.setSelected(false).createItem());
|
|
||||||
if (selectedIndex == -1 && settings.AUTO_ZOOM_MAP_SCALE.get() == autoZoomMap) {
|
|
||||||
selectedIndex = i;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
if (selectedIndex == -1) {
|
|
||||||
selectedIndex = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
|
||||||
final int layout = R.layout.list_menu_item_native_singlechoice;
|
|
||||||
|
|
||||||
final ArrayAdapter<String> listAdapter = new ArrayAdapter<String>(this, layout, R.id.text1,
|
|
||||||
adapter.getItemNames()) {
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public View getView(final int position, View convertView, ViewGroup parent) {
|
|
||||||
// User super class to create the View
|
|
||||||
View v = convertView;
|
|
||||||
if (v == null) {
|
|
||||||
v = SettingsNavigationActivity.this.getLayoutInflater().inflate(layout, null);
|
|
||||||
}
|
|
||||||
final ContextMenuItem item = adapter.getItem(position);
|
|
||||||
TextView tv = (TextView) v.findViewById(R.id.text1);
|
|
||||||
tv.setText(item.getTitle());
|
|
||||||
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16f);
|
|
||||||
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
final int[] selectedPosition = {selectedIndex};
|
|
||||||
builder.setSingleChoiceItems(listAdapter, selectedIndex, new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int position) {
|
|
||||||
selectedPosition[0] = position;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
builder.setTitle(R.string.auto_zoom_map)
|
|
||||||
.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
|
|
||||||
int position = selectedPosition[0];
|
|
||||||
if (position == 0) {
|
|
||||||
settings.AUTO_ZOOM_MAP.set(false);
|
|
||||||
} else {
|
|
||||||
settings.AUTO_ZOOM_MAP.set(true);
|
|
||||||
settings.AUTO_ZOOM_MAP_SCALE.set(AutoZoomMap.values()[position -1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(R.string.shared_string_cancel, null);
|
|
||||||
|
|
||||||
builder.create().show();
|
|
||||||
return true;
|
|
||||||
} else if (preference == reliefFactorRouting) {
|
|
||||||
final ApplicationMode am = settings.getApplicationMode();
|
|
||||||
final ContextMenuAdapter adapter = new ContextMenuAdapter(getMyApplication());
|
|
||||||
int i = 0;
|
|
||||||
int selectedIndex = -1;
|
|
||||||
for (RoutingParameter p : reliefFactorParameters) {
|
|
||||||
adapter.addItem(ContextMenuItem.createBuilder(getRoutinParameterTitle(this, p))
|
|
||||||
.setSelected(false).createItem());
|
|
||||||
if (isRoutingParameterSelected(settings, am, p)) {
|
|
||||||
selectedIndex = i;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
if (selectedIndex == -1) {
|
|
||||||
selectedIndex = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
|
||||||
final int layout = R.layout.list_menu_item_native_singlechoice;
|
|
||||||
|
|
||||||
final ArrayAdapter<String> listAdapter = new ArrayAdapter<String>(this, layout, R.id.text1,
|
|
||||||
adapter.getItemNames()) {
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public View getView(final int position, View convertView, ViewGroup parent) {
|
|
||||||
// User super class to create the View
|
|
||||||
View v = convertView;
|
|
||||||
if (v == null) {
|
|
||||||
v = SettingsNavigationActivity.this.getLayoutInflater().inflate(layout, null);
|
|
||||||
}
|
|
||||||
final ContextMenuItem item = adapter.getItem(position);
|
|
||||||
TextView tv = (TextView) v.findViewById(R.id.text1);
|
|
||||||
tv.setText(item.getTitle());
|
|
||||||
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16f);
|
|
||||||
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
final int[] selectedPosition = {selectedIndex};
|
|
||||||
builder.setSingleChoiceItems(listAdapter, selectedIndex, new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int position) {
|
|
||||||
selectedPosition[0] = position;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
builder.setTitle(SettingsBaseActivity.getRoutingStringPropertyName(this, reliefFactorParameters.get(0).getGroup(),
|
|
||||||
Algorithms.capitalizeFirstLetterAndLowercase(reliefFactorParameters.get(0).getGroup().replace('_', ' '))))
|
|
||||||
.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
|
|
||||||
int position = selectedPosition[0];
|
|
||||||
if (position >= 0 && position < reliefFactorParameters.size()) {
|
|
||||||
for (int i = 0; i < reliefFactorParameters.size(); i++) {
|
|
||||||
RoutingParameter parameter = reliefFactorParameters.get(i);
|
|
||||||
setRoutingParameterSelected(settings, am, parameter.getId(), parameter.getDefaultBoolean(), i == position);
|
|
||||||
}
|
|
||||||
//mapActivity.getRoutingHelper().recalculateRouteDueToSettingsChange();
|
|
||||||
//updateParameters();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(R.string.shared_string_cancel, null);
|
|
||||||
|
|
||||||
builder.create().show();
|
|
||||||
return true;
|
|
||||||
} else if (preference == showAlarms) {
|
|
||||||
showBooleanSettings(this, new String[] { getString(R.string.show_traffic_warnings), getString(R.string.show_pedestrian_warnings),
|
|
||||||
getString(R.string.show_cameras), getString(R.string.show_lanes), getString(R.string.show_tunnels) }, new OsmandPreference[] { settings.SHOW_TRAFFIC_WARNINGS,
|
|
||||||
settings.SHOW_PEDESTRIAN, settings.SHOW_CAMERAS, settings.SHOW_LANES, settings.SHOW_TUNNELS }, preference.getTitle());
|
|
||||||
return true;
|
|
||||||
} else if (preference == speakAlarms) {
|
|
||||||
AlertDialog dlg = showBooleanSettings(this, new String[] { getString(R.string.speak_street_names),
|
|
||||||
getString(R.string.speak_traffic_warnings), getString(R.string.speak_pedestrian),
|
|
||||||
getString(R.string.speak_speed_limit), getString(R.string.speak_cameras), getString(R.string.show_tunnels),
|
|
||||||
getString(R.string.shared_string_gpx_waypoints), getString(R.string.speak_favorites),
|
|
||||||
getString(R.string.speak_poi) }, new OsmandPreference[] { settings.SPEAK_STREET_NAMES,
|
|
||||||
settings.SPEAK_TRAFFIC_WARNINGS, settings.SPEAK_PEDESTRIAN, settings.SPEAK_SPEED_LIMIT,
|
|
||||||
settings.SPEAK_SPEED_CAMERA, settings.SPEAK_TUNNELS,
|
|
||||||
settings.ANNOUNCE_WPT, settings.ANNOUNCE_NEARBY_FAVORITES,
|
|
||||||
settings.ANNOUNCE_NEARBY_POI }, preference.getTitle());
|
|
||||||
final boolean initialSpeedCam = settings.SPEAK_SPEED_CAMERA.get();
|
|
||||||
final boolean initialFavorites = settings.ANNOUNCE_NEARBY_FAVORITES.get();
|
|
||||||
final boolean initialPOI = settings.ANNOUNCE_NEARBY_POI.get();
|
|
||||||
// final boolean initialWpt = settings.ANNOUNCE_WPT.get();
|
|
||||||
|
|
||||||
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDismiss(DialogInterface dialog) {
|
|
||||||
if (settings.ANNOUNCE_NEARBY_POI.get() != initialPOI) {
|
|
||||||
settings.SHOW_NEARBY_POI.set(settings.ANNOUNCE_NEARBY_POI.get());
|
|
||||||
}
|
|
||||||
if (settings.ANNOUNCE_NEARBY_FAVORITES.get() != initialFavorites) {
|
|
||||||
settings.SHOW_NEARBY_FAVORITES.set(settings.ANNOUNCE_NEARBY_FAVORITES.get());
|
|
||||||
}
|
|
||||||
if (settings.ANNOUNCE_WPT.get()) {
|
|
||||||
settings.SHOW_WPT.set(settings.ANNOUNCE_WPT.get());
|
|
||||||
}
|
|
||||||
if (!initialSpeedCam) {
|
|
||||||
if (settings.SPEAK_SPEED_CAMERA.get()) {
|
|
||||||
settings.SPEAK_SPEED_CAMERA.set(false);
|
|
||||||
confirmSpeedCamerasDlg();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
} else if (preference == defaultSpeed) {
|
|
||||||
showSeekbarSettingsDialog(this, false, settings.getApplicationMode());
|
|
||||||
} else if (preference == defaultSpeedOnly) {
|
|
||||||
showSeekbarSettingsDialog(this, true, settings.getApplicationMode());
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void confirmSpeedCamerasDlg() {
|
|
||||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
|
||||||
bld.setMessage(R.string.confirm_usage_speed_cameras);
|
|
||||||
bld.setPositiveButton(R.string.shared_string_yes, new OnClickListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
settings.SPEAK_SPEED_CAMERA.set(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
bld.setNegativeButton(R.string.shared_string_cancel, null);
|
|
||||||
bld.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AlertDialog showBooleanSettings(Context ctx, String[] vals, final OsmandPreference<Boolean>[] prefs, final CharSequence title) {
|
|
||||||
AlertDialog.Builder bld = new AlertDialog.Builder(ctx);
|
|
||||||
boolean[] checkedItems = new boolean[prefs.length];
|
|
||||||
for (int i = 0; i < prefs.length; i++) {
|
|
||||||
checkedItems[i] = prefs[i].get();
|
|
||||||
}
|
|
||||||
|
|
||||||
final boolean[] tempPrefs = new boolean[prefs.length];
|
|
||||||
for (int i = 0; i < prefs.length; i++) {
|
|
||||||
tempPrefs[i] = prefs[i].get();
|
|
||||||
}
|
|
||||||
|
|
||||||
bld.setMultiChoiceItems(vals, checkedItems, new OnMultiChoiceClickListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which, boolean isChecked) {
|
|
||||||
tempPrefs[which] = isChecked;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
bld.setTitle(title);
|
|
||||||
|
|
||||||
bld.setNegativeButton(R.string.shared_string_cancel, null);
|
|
||||||
|
|
||||||
bld.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
|
||||||
for (int i = 0; i < prefs.length; i++) {
|
|
||||||
prefs[i].set(tempPrefs[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return bld.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void showSeekbarSettingsDialog(Activity activity, final boolean defaultSpeedOnly, final ApplicationMode mode) {
|
|
||||||
if (activity == null || mode == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final OsmandApplication app = (OsmandApplication) activity.getApplication();
|
|
||||||
final OsmandSettings settings = app.getSettings();
|
|
||||||
|
|
||||||
GeneralRouter router = app.getRouter(mode);
|
|
||||||
SpeedConstants units = settings.SPEED_SYSTEM.getModeValue(mode);
|
|
||||||
String speedUnits = units.toShortString(activity);
|
|
||||||
final float[] ratio = new float[1];
|
|
||||||
switch (units) {
|
|
||||||
case MILES_PER_HOUR:
|
|
||||||
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_ONE_MILE;
|
|
||||||
break;
|
|
||||||
case KILOMETERS_PER_HOUR:
|
|
||||||
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_KILOMETER;
|
|
||||||
break;
|
|
||||||
case MINUTES_PER_KILOMETER:
|
|
||||||
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_KILOMETER;
|
|
||||||
speedUnits = activity.getString(R.string.km_h);
|
|
||||||
break;
|
|
||||||
case NAUTICALMILES_PER_HOUR:
|
|
||||||
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_ONE_NAUTICALMILE;
|
|
||||||
break;
|
|
||||||
case MINUTES_PER_MILE:
|
|
||||||
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_ONE_MILE;
|
|
||||||
speedUnits = activity.getString(R.string.mile_per_hour);
|
|
||||||
break;
|
|
||||||
case METERS_PER_SECOND:
|
|
||||||
ratio[0] = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
float settingsMinSpeed = mode.getMinSpeed();
|
|
||||||
float settingsMaxSpeed = mode.getMaxSpeed();
|
|
||||||
float settingsDefaultSpeed = mode.getDefaultSpeed();
|
|
||||||
|
|
||||||
final int[] defaultValue = {Math.round(settingsDefaultSpeed * ratio[0])};
|
|
||||||
final int[] minValue = new int[1];
|
|
||||||
final int[] maxValue = new int[1];
|
|
||||||
final int min;
|
|
||||||
final int max;
|
|
||||||
if (defaultSpeedOnly || router == null) {
|
|
||||||
minValue[0] = Math.round(Math.min(1, settingsDefaultSpeed) * ratio[0]);
|
|
||||||
maxValue[0] = Math.round(Math.max(300, settingsDefaultSpeed) * ratio[0]);
|
|
||||||
min = minValue[0];
|
|
||||||
max = maxValue[0];
|
|
||||||
} else {
|
|
||||||
float minSpeedValue = settingsMinSpeed > 0 ? settingsMinSpeed : router.getMinSpeed();
|
|
||||||
float maxSpeedValue = settingsMaxSpeed > 0 ? settingsMaxSpeed : router.getMaxSpeed();
|
|
||||||
minValue[0] = Math.round(Math.min(minSpeedValue, settingsDefaultSpeed) * ratio[0]);
|
|
||||||
maxValue[0] = Math.round(Math.max(maxSpeedValue, settingsDefaultSpeed) * ratio[0]);
|
|
||||||
|
|
||||||
min = Math.round(Math.min(minValue[0], router.getMinSpeed() * ratio[0] / 2f));
|
|
||||||
max = Math.round(Math.max(maxValue[0], router.getMaxSpeed() * ratio[0] * 1.5f));
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean nightMode = !app.getSettings().isLightContentForMode(mode);
|
|
||||||
Context themedContext = UiUtilities.getThemedContext(activity, nightMode);
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(themedContext);
|
|
||||||
View seekbarView = LayoutInflater.from(themedContext).inflate(R.layout.default_speed_dialog, null, false);
|
|
||||||
builder.setView(seekbarView);
|
|
||||||
builder.setPositiveButton(R.string.shared_string_ok, new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
mode.setDefaultSpeed(defaultValue[0] / ratio[0]);
|
|
||||||
if (!defaultSpeedOnly) {
|
|
||||||
mode.setMinSpeed(minValue[0] / ratio[0]);
|
|
||||||
mode.setMaxSpeed(maxValue[0] / ratio[0]);
|
|
||||||
}
|
|
||||||
RoutingHelper routingHelper = app.getRoutingHelper();
|
|
||||||
if (mode.equals(routingHelper.getAppMode()) && (routingHelper.isRouteCalculated() || routingHelper.isRouteBeingCalculated())) {
|
|
||||||
routingHelper.recalculateRouteDueToSettingsChange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
|
||||||
builder.setNeutralButton(R.string.shared_string_revert, new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
mode.resetDefaultSpeed();
|
|
||||||
if (!defaultSpeedOnly) {
|
|
||||||
mode.setMinSpeed(0f);
|
|
||||||
mode.setMaxSpeed(0f);
|
|
||||||
}
|
|
||||||
RoutingHelper routingHelper = app.getRoutingHelper();
|
|
||||||
if (mode.equals(routingHelper.getAppMode()) && (routingHelper.isRouteCalculated() || routingHelper.isRouteBeingCalculated())) {
|
|
||||||
routingHelper.recalculateRouteDueToSettingsChange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
int selectedModeColor = ContextCompat.getColor(app, mode.getIconColorInfo().getColor(nightMode));
|
|
||||||
if (!defaultSpeedOnly) {
|
|
||||||
setupSpeedSlider(app, SpeedSliderType.DEFAULT_SPEED, speedUnits, minValue, defaultValue, maxValue, min, max, seekbarView, nightMode, selectedModeColor);
|
|
||||||
setupSpeedSlider(app, SpeedSliderType.MIN_SPEED, speedUnits, minValue, defaultValue, maxValue, min, max, seekbarView, nightMode, selectedModeColor);
|
|
||||||
setupSpeedSlider(app, SpeedSliderType.MAX_SPEED, speedUnits, minValue, defaultValue, maxValue, min, max, seekbarView, nightMode, selectedModeColor);
|
|
||||||
} else {
|
|
||||||
setupSpeedSlider(app, SpeedSliderType.DEFAULT_SPEED_ONLY, speedUnits, minValue, defaultValue, maxValue, min, max, seekbarView, nightMode, selectedModeColor);
|
|
||||||
seekbarView.findViewById(R.id.default_speed_div).setVisibility(View.GONE);
|
|
||||||
seekbarView.findViewById(R.id.default_speed_container).setVisibility(View.GONE);
|
|
||||||
seekbarView.findViewById(R.id.max_speed_div).setVisibility(View.GONE);
|
|
||||||
seekbarView.findViewById(R.id.max_speed_container).setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
builder.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
private enum SpeedSliderType {
|
|
||||||
DEFAULT_SPEED_ONLY,
|
|
||||||
DEFAULT_SPEED,
|
|
||||||
MIN_SPEED,
|
|
||||||
MAX_SPEED,
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void setupSpeedSlider(final OsmandApplication app, final SpeedSliderType type, String speedUnits,
|
|
||||||
final int[] minValue, final int[] defaultValue, final int[] maxValue,
|
|
||||||
final int min, final int max, View seekbarView, final boolean nightMode,
|
|
||||||
final int activeColor) {
|
|
||||||
View sliderLayout;
|
|
||||||
int titleId;
|
|
||||||
final int[] speedValue;
|
|
||||||
switch (type) {
|
|
||||||
case DEFAULT_SPEED_ONLY:
|
|
||||||
speedValue = defaultValue;
|
|
||||||
sliderLayout = seekbarView.findViewById(R.id.min_speed_layout);
|
|
||||||
titleId = R.string.default_speed_setting_title;
|
|
||||||
break;
|
|
||||||
case MIN_SPEED:
|
|
||||||
speedValue = minValue;
|
|
||||||
sliderLayout = seekbarView.findViewById(R.id.min_speed_layout);
|
|
||||||
titleId = R.string.shared_string_min_speed;
|
|
||||||
break;
|
|
||||||
case MAX_SPEED:
|
|
||||||
speedValue = maxValue;
|
|
||||||
sliderLayout = seekbarView.findViewById(R.id.max_speed_layout);
|
|
||||||
titleId = R.string.shared_string_max_speed;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
speedValue = defaultValue;
|
|
||||||
sliderLayout = seekbarView.findViewById(R.id.default_speed_layout);
|
|
||||||
titleId = R.string.default_speed_setting_title;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
final Slider slider = sliderLayout.findViewById(R.id.speed_slider);
|
|
||||||
final TextView speedTitleTv = sliderLayout.findViewById(R.id.speed_title);
|
|
||||||
final TextView speedMinTv = sliderLayout.findViewById(R.id.speed_seekbar_min_text);
|
|
||||||
final TextView speedMaxTv = sliderLayout.findViewById(R.id.speed_seekbar_max_text);
|
|
||||||
final TextView speedUnitsTv = sliderLayout.findViewById(R.id.speed_units);
|
|
||||||
final TextView speedTv = sliderLayout.findViewById(R.id.speed_text);
|
|
||||||
|
|
||||||
speedTitleTv.setText(titleId);
|
|
||||||
speedMinTv.setText(String.valueOf(min));
|
|
||||||
speedMaxTv.setText(String.valueOf(max));
|
|
||||||
speedTv.setText(String.valueOf(speedValue[0]));
|
|
||||||
speedUnitsTv.setText(speedUnits);
|
|
||||||
slider.setValueTo(max - min);
|
|
||||||
slider.setValue(Math.max(speedValue[0] - min, 0));
|
|
||||||
slider.addOnChangeListener(new Slider.OnChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void onValueChange(@NonNull Slider slider, float val, boolean fromUser) {
|
|
||||||
int progress = (int) val;
|
|
||||||
int value = progress + min;
|
|
||||||
switch (type) {
|
|
||||||
case DEFAULT_SPEED:
|
|
||||||
case DEFAULT_SPEED_ONLY:
|
|
||||||
if (value > maxValue[0]) {
|
|
||||||
value = maxValue[0];
|
|
||||||
slider.setValue(Math.max(value - min, 0));
|
|
||||||
} else if (value < minValue[0]) {
|
|
||||||
value = minValue[0];
|
|
||||||
slider.setValue(Math.max(value - min, 0));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case MIN_SPEED:
|
|
||||||
if (value > defaultValue[0]) {
|
|
||||||
value = defaultValue[0];
|
|
||||||
slider.setValue(Math.max(value - min, 0));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case MAX_SPEED:
|
|
||||||
if (value < defaultValue[0]) {
|
|
||||||
value = defaultValue[0];
|
|
||||||
slider.setValue(Math.max(value - min, 0));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
speedValue[0] = value;
|
|
||||||
speedTv.setText(String.valueOf(value));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
UiUtilities.setupSlider(slider, nightMode, activeColor);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
package net.osmand.plus.importfiles;
|
package net.osmand.plus.base;
|
||||||
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
@ -12,13 +12,13 @@ import net.osmand.plus.R;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
|
|
||||||
abstract class BaseImportAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> {
|
public abstract class BaseLoadAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> {
|
||||||
|
|
||||||
protected OsmandApplication app;
|
protected OsmandApplication app;
|
||||||
protected WeakReference<FragmentActivity> activityRef;
|
protected WeakReference<FragmentActivity> activityRef;
|
||||||
protected ProgressDialog progress;
|
protected ProgressDialog progress;
|
||||||
|
|
||||||
public BaseImportAsyncTask(@NonNull FragmentActivity activity) {
|
public BaseLoadAsyncTask(@NonNull FragmentActivity activity) {
|
||||||
app = (OsmandApplication) activity.getApplicationContext();
|
app = (OsmandApplication) activity.getApplicationContext();
|
||||||
activityRef = new WeakReference<>(activity);
|
activityRef = new WeakReference<>(activity);
|
||||||
}
|
}
|
|
@ -1,8 +1,10 @@
|
||||||
package net.osmand.plus.development;
|
package net.osmand.plus.development;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.os.AsyncTask;
|
||||||
import android.os.Debug;
|
import android.os.Debug;
|
||||||
|
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
|
|
||||||
import net.osmand.plus.OsmAndLocationSimulation;
|
import net.osmand.plus.OsmAndLocationSimulation;
|
||||||
|
@ -11,6 +13,7 @@ import net.osmand.plus.Version;
|
||||||
import net.osmand.plus.render.NativeOsmandLibrary;
|
import net.osmand.plus.render.NativeOsmandLibrary;
|
||||||
import net.osmand.plus.settings.fragments.BaseSettingsFragment;
|
import net.osmand.plus.settings.fragments.BaseSettingsFragment;
|
||||||
import net.osmand.plus.settings.preferences.SwitchPreferenceEx;
|
import net.osmand.plus.settings.preferences.SwitchPreferenceEx;
|
||||||
|
import net.osmand.render.RenderingRulesStorage;
|
||||||
import net.osmand.util.SunriseSunset;
|
import net.osmand.util.SunriseSunset;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
@ -199,4 +202,23 @@ public class DevelopmentSettingsFragment extends BaseSettingsFragment {
|
||||||
}
|
}
|
||||||
return super.onPreferenceClick(preference);
|
return super.onPreferenceClick(preference);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
String prefId = preference.getKey();
|
||||||
|
if (settings.SAFE_MODE.getId().equals(prefId) && newValue instanceof Boolean) {
|
||||||
|
loadNativeLibrary();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.onPreferenceChange(preference, newValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loadNativeLibrary() {
|
||||||
|
FragmentActivity activity = getActivity();
|
||||||
|
if (!NativeOsmandLibrary.isLoaded() && activity != null) {
|
||||||
|
RenderingRulesStorage storage = app.getRendererRegistry().getCurrentSelectedRenderer();
|
||||||
|
NativeLibraryLoadTask nativeLibraryLoadTask = new NativeLibraryLoadTask(activity, storage);
|
||||||
|
nativeLibraryLoadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
package net.osmand.plus.development;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
|
import net.osmand.plus.render.NativeOsmandLibrary;
|
||||||
|
import net.osmand.render.RenderingRulesStorage;
|
||||||
|
|
||||||
|
class NativeLibraryLoadTask extends BaseLoadAsyncTask<Void, Void, Void> {
|
||||||
|
|
||||||
|
private RenderingRulesStorage storage;
|
||||||
|
|
||||||
|
public NativeLibraryLoadTask(@NonNull FragmentActivity activity, @NonNull RenderingRulesStorage storage) {
|
||||||
|
super(activity);
|
||||||
|
this.storage = storage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Void doInBackground(Void... voids) {
|
||||||
|
NativeOsmandLibrary.getLibrary(storage, app);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPostExecute(Void result) {
|
||||||
|
hideProgress();
|
||||||
|
if (!NativeOsmandLibrary.isNativeSupported(storage, app)) {
|
||||||
|
app.showToastMessage(R.string.native_library_not_supported);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -41,7 +41,6 @@ import net.osmand.plus.settings.backend.ListStringPreference;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
|
||||||
import net.osmand.plus.inapp.InAppPurchaseHelper;
|
import net.osmand.plus.inapp.InAppPurchaseHelper;
|
||||||
import net.osmand.plus.poi.PoiUIFilter;
|
import net.osmand.plus.poi.PoiUIFilter;
|
||||||
import net.osmand.plus.render.RendererRegistry;
|
import net.osmand.plus.render.RendererRegistry;
|
||||||
|
@ -821,7 +820,7 @@ public class ConfigureMapMenu {
|
||||||
final String[] vals = new String[ps.size()];
|
final String[] vals = new String[ps.size()];
|
||||||
for (int i = 0; i < ps.size(); i++) {
|
for (int i = 0; i < ps.size(); i++) {
|
||||||
RenderingRuleProperty p = ps.get(i);
|
RenderingRuleProperty p = ps.get(i);
|
||||||
String propertyName = SettingsActivity.getStringPropertyName(activity, p.getAttrName(),
|
String propertyName = AndroidUtils.getRenderingStringPropertyName(activity, p.getAttrName(),
|
||||||
p.getName());
|
p.getName());
|
||||||
vals[i] = propertyName;
|
vals[i] = propertyName;
|
||||||
}
|
}
|
||||||
|
@ -904,9 +903,9 @@ public class ConfigureMapMenu {
|
||||||
final Spinner spinner = (Spinner) spinnerView.findViewById(R.id.spinner);
|
final Spinner spinner = (Spinner) spinnerView.findViewById(R.id.spinner);
|
||||||
TextView description = (TextView) spinnerView.findViewById(R.id.description);
|
TextView description = (TextView) spinnerView.findViewById(R.id.description);
|
||||||
|
|
||||||
String propertyName = SettingsActivity.getStringPropertyName(activity, p.getAttrName(),
|
String propertyName = AndroidUtils.getRenderingStringPropertyName(activity, p.getAttrName(),
|
||||||
p.getName());
|
p.getName());
|
||||||
String propertyDescr = SettingsActivity.getStringPropertyDescription(activity,
|
String propertyDescr = AndroidUtils.getRenderingStringPropertyDescription(activity,
|
||||||
p.getAttrName(), p.getName());
|
p.getAttrName(), p.getName());
|
||||||
|
|
||||||
title.setText(propertyName);
|
title.setText(propertyName);
|
||||||
|
@ -920,11 +919,11 @@ public class ConfigureMapMenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] possibleValuesString = new String[p.getPossibleValues().length + 1];
|
String[] possibleValuesString = new String[p.getPossibleValues().length + 1];
|
||||||
possibleValuesString[0] = SettingsActivity.getStringPropertyValue(activity,
|
possibleValuesString[0] = AndroidUtils.getRenderingStringPropertyValue(activity,
|
||||||
p.getDefaultValueDescription());
|
p.getDefaultValueDescription());
|
||||||
|
|
||||||
for (int j = 0; j < p.getPossibleValues().length; j++) {
|
for (int j = 0; j < p.getPossibleValues().length; j++) {
|
||||||
possibleValuesString[j + 1] = SettingsActivity.getStringPropertyValue(activity,
|
possibleValuesString[j + 1] = AndroidUtils.getRenderingStringPropertyValue(activity,
|
||||||
p.getPossibleValues()[j]);
|
p.getPossibleValues()[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1027,10 +1026,10 @@ public class ConfigureMapMenu {
|
||||||
@DrawableRes final int icon, final RenderingRuleProperty p, final String id,
|
@DrawableRes final int icon, final RenderingRuleProperty p, final String id,
|
||||||
final OsmandApplication app, final int currentProfileColor, final boolean nightMode, final int themeRes) {
|
final OsmandApplication app, final int currentProfileColor, final boolean nightMode, final int themeRes) {
|
||||||
final OsmandMapTileView view = activity.getMapView();
|
final OsmandMapTileView view = activity.getMapView();
|
||||||
String propertyName = SettingsActivity.getStringPropertyName(view.getContext(), p.getAttrName(),
|
String propertyName = AndroidUtils.getRenderingStringPropertyName(view.getContext(), p.getAttrName(),
|
||||||
p.getName());
|
p.getName());
|
||||||
|
|
||||||
final String propertyDescr = SettingsActivity.getStringPropertyDescription(view.getContext(),
|
final String propertyDescr = AndroidUtils.getRenderingStringPropertyDescription(view.getContext(),
|
||||||
p.getAttrName(), p.getName());
|
p.getAttrName(), p.getName());
|
||||||
if (p.isBoolean()) {
|
if (p.isBoolean()) {
|
||||||
final CommonPreference<Boolean> pref = view.getApplication().getSettings()
|
final CommonPreference<Boolean> pref = view.getApplication().getSettings()
|
||||||
|
@ -1053,9 +1052,9 @@ public class ConfigureMapMenu {
|
||||||
.getCustomRenderProperty(p.getAttrName());
|
.getCustomRenderProperty(p.getAttrName());
|
||||||
final String descr;
|
final String descr;
|
||||||
if (!Algorithms.isEmpty(pref.get())) {
|
if (!Algorithms.isEmpty(pref.get())) {
|
||||||
descr = SettingsActivity.getStringPropertyValue(activity, pref.get());
|
descr = AndroidUtils.getRenderingStringPropertyValue(activity, pref.get());
|
||||||
} else {
|
} else {
|
||||||
descr = SettingsActivity.getStringPropertyValue(view.getContext(),
|
descr = AndroidUtils.getRenderingStringPropertyValue(view.getContext(),
|
||||||
p.getDefaultValueDescription());
|
p.getDefaultValueDescription());
|
||||||
}
|
}
|
||||||
ContextMenuItem.ItemBuilder builder = ContextMenuItem.createBuilder(propertyName)
|
ContextMenuItem.ItemBuilder builder = ContextMenuItem.createBuilder(propertyName)
|
||||||
|
@ -1080,11 +1079,11 @@ public class ConfigureMapMenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] possibleValuesString = new String[p.getPossibleValues().length + 1];
|
String[] possibleValuesString = new String[p.getPossibleValues().length + 1];
|
||||||
possibleValuesString[0] = SettingsActivity.getStringPropertyValue(view.getContext(),
|
possibleValuesString[0] = AndroidUtils.getRenderingStringPropertyValue(view.getContext(),
|
||||||
p.getDefaultValueDescription());
|
p.getDefaultValueDescription());
|
||||||
|
|
||||||
for (int j = 0; j < p.getPossibleValues().length; j++) {
|
for (int j = 0; j < p.getPossibleValues().length; j++) {
|
||||||
possibleValuesString[j + 1] = SettingsActivity.getStringPropertyValue(view.getContext(),
|
possibleValuesString[j + 1] = AndroidUtils.getRenderingStringPropertyValue(view.getContext(),
|
||||||
p.getPossibleValues()[j]);
|
p.getPossibleValues()[j]);
|
||||||
}
|
}
|
||||||
DialogListItemAdapter dialogAdapter = DialogListItemAdapter.createSingleChoiceAdapter(
|
DialogListItemAdapter dialogAdapter = DialogListItemAdapter.createSingleChoiceAdapter(
|
||||||
|
@ -1098,7 +1097,7 @@ public class ConfigureMapMenu {
|
||||||
pref.set(p.getPossibleValues()[which - 1]);
|
pref.set(p.getPossibleValues()[which - 1]);
|
||||||
}
|
}
|
||||||
refreshMapComplete(activity);
|
refreshMapComplete(activity);
|
||||||
String description = SettingsActivity.getStringPropertyValue(activity, pref.get());
|
String description = AndroidUtils.getRenderingStringPropertyValue(activity, pref.get());
|
||||||
adapter.getItem(pos).setDescription(description);
|
adapter.getItem(pos).setDescription(description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,12 +15,12 @@ import androidx.annotation.Nullable;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
import net.osmand.plus.ContextMenuAdapter;
|
||||||
import net.osmand.plus.ContextMenuItem;
|
import net.osmand.plus.ContextMenuItem;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
|
||||||
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
|
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
|
||||||
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemTwoChoicesButton;
|
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemTwoChoicesButton;
|
||||||
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemTwoChoicesButton.OnBottomBtnClickListener;
|
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemTwoChoicesButton.OnBottomBtnClickListener;
|
||||||
|
@ -125,7 +125,7 @@ public class DetailsBottomSheet extends BasePreferenceBottomSheet {
|
||||||
for (int i = 0; i < properties.size(); i++) {
|
for (int i = 0; i < properties.size(); i++) {
|
||||||
RenderingRuleProperty property = properties.get(i);
|
RenderingRuleProperty property = properties.get(i);
|
||||||
final CommonPreference<Boolean> pref = preferences.get(i);
|
final CommonPreference<Boolean> pref = preferences.get(i);
|
||||||
final String propertyName = SettingsActivity.getStringPropertyName(app, property.getAttrName(), property.getName());
|
final String propertyName = AndroidUtils.getRenderingStringPropertyName(app, property.getAttrName(), property.getName());
|
||||||
if (STREET_LIGHTING.equals(property.getAttrName()) && streetLightNightProp != null) {
|
if (STREET_LIGHTING.equals(property.getAttrName()) && streetLightNightProp != null) {
|
||||||
final CommonPreference<Boolean> streetLightsNightPref = preferences.get(properties.indexOf(streetLightNightProp));
|
final CommonPreference<Boolean> streetLightsNightPref = preferences.get(properties.indexOf(streetLightNightProp));
|
||||||
final BottomSheetItemTwoChoicesButton[] item = new BottomSheetItemTwoChoicesButton[1];
|
final BottomSheetItemTwoChoicesButton[] item = new BottomSheetItemTwoChoicesButton[1];
|
||||||
|
|
|
@ -12,7 +12,6 @@ import androidx.annotation.NonNull;
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
|
||||||
import net.osmand.render.RenderingRule;
|
import net.osmand.render.RenderingRule;
|
||||||
import net.osmand.render.RenderingRuleProperty;
|
import net.osmand.render.RenderingRuleProperty;
|
||||||
import net.osmand.render.RenderingRulesStorage;
|
import net.osmand.render.RenderingRulesStorage;
|
||||||
|
@ -124,7 +123,7 @@ public class GpxAppearanceAdapter extends ArrayAdapter<GpxAppearanceAdapter.Appe
|
||||||
for (int j = 0; j < trackWidthProp.getPossibleValues().length; j++) {
|
for (int j = 0; j < trackWidthProp.getPossibleValues().length; j++) {
|
||||||
AppearanceListItem item = new AppearanceListItem(ConfigureMapMenu.CURRENT_TRACK_WIDTH_ATTR,
|
AppearanceListItem item = new AppearanceListItem(ConfigureMapMenu.CURRENT_TRACK_WIDTH_ATTR,
|
||||||
trackWidthProp.getPossibleValues()[j],
|
trackWidthProp.getPossibleValues()[j],
|
||||||
SettingsActivity.getStringPropertyValue(app, trackWidthProp.getPossibleValues()[j]));
|
AndroidUtils.getRenderingStringPropertyValue(app, trackWidthProp.getPossibleValues()[j]));
|
||||||
items.add(item);
|
items.add(item);
|
||||||
if (adapterType != GpxAppearanceAdapterType.TRACK_WIDTH_COLOR) {
|
if (adapterType != GpxAppearanceAdapterType.TRACK_WIDTH_COLOR) {
|
||||||
if (j == trackWidthProp.getPossibleValues().length - 1) {
|
if (j == trackWidthProp.getPossibleValues().length - 1) {
|
||||||
|
@ -143,7 +142,7 @@ public class GpxAppearanceAdapter extends ArrayAdapter<GpxAppearanceAdapter.Appe
|
||||||
for (int j = 0; j < trackColorProp.getPossibleValues().length; j++) {
|
for (int j = 0; j < trackColorProp.getPossibleValues().length; j++) {
|
||||||
AppearanceListItem item = new AppearanceListItem(ConfigureMapMenu.CURRENT_TRACK_COLOR_ATTR,
|
AppearanceListItem item = new AppearanceListItem(ConfigureMapMenu.CURRENT_TRACK_COLOR_ATTR,
|
||||||
trackColorProp.getPossibleValues()[j],
|
trackColorProp.getPossibleValues()[j],
|
||||||
SettingsActivity.getStringPropertyValue(app, trackColorProp.getPossibleValues()[j]),
|
AndroidUtils.getRenderingStringPropertyValue(app, trackColorProp.getPossibleValues()[j]),
|
||||||
parseTrackColor(renderer, trackColorProp.getPossibleValues()[j]));
|
parseTrackColor(renderer, trackColorProp.getPossibleValues()[j]));
|
||||||
items.add(item);
|
items.add(item);
|
||||||
if (j == trackColorProp.getPossibleValues().length - 1) {
|
if (j == trackColorProp.getPossibleValues().length - 1) {
|
||||||
|
|
|
@ -92,7 +92,6 @@ import net.osmand.plus.Version;
|
||||||
import net.osmand.plus.activities.ActivityResultListener;
|
import net.osmand.plus.activities.ActivityResultListener;
|
||||||
import net.osmand.plus.activities.ActivityResultListener.OnActivityResultListener;
|
import net.osmand.plus.activities.ActivityResultListener.OnActivityResultListener;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
|
||||||
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
||||||
import net.osmand.plus.dialogs.GpxAppearanceAdapter;
|
import net.osmand.plus.dialogs.GpxAppearanceAdapter;
|
||||||
import net.osmand.plus.dialogs.GpxAppearanceAdapter.AppearanceListItem;
|
import net.osmand.plus.dialogs.GpxAppearanceAdapter.AppearanceListItem;
|
||||||
|
@ -810,9 +809,9 @@ public class GpxUiHelper {
|
||||||
TextView widthTextView = (TextView) apprTitleView.findViewById(R.id.widthTitle);
|
TextView widthTextView = (TextView) apprTitleView.findViewById(R.id.widthTitle);
|
||||||
ImageView colorImageView = (ImageView) apprTitleView.findViewById(R.id.colorImage);
|
ImageView colorImageView = (ImageView) apprTitleView.findViewById(R.id.colorImage);
|
||||||
if (Algorithms.isEmpty(prefWidthValue)) {
|
if (Algorithms.isEmpty(prefWidthValue)) {
|
||||||
widthTextView.setText(SettingsActivity.getStringPropertyValue(activity, trackWidthProp.getDefaultValueDescription()));
|
widthTextView.setText(AndroidUtils.getRenderingStringPropertyValue(activity, trackWidthProp.getDefaultValueDescription()));
|
||||||
} else {
|
} else {
|
||||||
widthTextView.setText(SettingsActivity.getStringPropertyValue(activity, prefWidthValue));
|
widthTextView.setText(AndroidUtils.getRenderingStringPropertyValue(activity, prefWidthValue));
|
||||||
}
|
}
|
||||||
int color = GpxAppearanceAdapter.parseTrackColor(renderer, prefColorValue);
|
int color = GpxAppearanceAdapter.parseTrackColor(renderer, prefColorValue);
|
||||||
if (color == -1) {
|
if (color == -1) {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import net.osmand.GPXUtilities.GPXFile;
|
||||||
import net.osmand.data.FavouritePoint;
|
import net.osmand.data.FavouritePoint;
|
||||||
import net.osmand.plus.FavouritesDbHelper;
|
import net.osmand.plus.FavouritesDbHelper;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@ import static net.osmand.plus.importfiles.ImportHelper.asFavourites;
|
||||||
import static net.osmand.plus.myplaces.FavoritesActivity.FAV_TAB;
|
import static net.osmand.plus.myplaces.FavoritesActivity.FAV_TAB;
|
||||||
import static net.osmand.plus.myplaces.FavoritesActivity.TAB_ID;
|
import static net.osmand.plus.myplaces.FavoritesActivity.TAB_ID;
|
||||||
|
|
||||||
class FavoritesImportTask extends BaseImportAsyncTask<Void, Void, GPXFile> {
|
class FavoritesImportTask extends BaseLoadAsyncTask<Void, Void, GPXFile> {
|
||||||
|
|
||||||
private GPXFile gpxFile;
|
private GPXFile gpxFile;
|
||||||
private String fileName;
|
private String fileName;
|
||||||
|
|
|
@ -7,13 +7,14 @@ import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
import net.osmand.GPXUtilities;
|
import net.osmand.GPXUtilities;
|
||||||
import net.osmand.GPXUtilities.GPXFile;
|
import net.osmand.GPXUtilities.GPXFile;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
class GpxImportTask extends BaseImportAsyncTask<Void, Void, GPXFile> {
|
class GpxImportTask extends BaseLoadAsyncTask<Void, Void, GPXFile> {
|
||||||
|
|
||||||
private ImportHelper importHelper;
|
private ImportHelper importHelper;
|
||||||
private Uri gpxFile;
|
private Uri gpxFile;
|
||||||
|
|
|
@ -7,6 +7,7 @@ import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
import net.osmand.GPXUtilities;
|
import net.osmand.GPXUtilities;
|
||||||
import net.osmand.GPXUtilities.GPXFile;
|
import net.osmand.GPXUtilities.GPXFile;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
@ -17,7 +18,7 @@ import java.util.zip.ZipInputStream;
|
||||||
|
|
||||||
import static net.osmand.plus.importfiles.KmlImportTask.convertKmlToGpxStream;
|
import static net.osmand.plus.importfiles.KmlImportTask.convertKmlToGpxStream;
|
||||||
|
|
||||||
class GpxOrFavouritesImportTask extends BaseImportAsyncTask<Void, Void, GPXFile> {
|
class GpxOrFavouritesImportTask extends BaseLoadAsyncTask<Void, Void, GPXFile> {
|
||||||
|
|
||||||
private ImportHelper importHelper;
|
private ImportHelper importHelper;
|
||||||
private Uri fileUri;
|
private Uri fileUri;
|
||||||
|
|
|
@ -7,6 +7,7 @@ import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
import net.osmand.GPXUtilities;
|
import net.osmand.GPXUtilities;
|
||||||
import net.osmand.GPXUtilities.GPXFile;
|
import net.osmand.GPXUtilities.GPXFile;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
import net.osmand.plus.helpers.Kml2Gpx;
|
import net.osmand.plus.helpers.Kml2Gpx;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
class KmlImportTask extends BaseImportAsyncTask<Void, Void, GPXFile> {
|
class KmlImportTask extends BaseLoadAsyncTask<Void, Void, GPXFile> {
|
||||||
|
|
||||||
private ImportHelper importHelper;
|
private ImportHelper importHelper;
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
|
|
|
@ -7,6 +7,7 @@ import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
import net.osmand.GPXUtilities;
|
import net.osmand.GPXUtilities;
|
||||||
import net.osmand.GPXUtilities.GPXFile;
|
import net.osmand.GPXUtilities.GPXFile;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
@ -16,7 +17,7 @@ import java.util.zip.ZipInputStream;
|
||||||
import static net.osmand.plus.importfiles.ImportHelper.KML_SUFFIX;
|
import static net.osmand.plus.importfiles.ImportHelper.KML_SUFFIX;
|
||||||
import static net.osmand.plus.importfiles.KmlImportTask.convertKmlToGpxStream;
|
import static net.osmand.plus.importfiles.KmlImportTask.convertKmlToGpxStream;
|
||||||
|
|
||||||
class KmzImportTask extends BaseImportAsyncTask<Void, Void, GPXFile> {
|
class KmzImportTask extends BaseLoadAsyncTask<Void, Void, GPXFile> {
|
||||||
|
|
||||||
private ImportHelper importHelper;
|
private ImportHelper importHelper;
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
|
|
|
@ -8,11 +8,12 @@ import androidx.fragment.app.FragmentActivity;
|
||||||
import net.osmand.IProgress;
|
import net.osmand.IProgress;
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
class ObfImportTask extends BaseImportAsyncTask<Void, Void, String> {
|
class ObfImportTask extends BaseLoadAsyncTask<Void, Void, String> {
|
||||||
|
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
private String name;
|
private String name;
|
||||||
|
|
|
@ -13,6 +13,7 @@ import net.osmand.FileUtils;
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.plus.CustomOsmandPlugin;
|
import net.osmand.plus.CustomOsmandPlugin;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
import net.osmand.plus.settings.backend.backup.SettingsHelper.CheckDuplicatesListener;
|
import net.osmand.plus.settings.backend.backup.SettingsHelper.CheckDuplicatesListener;
|
||||||
import net.osmand.plus.settings.backend.backup.PluginSettingsItem;
|
import net.osmand.plus.settings.backend.backup.PluginSettingsItem;
|
||||||
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
|
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
|
||||||
|
@ -28,7 +29,7 @@ import java.util.List;
|
||||||
|
|
||||||
import static net.osmand.plus.AppInitializer.loadRoutingFiles;
|
import static net.osmand.plus.AppInitializer.loadRoutingFiles;
|
||||||
|
|
||||||
class SettingsImportTask extends BaseImportAsyncTask<Void, Void, String> {
|
class SettingsImportTask extends BaseLoadAsyncTask<Void, Void, String> {
|
||||||
|
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
private String name;
|
private String name;
|
||||||
|
|
|
@ -9,11 +9,12 @@ import androidx.fragment.app.FragmentActivity;
|
||||||
import net.osmand.plus.OsmandPlugin;
|
import net.osmand.plus.OsmandPlugin;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin;
|
import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin;
|
||||||
|
|
||||||
import static net.osmand.IndexConstants.TILES_INDEX_DIR;
|
import static net.osmand.IndexConstants.TILES_INDEX_DIR;
|
||||||
|
|
||||||
class SqliteTileImportTask extends BaseImportAsyncTask<Void, Void, String> {
|
class SqliteTileImportTask extends BaseLoadAsyncTask<Void, Void, String> {
|
||||||
|
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
private String name;
|
private String name;
|
||||||
|
|
|
@ -8,6 +8,7 @@ import androidx.fragment.app.FragmentActivity;
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.FileUtils;
|
import net.osmand.FileUtils;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
import net.osmand.plus.importfiles.ImportHelper.ImportType;
|
import net.osmand.plus.importfiles.ImportHelper.ImportType;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
|
@ -32,7 +33,7 @@ import static net.osmand.util.Algorithms.SQLITE_FILE_SIGNATURE;
|
||||||
import static net.osmand.util.Algorithms.XML_FILE_SIGNATURE;
|
import static net.osmand.util.Algorithms.XML_FILE_SIGNATURE;
|
||||||
import static net.osmand.util.Algorithms.ZIP_FILE_SIGNATURE;
|
import static net.osmand.util.Algorithms.ZIP_FILE_SIGNATURE;
|
||||||
|
|
||||||
class UriImportTask extends BaseImportAsyncTask<Void, Void, String> {
|
class UriImportTask extends BaseLoadAsyncTask<Void, Void, String> {
|
||||||
|
|
||||||
private ImportHelper importHelper;
|
private ImportHelper importHelper;
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
|
|
|
@ -13,6 +13,7 @@ import net.osmand.PlatformUtil;
|
||||||
import net.osmand.plus.AppInitializer.LoadRoutingFilesCallback;
|
import net.osmand.plus.AppInitializer.LoadRoutingFilesCallback;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
import net.osmand.plus.importfiles.ImportHelper.ImportType;
|
import net.osmand.plus.importfiles.ImportHelper.ImportType;
|
||||||
import net.osmand.router.RoutingConfiguration.Builder;
|
import net.osmand.router.RoutingConfiguration.Builder;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
@ -28,7 +29,7 @@ import java.io.InputStream;
|
||||||
import static net.osmand.IndexConstants.RENDERER_INDEX_EXT;
|
import static net.osmand.IndexConstants.RENDERER_INDEX_EXT;
|
||||||
import static net.osmand.plus.AppInitializer.loadRoutingFiles;
|
import static net.osmand.plus.AppInitializer.loadRoutingFiles;
|
||||||
|
|
||||||
class XmlImportTask extends BaseImportAsyncTask<Void, Void, String> {
|
class XmlImportTask extends BaseLoadAsyncTask<Void, Void, String> {
|
||||||
|
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
private String destFileName;
|
private String destFileName;
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.net.Uri;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
|
import net.osmand.plus.base.BaseLoadAsyncTask;
|
||||||
import net.osmand.plus.importfiles.ImportHelper.ImportType;
|
import net.osmand.plus.importfiles.ImportHelper.ImportType;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ import static net.osmand.IndexConstants.OSMAND_SETTINGS_FILE_EXT;
|
||||||
import static net.osmand.IndexConstants.TEMP_DIR;
|
import static net.osmand.IndexConstants.TEMP_DIR;
|
||||||
import static net.osmand.plus.importfiles.ImportHelper.KML_SUFFIX;
|
import static net.osmand.plus.importfiles.ImportHelper.KML_SUFFIX;
|
||||||
|
|
||||||
public class ZipImportTask extends BaseImportAsyncTask<Void, Void, ImportType> {
|
public class ZipImportTask extends BaseLoadAsyncTask<Void, Void, ImportType> {
|
||||||
|
|
||||||
private ImportHelper importHelper;
|
private ImportHelper importHelper;
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package net.osmand.plus.mapcontextmenu.builders.cards;
|
||||||
|
|
||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.PointF;
|
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.net.TrafficStats;
|
import android.net.TrafficStats;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
@ -16,24 +15,19 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.widget.AppCompatButton;
|
import androidx.appcompat.widget.AppCompatButton;
|
||||||
|
|
||||||
import com.google.gson.JsonArray;
|
import net.osmand.AndroidNetworkUtils;
|
||||||
import com.google.gson.JsonObject;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.*;
|
import net.osmand.Location;
|
||||||
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.data.Amenity;
|
import net.osmand.data.Amenity;
|
||||||
import net.osmand.data.FavouritePoint;
|
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.RotatedTileBox;
|
|
||||||
import net.osmand.osm.PoiType;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.Version;
|
import net.osmand.plus.Version;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
|
||||||
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
||||||
import net.osmand.plus.mapillary.MapillaryContributeCard;
|
import net.osmand.plus.mapillary.MapillaryContributeCard;
|
||||||
import net.osmand.plus.mapillary.MapillaryImageCard;
|
import net.osmand.plus.mapillary.MapillaryImageCard;
|
||||||
import net.osmand.plus.osmedit.OsmBugsLayer;
|
|
||||||
import net.osmand.plus.views.layers.ContextMenuLayer;
|
|
||||||
import net.osmand.plus.wikimedia.WikiImageHelper;
|
import net.osmand.plus.wikimedia.WikiImageHelper;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
|
@ -45,9 +39,13 @@ import org.json.JSONObject;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import static net.osmand.data.FavouritePoint.DEFAULT_BACKGROUND_TYPE;
|
import java.util.Date;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public abstract class ImageCard extends AbstractCard {
|
public abstract class ImageCard extends AbstractCard {
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import android.graphics.drawable.Drawable;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
@ -25,7 +24,6 @@ import net.osmand.plus.helpers.FontCache;
|
||||||
import net.osmand.plus.mapcontextmenu.MenuController;
|
import net.osmand.plus.mapcontextmenu.MenuController;
|
||||||
import net.osmand.plus.mapcontextmenu.builders.FavouritePointMenuBuilder;
|
import net.osmand.plus.mapcontextmenu.builders.FavouritePointMenuBuilder;
|
||||||
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditor;
|
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditor;
|
||||||
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditorFragment;
|
|
||||||
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditorFragmentNew;
|
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditorFragmentNew;
|
||||||
import net.osmand.plus.transport.TransportStopRoute;
|
import net.osmand.plus.transport.TransportStopRoute;
|
||||||
import net.osmand.plus.widgets.style.CustomTypefaceSpan;
|
import net.osmand.plus.widgets.style.CustomTypefaceSpan;
|
||||||
|
@ -102,14 +100,8 @@ public class FavouritePointMenuController extends MenuController {
|
||||||
MapActivity mapActivity = getMapActivity();
|
MapActivity mapActivity = getMapActivity();
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(FavoritePointEditor.TAG);
|
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(FavoritePointEditor.TAG);
|
||||||
if (fragment != null) {
|
|
||||||
// TODO: uncomment & delete if else after switch to new UI Fragment
|
|
||||||
//((FavoritePointEditorFragment) fragment).dismiss();
|
|
||||||
if (fragment instanceof FavoritePointEditorFragmentNew) {
|
if (fragment instanceof FavoritePointEditorFragmentNew) {
|
||||||
((FavoritePointEditorFragmentNew) fragment).dismiss();
|
((FavoritePointEditorFragmentNew) fragment).dismiss();
|
||||||
} else {
|
|
||||||
((FavoritePointEditorFragment) fragment).dismiss();
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -567,23 +567,6 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
|
||||||
: R.color.inactive_buttons_and_links_bg_light)));
|
: R.color.inactive_buttons_and_links_bg_light)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createIconSelector() {
|
|
||||||
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());
|
|
||||||
iconCategories.put(names.get(i).toString(), icons.getJSONArray("icons"));
|
|
||||||
}
|
|
||||||
} catch (JSONException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
selectedIconCategory = getInitCategory();
|
|
||||||
createIconForCategory();
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getInitCategory() {
|
private String getInitCategory() {
|
||||||
for (int j = 0; j < iconCategories.values().size(); j++) {
|
for (int j = 0; j < iconCategories.values().size(); j++) {
|
||||||
JSONArray iconJsonArray = (JSONArray) iconCategories.values().toArray()[j];
|
JSONArray iconJsonArray = (JSONArray) iconCategories.values().toArray()[j];
|
||||||
|
@ -604,6 +587,25 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
|
||||||
return app.getResources().getResourceEntryName(iconId).replaceFirst("mx_", "");
|
return app.getResources().getResourceEntryName(iconId).replaceFirst("mx_", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createIconSelector() {
|
||||||
|
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();
|
||||||
|
String name = names.get(i).toString();
|
||||||
|
JSONObject icons = categories.getJSONObject(name);
|
||||||
|
String translatedName = AndroidUtils.getIconStringPropertyName(app, name);
|
||||||
|
iconCategories.put(translatedName, icons.getJSONArray("icons"));
|
||||||
|
}
|
||||||
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
selectedIconCategory = getInitCategory();
|
||||||
|
createIconForCategory();
|
||||||
|
}
|
||||||
|
|
||||||
private void createIconForCategory() {
|
private void createIconForCategory() {
|
||||||
FlowLayout selectIcon = view.findViewById(R.id.select_icon);
|
FlowLayout selectIcon = view.findViewById(R.id.select_icon);
|
||||||
selectIcon.removeAllViews();
|
selectIcon.removeAllViews();
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.osmand.plus.mapcontextmenu.other;
|
package net.osmand.plus.mapcontextmenu.other;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -21,15 +20,11 @@ import androidx.appcompat.widget.PopupMenu;
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.CallbackWithObject;
|
import net.osmand.CallbackWithObject;
|
||||||
import net.osmand.GPXUtilities;
|
import net.osmand.GPXUtilities;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
import net.osmand.plus.ContextMenuAdapter;
|
||||||
import net.osmand.plus.ContextMenuItem;
|
import net.osmand.plus.ContextMenuItem;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
|
||||||
import net.osmand.plus.activities.SettingsNavigationActivity;
|
|
||||||
import net.osmand.plus.helpers.FileNameTranslationHelper;
|
import net.osmand.plus.helpers.FileNameTranslationHelper;
|
||||||
import net.osmand.plus.helpers.GpxUiHelper;
|
import net.osmand.plus.helpers.GpxUiHelper;
|
||||||
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper;
|
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper;
|
||||||
|
@ -43,6 +38,8 @@ import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.OtherSettingsRo
|
||||||
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.VoiceGuidanceRoutingParameter;
|
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.VoiceGuidanceRoutingParameter;
|
||||||
import net.osmand.plus.routing.RouteProvider;
|
import net.osmand.plus.routing.RouteProvider;
|
||||||
import net.osmand.plus.routing.RoutingHelper;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
|
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||||
import net.osmand.router.GeneralRouter;
|
import net.osmand.router.GeneralRouter;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -148,11 +145,6 @@ public class RoutePreferencesMenu {
|
||||||
.setNegativeButton(R.string.shared_string_cancel, null);
|
.setNegativeButton(R.string.shared_string_cancel, null);
|
||||||
|
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
} else if (obj instanceof OtherSettingsRoutingParameter) {
|
|
||||||
final Intent settings = new Intent(mapActivity, SettingsNavigationActivity.class);
|
|
||||||
settings.putExtra(SettingsNavigationActivity.INTENT_SKIP_DIALOG, true);
|
|
||||||
settings.putExtra(SettingsBaseActivity.INTENT_APP_MODE, routingHelper.getAppMode().getStringKey());
|
|
||||||
mapActivity.startActivity(settings);
|
|
||||||
} else if (obj instanceof MuteSoundRoutingParameter) {
|
} else if (obj instanceof MuteSoundRoutingParameter) {
|
||||||
final CompoundButton btn = (CompoundButton) view.findViewById(R.id.toggle_item);
|
final CompoundButton btn = (CompoundButton) view.findViewById(R.id.toggle_item);
|
||||||
btn.performClick();
|
btn.performClick();
|
||||||
|
|
|
@ -16,13 +16,13 @@ import com.github.mikephil.charting.data.ChartData;
|
||||||
import com.github.mikephil.charting.data.LineData;
|
import com.github.mikephil.charting.data.LineData;
|
||||||
import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
|
import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
|
||||||
import net.osmand.plus.helpers.GpxUiHelper;
|
import net.osmand.plus.helpers.GpxUiHelper;
|
||||||
import net.osmand.plus.helpers.GpxUiHelper.OrderedLineDataSet;
|
|
||||||
import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetAxisType;
|
import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetAxisType;
|
||||||
|
import net.osmand.plus.helpers.GpxUiHelper.OrderedLineDataSet;
|
||||||
import net.osmand.plus.mapcontextmenu.other.HorizontalSelectionAdapter;
|
import net.osmand.plus.mapcontextmenu.other.HorizontalSelectionAdapter;
|
||||||
import net.osmand.plus.measurementtool.MeasurementToolFragment.OnUpdateAdditionalInfoListener;
|
import net.osmand.plus.measurementtool.MeasurementToolFragment.OnUpdateAdditionalInfoListener;
|
||||||
import net.osmand.plus.routepreparationmenu.RouteDetailsFragment;
|
import net.osmand.plus.routepreparationmenu.RouteDetailsFragment;
|
||||||
|
@ -30,16 +30,16 @@ import net.osmand.plus.routepreparationmenu.cards.BaseCard;
|
||||||
import net.osmand.router.RouteSegmentResult;
|
import net.osmand.router.RouteSegmentResult;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import static net.osmand.router.RouteStatisticsHelper.RouteStatistics;
|
|
||||||
import static net.osmand.GPXUtilities.GPXTrackAnalysis;
|
|
||||||
import static net.osmand.GPXUtilities.GPXFile;
|
|
||||||
import static net.osmand.plus.mapcontextmenu.other.HorizontalSelectionAdapter.HorizontalSelectionItem;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static net.osmand.GPXUtilities.GPXFile;
|
||||||
|
import static net.osmand.GPXUtilities.GPXTrackAnalysis;
|
||||||
|
import static net.osmand.plus.mapcontextmenu.other.HorizontalSelectionAdapter.HorizontalSelectionItem;
|
||||||
|
import static net.osmand.router.RouteStatisticsHelper.RouteStatistics;
|
||||||
|
|
||||||
public class GraphsCard extends BaseCard implements OnUpdateAdditionalInfoListener {
|
public class GraphsCard extends BaseCard implements OnUpdateAdditionalInfoListener {
|
||||||
|
|
||||||
private static String GRAPH_DATA_GPX_FILE_NAME = "graph_data_tmp";
|
private static String GRAPH_DATA_GPX_FILE_NAME = "graph_data_tmp";
|
||||||
|
@ -254,7 +254,7 @@ public class GraphsCard extends BaseCard implements OnUpdateAdditionalInfoListen
|
||||||
List<RouteStatistics> routeStatistics = calculateRouteStatistics(routeSegments);
|
List<RouteStatistics> routeStatistics = calculateRouteStatistics(routeSegments);
|
||||||
if (analysis != null && routeStatistics != null) {
|
if (analysis != null && routeStatistics != null) {
|
||||||
for (RouteStatistics statistics : routeStatistics) {
|
for (RouteStatistics statistics : routeStatistics) {
|
||||||
String title = SettingsBaseActivity.getStringRouteInfoPropertyValue(app, statistics.name);
|
String title = AndroidUtils.getStringRouteInfoPropertyValue(app, statistics.name);
|
||||||
BarData data = null;
|
BarData data = null;
|
||||||
if (!Algorithms.isEmpty(statistics.elements)) {
|
if (!Algorithms.isEmpty(statistics.elements)) {
|
||||||
data = GpxUiHelper.buildStatisticChart(
|
data = GpxUiHelper.buildStatisticChart(
|
||||||
|
|
|
@ -81,12 +81,12 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
||||||
super(app);
|
super(app);
|
||||||
OsmandSettings set = app.getSettings();
|
OsmandSettings set = app.getSettings();
|
||||||
ApplicationMode.regWidgetVisibility("parking", (ApplicationMode[]) null);
|
ApplicationMode.regWidgetVisibility("parking", (ApplicationMode[]) null);
|
||||||
parkingLat = set.registerFloatPreference(PARKING_POINT_LAT, 0f).makeGlobal();
|
parkingLat = set.registerFloatPreference(PARKING_POINT_LAT, 0f).makeGlobal().makeShared();
|
||||||
parkingLon = set.registerFloatPreference(PARKING_POINT_LON, 0f).makeGlobal();
|
parkingLon = set.registerFloatPreference(PARKING_POINT_LON, 0f).makeGlobal().makeShared();
|
||||||
parkingType = set.registerBooleanPreference(PARKING_TYPE, false).makeGlobal();
|
parkingType = set.registerBooleanPreference(PARKING_TYPE, false).makeGlobal().makeShared();
|
||||||
parkingEvent = set.registerBooleanPreference(PARKING_EVENT_ADDED, false).makeGlobal();
|
parkingEvent = set.registerBooleanPreference(PARKING_EVENT_ADDED, false).makeGlobal().makeShared();
|
||||||
parkingTime = set.registerLongPreference(PARKING_TIME, -1).makeGlobal();
|
parkingTime = set.registerLongPreference(PARKING_TIME, -1).makeGlobal().makeShared();
|
||||||
parkingStartTime = set.registerLongPreference(PARKING_START_TIME, -1).makeGlobal();
|
parkingStartTime = set.registerLongPreference(PARKING_START_TIME, -1).makeGlobal().makeShared();
|
||||||
parkingPosition = constructParkingPosition();
|
parkingPosition = constructParkingPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ import net.osmand.plus.settings.backend.CommonPreference;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
|
||||||
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
|
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
|
||||||
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
|
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
|
||||||
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithCompoundButton;
|
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithCompoundButton;
|
||||||
|
@ -222,7 +221,7 @@ public class AvoidRoadsBottomSheetDialogFragment extends MenuBottomSheetDialogFr
|
||||||
if (parameter != null) {
|
if (parameter != null) {
|
||||||
defValue = parameter.getName();
|
defValue = parameter.getName();
|
||||||
}
|
}
|
||||||
String parameterName = SettingsBaseActivity.getRoutingStringPropertyName(app, parameterId, defValue);
|
String parameterName = AndroidUtils.getRoutingStringPropertyName(app, parameterId, defValue);
|
||||||
|
|
||||||
final BottomSheetItemWithCompoundButton[] item = new BottomSheetItemWithCompoundButton[1];
|
final BottomSheetItemWithCompoundButton[] item = new BottomSheetItemWithCompoundButton[1];
|
||||||
item[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder()
|
item[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder()
|
||||||
|
|
|
@ -62,7 +62,6 @@ import net.osmand.plus.TargetPointsHelper;
|
||||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
|
||||||
import net.osmand.plus.activities.actions.AppModeDialog;
|
import net.osmand.plus.activities.actions.AppModeDialog;
|
||||||
import net.osmand.plus.activities.actions.OsmAndDialogs;
|
import net.osmand.plus.activities.actions.OsmAndDialogs;
|
||||||
import net.osmand.plus.base.ContextMenuFragment.MenuState;
|
import net.osmand.plus.base.ContextMenuFragment.MenuState;
|
||||||
|
@ -1303,7 +1302,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
||||||
final OsmandSettings settings = mapActivity.getMyApplication().getSettings();
|
final OsmandSettings settings = mapActivity.getMyApplication().getSettings();
|
||||||
for (int i = 0; i < avoidedParameters.size(); i++) {
|
for (int i = 0; i < avoidedParameters.size(); i++) {
|
||||||
final RoutingParameter routingParameter = avoidedParameters.get(i);
|
final RoutingParameter routingParameter = avoidedParameters.get(i);
|
||||||
final View container = createToolbarSubOptionView(false, SettingsBaseActivity.getRoutingStringPropertyName(app, routingParameter.getId(), routingParameter.getName()), R.drawable.ic_action_remove_dark, i == avoidedParameters.size() - 1, new OnClickListener() {
|
final View container = createToolbarSubOptionView(false, AndroidUtils.getRoutingStringPropertyName(app, routingParameter.getId(), routingParameter.getName()), R.drawable.ic_action_remove_dark, i == avoidedParameters.size() - 1, new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
OsmandApplication app = getApp();
|
OsmandApplication app = getApp();
|
||||||
|
|
|
@ -16,13 +16,11 @@ import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.appcompat.widget.AppCompatCheckedTextView;
|
import androidx.appcompat.widget.AppCompatCheckedTextView;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.CallbackWithObject;
|
import net.osmand.CallbackWithObject;
|
||||||
import net.osmand.GPXUtilities;
|
|
||||||
import net.osmand.GPXUtilities.WptPt;
|
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.Location;
|
import net.osmand.Location;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
import net.osmand.plus.ContextMenuAdapter;
|
||||||
import net.osmand.plus.ContextMenuItem;
|
import net.osmand.plus.ContextMenuItem;
|
||||||
import net.osmand.plus.DialogListItemAdapter;
|
import net.osmand.plus.DialogListItemAdapter;
|
||||||
|
@ -35,7 +33,6 @@ import net.osmand.plus.TargetPointsHelper;
|
||||||
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
|
||||||
import net.osmand.plus.dashboard.DashboardOnMap;
|
import net.osmand.plus.dashboard.DashboardOnMap;
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
import net.osmand.plus.download.DownloadActivity;
|
||||||
import net.osmand.plus.download.DownloadActivityType;
|
import net.osmand.plus.download.DownloadActivityType;
|
||||||
|
@ -45,7 +42,6 @@ import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
|
||||||
import net.osmand.plus.routing.RouteProvider.RouteService;
|
import net.osmand.plus.routing.RouteProvider.RouteService;
|
||||||
import net.osmand.plus.routing.RoutingHelper;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
|
||||||
import net.osmand.plus.voice.JSMediaCommandPlayerImpl;
|
import net.osmand.plus.voice.JSMediaCommandPlayerImpl;
|
||||||
import net.osmand.plus.voice.JSTTSCommandPlayerImpl;
|
import net.osmand.plus.voice.JSTTSCommandPlayerImpl;
|
||||||
import net.osmand.plus.voice.MediaCommandPlayerImpl;
|
import net.osmand.plus.voice.MediaCommandPlayerImpl;
|
||||||
|
@ -57,7 +53,6 @@ import net.osmand.util.MapUtils;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -666,7 +661,7 @@ public class RoutingOptionsHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getText(MapActivity mapActivity) {
|
public String getText(MapActivity mapActivity) {
|
||||||
return SettingsBaseActivity.getRoutingStringPropertyName(mapActivity, routingParameter.getId(),
|
return AndroidUtils.getRoutingStringPropertyName(mapActivity, routingParameter.getId(),
|
||||||
routingParameter.getName());
|
routingParameter.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -730,7 +725,7 @@ public class RoutingOptionsHelper {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getText(MapActivity mapActivity) {
|
public String getText(MapActivity mapActivity) {
|
||||||
return SettingsBaseActivity.getRoutingStringPropertyName(mapActivity, groupName,
|
return AndroidUtils.getRoutingStringPropertyName(mapActivity, groupName,
|
||||||
Algorithms.capitalizeFirstLetterAndLowercase(groupName.replace('_', ' ')));
|
Algorithms.capitalizeFirstLetterAndLowercase(groupName.replace('_', ' ')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,11 @@ import com.github.mikephil.charting.data.Entry;
|
||||||
import com.github.mikephil.charting.highlight.Highlight;
|
import com.github.mikephil.charting.highlight.Highlight;
|
||||||
import com.github.mikephil.charting.listener.OnChartValueSelectedListener;
|
import com.github.mikephil.charting.listener.OnChartValueSelectedListener;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.GPXUtilities.GPXTrackAnalysis;
|
import net.osmand.GPXUtilities.GPXTrackAnalysis;
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
|
||||||
import net.osmand.plus.activities.SettingsNavigationActivity;
|
|
||||||
import net.osmand.plus.helpers.GpxUiHelper;
|
import net.osmand.plus.helpers.GpxUiHelper;
|
||||||
import net.osmand.router.RouteStatisticsHelper.RouteSegmentAttribute;
|
import net.osmand.router.RouteStatisticsHelper.RouteSegmentAttribute;
|
||||||
import net.osmand.router.RouteStatisticsHelper.RouteStatistics;
|
import net.osmand.router.RouteStatisticsHelper.RouteStatistics;
|
||||||
|
@ -127,7 +126,7 @@ public class RouteInfoCard extends BaseCard {
|
||||||
|
|
||||||
private void updateHeader() {
|
private void updateHeader() {
|
||||||
TextView title = (TextView) view.findViewById(R.id.info_type_title);
|
TextView title = (TextView) view.findViewById(R.id.info_type_title);
|
||||||
String name = SettingsBaseActivity.getStringRouteInfoPropertyValue(app, routeStatistics.name);
|
String name = AndroidUtils.getStringRouteInfoPropertyValue(app, routeStatistics.name);
|
||||||
title.setText(name);
|
title.setText(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +147,7 @@ public class RouteInfoCard extends BaseCard {
|
||||||
legendIcon.setBackgroundResource(nightMode ? R.drawable.circle_contour_bg_dark : R.drawable.circle_contour_bg_light);
|
legendIcon.setBackgroundResource(nightMode ? R.drawable.circle_contour_bg_dark : R.drawable.circle_contour_bg_light);
|
||||||
}
|
}
|
||||||
String propertyName = segment.getUserPropertyName();
|
String propertyName = segment.getUserPropertyName();
|
||||||
String name = SettingsNavigationActivity.getStringPropertyName(app, propertyName, propertyName.replaceAll("_", " "));
|
String name = AndroidUtils.getRenderingStringPropertyName(app, propertyName, propertyName.replaceAll("_", " "));
|
||||||
Spannable text = getSpanLegend(name, segment, segment.getUserPropertyName().equals(selectedPropertyName));
|
Spannable text = getSpanLegend(name, segment, segment.getUserPropertyName().equals(selectedPropertyName));
|
||||||
TextView legend = (TextView) view.findViewById(R.id.legend_text);
|
TextView legend = (TextView) view.findViewById(R.id.legend_text);
|
||||||
legend.setText(text);
|
legend.setText(text);
|
||||||
|
|
|
@ -22,6 +22,7 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
|
|
||||||
private boolean cache;
|
private boolean cache;
|
||||||
private boolean global;
|
private boolean global;
|
||||||
|
private boolean shared;
|
||||||
|
|
||||||
|
|
||||||
public CommonPreference(OsmandSettings settings, String id, T defaultValue) {
|
public CommonPreference(OsmandSettings settings, String id, T defaultValue) {
|
||||||
|
@ -71,6 +72,11 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final CommonPreference<T> makeShared() {
|
||||||
|
shared = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
protected final Object getPreferences() {
|
protected final Object getPreferences() {
|
||||||
return settings.getPreferences(global);
|
return settings.getPreferences(global);
|
||||||
|
|
||||||
|
@ -200,6 +206,10 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
return global;
|
return global;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final boolean isShared() {
|
||||||
|
return shared;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO final
|
// TODO final
|
||||||
@Override
|
@Override
|
||||||
public boolean writeToJson(JSONObject json, ApplicationMode appMode) throws JSONException {
|
public boolean writeToJson(JSONObject json, ApplicationMode appMode) throws JSONException {
|
||||||
|
|
|
@ -9,5 +9,6 @@ public enum ExportSettingsType {
|
||||||
CUSTOM_ROUTING,
|
CUSTOM_ROUTING,
|
||||||
AVOID_ROADS,
|
AVOID_ROADS,
|
||||||
TRACKS,
|
TRACKS,
|
||||||
MULTIMEDIA_NOTES
|
MULTIMEDIA_NOTES,
|
||||||
|
GLOBAL
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandPlugin;
|
import net.osmand.plus.OsmandPlugin;
|
||||||
import net.osmand.plus.Version;
|
import net.osmand.plus.Version;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
|
||||||
import net.osmand.plus.activities.TrackActivity;
|
import net.osmand.plus.activities.TrackActivity;
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
import net.osmand.plus.download.DownloadActivity;
|
||||||
import net.osmand.plus.helpers.WaypointHelper;
|
import net.osmand.plus.helpers.WaypointHelper;
|
||||||
|
@ -174,9 +173,6 @@ public class OsmAndAppCustomization {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activities
|
// Activities
|
||||||
public Class<? extends Activity> getSettingsActivity() {
|
|
||||||
return SettingsActivity.class;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Class<MapActivity> getMapActivity() {
|
public Class<MapActivity> getMapActivity() {
|
||||||
return MapActivity.class;
|
return MapActivity.class;
|
||||||
|
|
|
@ -641,7 +641,7 @@ public class OsmandSettings {
|
||||||
public static final String NUMBER_OF_FREE_DOWNLOADS_ID = "free_downloads_v3";
|
public static final String NUMBER_OF_FREE_DOWNLOADS_ID = "free_downloads_v3";
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
private final OsmandPreference<String> PLUGINS = new StringPreference(this, "enabled_plugins", MapillaryPlugin.ID).makeGlobal();
|
private final OsmandPreference<String> PLUGINS = new StringPreference(this, "enabled_plugins", MapillaryPlugin.ID).makeGlobal().makeShared();
|
||||||
|
|
||||||
public Set<String> getEnabledPlugins() {
|
public Set<String> getEnabledPlugins() {
|
||||||
String plugs = PLUGINS.get();
|
String plugs = PLUGINS.get();
|
||||||
|
@ -689,49 +689,49 @@ public class OsmandSettings {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final CommonPreference<RulerMode> RULER_MODE = new EnumStringPreference<>(this, "ruler_mode", RulerMode.FIRST, RulerMode.values()).makeGlobal();
|
public final CommonPreference<RulerMode> RULER_MODE = new EnumStringPreference<>(this, "ruler_mode", RulerMode.FIRST, RulerMode.values()).makeGlobal().makeShared();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> SHOW_COMPASS_CONTROL_RULER = new BooleanPreference(this, "show_compass_ruler", true).makeGlobal();
|
public final OsmandPreference<Boolean> SHOW_COMPASS_CONTROL_RULER = new BooleanPreference(this, "show_compass_ruler", true).makeGlobal().makeShared();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> SHOW_LINES_TO_FIRST_MARKERS = new BooleanPreference(this, "show_lines_to_first_markers", false).makeProfile();
|
public final CommonPreference<Boolean> SHOW_LINES_TO_FIRST_MARKERS = new BooleanPreference(this, "show_lines_to_first_markers", false).makeProfile();
|
||||||
public final CommonPreference<Boolean> SHOW_ARROWS_TO_FIRST_MARKERS = new BooleanPreference(this, "show_arrows_to_first_markers", false).makeProfile();
|
public final CommonPreference<Boolean> SHOW_ARROWS_TO_FIRST_MARKERS = new BooleanPreference(this, "show_arrows_to_first_markers", false).makeProfile();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> WIKI_ARTICLE_SHOW_IMAGES_ASKED = new BooleanPreference(this, "wikivoyage_show_images_asked", false).makeGlobal();
|
public final CommonPreference<Boolean> WIKI_ARTICLE_SHOW_IMAGES_ASKED = new BooleanPreference(this, "wikivoyage_show_images_asked", false).makeGlobal();
|
||||||
public final CommonPreference<WikiArticleShowImages> WIKI_ARTICLE_SHOW_IMAGES = new EnumStringPreference<>(this, "wikivoyage_show_imgs", WikiArticleShowImages.OFF, WikiArticleShowImages.values()).makeGlobal();
|
public final CommonPreference<WikiArticleShowImages> WIKI_ARTICLE_SHOW_IMAGES = new EnumStringPreference<>(this, "wikivoyage_show_imgs", WikiArticleShowImages.OFF, WikiArticleShowImages.values()).makeGlobal().makeShared();
|
||||||
public final CommonPreference<Boolean> GLOBAL_WIKIPEDIA_POI_ENABLED = new BooleanPreference(this, "global_wikipedia_poi_enabled", false).makeProfile();
|
public final CommonPreference<Boolean> GLOBAL_WIKIPEDIA_POI_ENABLED = new BooleanPreference(this, "global_wikipedia_poi_enabled", false).makeProfile();
|
||||||
public final ListStringPreference WIKIPEDIA_POI_ENABLED_LANGUAGES = (ListStringPreference) new ListStringPreference(this, "wikipedia_poi_enabled_languages", null, ",").makeProfile().cache();
|
public final ListStringPreference WIKIPEDIA_POI_ENABLED_LANGUAGES = (ListStringPreference) new ListStringPreference(this, "wikipedia_poi_enabled_languages", null, ",").makeProfile().cache();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> SELECT_MARKER_ON_SINGLE_TAP = new BooleanPreference(this, "select_marker_on_single_tap", false).makeProfile();
|
public final CommonPreference<Boolean> SELECT_MARKER_ON_SINGLE_TAP = new BooleanPreference(this, "select_marker_on_single_tap", false).makeProfile();
|
||||||
public final CommonPreference<Boolean> KEEP_PASSED_MARKERS_ON_MAP = new BooleanPreference(this, "keep_passed_markers_on_map", true).makeProfile();
|
public final CommonPreference<Boolean> KEEP_PASSED_MARKERS_ON_MAP = new BooleanPreference(this, "keep_passed_markers_on_map", true).makeProfile();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> COORDS_INPUT_USE_RIGHT_SIDE = new BooleanPreference(this, "coords_input_use_right_side", true).makeGlobal();
|
public final CommonPreference<Boolean> COORDS_INPUT_USE_RIGHT_SIDE = new BooleanPreference(this, "coords_input_use_right_side", true).makeGlobal().makeShared();
|
||||||
public final OsmandPreference<Format> COORDS_INPUT_FORMAT = new EnumStringPreference<>(this, "coords_input_format", Format.DD_MM_MMM, Format.values()).makeGlobal();
|
public final OsmandPreference<Format> COORDS_INPUT_FORMAT = new EnumStringPreference<>(this, "coords_input_format", Format.DD_MM_MMM, Format.values()).makeGlobal().makeShared();
|
||||||
public final CommonPreference<Boolean> COORDS_INPUT_USE_OSMAND_KEYBOARD = new BooleanPreference(this, "coords_input_use_osmand_keyboard", Build.VERSION.SDK_INT >= 16).makeGlobal();
|
public final CommonPreference<Boolean> COORDS_INPUT_USE_OSMAND_KEYBOARD = new BooleanPreference(this, "coords_input_use_osmand_keyboard", Build.VERSION.SDK_INT >= 16).makeGlobal().makeShared();
|
||||||
public final CommonPreference<Boolean> COORDS_INPUT_TWO_DIGITS_LONGTITUDE = new BooleanPreference(this, "coords_input_two_digits_longitude", false).makeGlobal();
|
public final CommonPreference<Boolean> COORDS_INPUT_TWO_DIGITS_LONGTITUDE = new BooleanPreference(this, "coords_input_two_digits_longitude", false).makeGlobal().makeShared();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> USE_MAPILLARY_FILTER = new BooleanPreference(this, "use_mapillary_filters", false).makeGlobal();
|
public final CommonPreference<Boolean> USE_MAPILLARY_FILTER = new BooleanPreference(this, "use_mapillary_filters", false).makeGlobal().makeShared();
|
||||||
public final CommonPreference<String> MAPILLARY_FILTER_USER_KEY = new StringPreference(this, "mapillary_filter_user_key", "").makeGlobal();
|
public final CommonPreference<String> MAPILLARY_FILTER_USER_KEY = new StringPreference(this, "mapillary_filter_user_key", "").makeGlobal().makeShared();
|
||||||
public final CommonPreference<String> MAPILLARY_FILTER_USERNAME = new StringPreference(this, "mapillary_filter_username", "").makeGlobal();
|
public final CommonPreference<String> MAPILLARY_FILTER_USERNAME = new StringPreference(this, "mapillary_filter_username", "").makeGlobal().makeShared();
|
||||||
public final CommonPreference<Long> MAPILLARY_FILTER_FROM_DATE = new LongPreference(this, "mapillary_filter_from_date", 0).makeGlobal();
|
public final CommonPreference<Long> MAPILLARY_FILTER_FROM_DATE = new LongPreference(this, "mapillary_filter_from_date", 0).makeGlobal().makeShared();
|
||||||
public final CommonPreference<Long> MAPILLARY_FILTER_TO_DATE = new LongPreference(this, "mapillary_filter_to_date", 0).makeGlobal();
|
public final CommonPreference<Long> MAPILLARY_FILTER_TO_DATE = new LongPreference(this, "mapillary_filter_to_date", 0).makeGlobal().makeShared();
|
||||||
public final CommonPreference<Boolean> MAPILLARY_FILTER_PANO = new BooleanPreference(this, "mapillary_filter_pano", false).makeGlobal();
|
public final CommonPreference<Boolean> MAPILLARY_FILTER_PANO = new BooleanPreference(this, "mapillary_filter_pano", false).makeGlobal().makeShared();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> USE_FAST_RECALCULATION = new BooleanPreference(this, "use_fast_recalculation", true).makeProfile().cache();
|
public final CommonPreference<Boolean> USE_FAST_RECALCULATION = new BooleanPreference(this, "use_fast_recalculation", true).makeProfile().cache();
|
||||||
public final CommonPreference<Boolean> FORCE_PRIVATE_ACCESS_ROUTING_ASKED = new BooleanPreference(this, "force_private_access_routing", false).makeProfile().cache();
|
public final CommonPreference<Boolean> FORCE_PRIVATE_ACCESS_ROUTING_ASKED = new BooleanPreference(this, "force_private_access_routing", false).makeProfile().cache();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> SHOW_CARD_TO_CHOOSE_DRAWER = new BooleanPreference(this, "show_card_to_choose_drawer", false).makeGlobal();
|
public final CommonPreference<Boolean> SHOW_CARD_TO_CHOOSE_DRAWER = new BooleanPreference(this, "show_card_to_choose_drawer", false).makeGlobal().makeShared();
|
||||||
public final CommonPreference<Boolean> SHOW_DASHBOARD_ON_START = new BooleanPreference(this, "should_show_dashboard_on_start", false).makeGlobal();
|
public final CommonPreference<Boolean> SHOW_DASHBOARD_ON_START = new BooleanPreference(this, "should_show_dashboard_on_start", false).makeGlobal().makeShared();
|
||||||
public final CommonPreference<Boolean> SHOW_DASHBOARD_ON_MAP_SCREEN = new BooleanPreference(this, "show_dashboard_on_map_screen", false).makeGlobal();
|
public final CommonPreference<Boolean> SHOW_DASHBOARD_ON_MAP_SCREEN = new BooleanPreference(this, "show_dashboard_on_map_screen", false).makeGlobal().makeShared();
|
||||||
public final CommonPreference<Boolean> SHOW_OSMAND_WELCOME_SCREEN = new BooleanPreference(this, "show_osmand_welcome_screen", true).makeGlobal();
|
public final CommonPreference<Boolean> SHOW_OSMAND_WELCOME_SCREEN = new BooleanPreference(this, "show_osmand_welcome_screen", true).makeGlobal();
|
||||||
|
|
||||||
public final CommonPreference<String> API_NAV_DRAWER_ITEMS_JSON = new StringPreference(this, "api_nav_drawer_items_json", "{}").makeGlobal();
|
public final CommonPreference<String> API_NAV_DRAWER_ITEMS_JSON = new StringPreference(this, "api_nav_drawer_items_json", "{}").makeGlobal().makeShared();
|
||||||
public final CommonPreference<String> API_CONNECTED_APPS_JSON = new StringPreference(this, "api_connected_apps_json", "[]").makeGlobal();
|
public final CommonPreference<String> API_CONNECTED_APPS_JSON = new StringPreference(this, "api_connected_apps_json", "[]").makeGlobal().makeShared();
|
||||||
public final CommonPreference<String> NAV_DRAWER_LOGO = new StringPreference(this, "drawer_logo", "").makeProfile();
|
public final CommonPreference<String> NAV_DRAWER_LOGO = new StringPreference(this, "drawer_logo", "").makeProfile();
|
||||||
public final CommonPreference<String> NAV_DRAWER_URL = new StringPreference(this, "drawer_url", "").makeProfile();
|
public final CommonPreference<String> NAV_DRAWER_URL = new StringPreference(this, "drawer_url", "").makeProfile();
|
||||||
|
|
||||||
public final CommonPreference<Integer> NUMBER_OF_STARTS_FIRST_XMAS_SHOWN = new IntPreference(this, "number_of_starts_first_xmas_shown", 0).makeGlobal();
|
public final CommonPreference<Integer> NUMBER_OF_STARTS_FIRST_XMAS_SHOWN = new IntPreference(this, "number_of_starts_first_xmas_shown", 0).makeGlobal();
|
||||||
|
|
||||||
public final OsmandPreference<String> AVAILABLE_APP_MODES = new StringPreference(this, "available_application_modes", "car,bicycle,pedestrian,public_transport,").makeGlobal().cache();
|
public final OsmandPreference<String> AVAILABLE_APP_MODES = new StringPreference(this, "available_application_modes", "car,bicycle,pedestrian,public_transport,").makeGlobal().makeShared().cache();
|
||||||
|
|
||||||
public final OsmandPreference<String> LAST_FAV_CATEGORY_ENTERED = new StringPreference(this, "last_fav_category", "").makeGlobal();
|
public final OsmandPreference<String> LAST_FAV_CATEGORY_ENTERED = new StringPreference(this, "last_fav_category", "").makeGlobal();
|
||||||
|
|
||||||
|
@ -779,7 +779,7 @@ public class OsmandSettings {
|
||||||
public ApplicationMode parseString(String s) {
|
public ApplicationMode parseString(String s) {
|
||||||
return appModeFromString(s);
|
return appModeFromString(s);
|
||||||
}
|
}
|
||||||
}.makeGlobal();
|
}.makeGlobal().makeShared();
|
||||||
|
|
||||||
public final OsmandPreference<ApplicationMode> LAST_ROUTE_APPLICATION_MODE = new CommonPreference<ApplicationMode>(this, "last_route_application_mode_backup_string", ApplicationMode.DEFAULT) {
|
public final OsmandPreference<ApplicationMode> LAST_ROUTE_APPLICATION_MODE = new CommonPreference<ApplicationMode>(this, "last_route_application_mode_backup_string", ApplicationMode.DEFAULT) {
|
||||||
|
|
||||||
|
@ -1043,13 +1043,13 @@ public class OsmandSettings {
|
||||||
public final OsmandPreference<Boolean> USE_KALMAN_FILTER_FOR_COMPASS = new BooleanPreference(this, "use_kalman_filter_compass", true).makeProfile().cache();
|
public final OsmandPreference<Boolean> USE_KALMAN_FILTER_FOR_COMPASS = new BooleanPreference(this, "use_kalman_filter_compass", true).makeProfile().cache();
|
||||||
public final OsmandPreference<Boolean> USE_VOLUME_BUTTONS_AS_ZOOM = new BooleanPreference(this, "use_volume_buttons_as_zoom", false).makeProfile().cache();
|
public final OsmandPreference<Boolean> USE_VOLUME_BUTTONS_AS_ZOOM = new BooleanPreference(this, "use_volume_buttons_as_zoom", false).makeProfile().cache();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> DO_NOT_SHOW_STARTUP_MESSAGES = new BooleanPreference(this, "do_not_show_startup_messages", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> DO_NOT_SHOW_STARTUP_MESSAGES = new BooleanPreference(this, "do_not_show_startup_messages", false).makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Boolean> SHOW_DOWNLOAD_MAP_DIALOG = new BooleanPreference(this, "show_download_map_dialog", true).makeGlobal().cache();
|
public final OsmandPreference<Boolean> SHOW_DOWNLOAD_MAP_DIALOG = new BooleanPreference(this, "show_download_map_dialog", true).makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Boolean> DO_NOT_USE_ANIMATIONS = new BooleanPreference(this, "do_not_use_animations", false).makeProfile().cache();
|
public final OsmandPreference<Boolean> DO_NOT_USE_ANIMATIONS = new BooleanPreference(this, "do_not_use_animations", false).makeProfile().cache();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> SEND_ANONYMOUS_MAP_DOWNLOADS_DATA = new BooleanPreference(this, "send_anonymous_map_downloads_data", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> SEND_ANONYMOUS_MAP_DOWNLOADS_DATA = new BooleanPreference(this, "send_anonymous_map_downloads_data", false).makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Boolean> SEND_ANONYMOUS_APP_USAGE_DATA = new BooleanPreference(this, "send_anonymous_app_usage_data", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> SEND_ANONYMOUS_APP_USAGE_DATA = new BooleanPreference(this, "send_anonymous_app_usage_data", false).makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Boolean> SEND_ANONYMOUS_DATA_REQUEST_PROCESSED = new BooleanPreference(this, "send_anonymous_data_request_processed", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> SEND_ANONYMOUS_DATA_REQUEST_PROCESSED = new BooleanPreference(this, "send_anonymous_data_request_processed", false).makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Integer> SEND_ANONYMOUS_DATA_REQUESTS_COUNT = new IntPreference(this, "send_anonymous_data_requests_count", 0).makeGlobal().cache();
|
public final OsmandPreference<Integer> SEND_ANONYMOUS_DATA_REQUESTS_COUNT = new IntPreference(this, "send_anonymous_data_requests_count", 0).makeGlobal().cache();
|
||||||
public final OsmandPreference<Integer> SEND_ANONYMOUS_DATA_LAST_REQUEST_NS = new IntPreference(this, "send_anonymous_data_last_request_ns", -1).makeGlobal().cache();
|
public final OsmandPreference<Integer> SEND_ANONYMOUS_DATA_LAST_REQUEST_NS = new IntPreference(this, "send_anonymous_data_last_request_ns", -1).makeGlobal().cache();
|
||||||
|
|
||||||
|
@ -1073,21 +1073,21 @@ public class OsmandSettings {
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> SHOW_MAPILLARY = new BooleanPreference(this, "show_mapillary", false).makeProfile();
|
public final OsmandPreference<Boolean> SHOW_MAPILLARY = new BooleanPreference(this, "show_mapillary", false).makeProfile();
|
||||||
public final OsmandPreference<Boolean> MAPILLARY_FIRST_DIALOG_SHOWN = new BooleanPreference(this, "mapillary_first_dialog_shown", false).makeGlobal();
|
public final OsmandPreference<Boolean> MAPILLARY_FIRST_DIALOG_SHOWN = new BooleanPreference(this, "mapillary_first_dialog_shown", false).makeGlobal();
|
||||||
public final OsmandPreference<Boolean> ONLINE_PHOTOS_ROW_COLLAPSED = new BooleanPreference(this, "mapillary_menu_collapsed", true).makeGlobal();
|
public final OsmandPreference<Boolean> ONLINE_PHOTOS_ROW_COLLAPSED = new BooleanPreference(this, "mapillary_menu_collapsed", true).makeGlobal().makeShared();
|
||||||
public final OsmandPreference<Boolean> WEBGL_SUPPORTED = new BooleanPreference(this, "webgl_supported", true).makeGlobal();
|
public final OsmandPreference<Boolean> WEBGL_SUPPORTED = new BooleanPreference(this, "webgl_supported", true).makeGlobal();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<String> PREFERRED_LOCALE = new StringPreference(this, "preferred_locale", "").makeGlobal();
|
public final OsmandPreference<String> PREFERRED_LOCALE = new StringPreference(this, "preferred_locale", "").makeGlobal().makeShared();
|
||||||
|
|
||||||
public final OsmandPreference<String> MAP_PREFERRED_LOCALE = new StringPreference(this, "map_preferred_locale", "").makeGlobal().cache();
|
public final OsmandPreference<String> MAP_PREFERRED_LOCALE = new StringPreference(this, "map_preferred_locale", "").makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Boolean> MAP_TRANSLITERATE_NAMES = new BooleanPreference(this, "map_transliterate_names", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> MAP_TRANSLITERATE_NAMES = new BooleanPreference(this, "map_transliterate_names", false).makeGlobal().makeShared().cache();
|
||||||
|
|
||||||
public boolean usingEnglishNames() {
|
public boolean usingEnglishNames() {
|
||||||
return MAP_PREFERRED_LOCALE.get().equals("en");
|
return MAP_PREFERRED_LOCALE.get().equals("en");
|
||||||
}
|
}
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<String> USER_NAME = new StringPreference(this, "user_name", "").makeGlobal();
|
public final OsmandPreference<String> USER_NAME = new StringPreference(this, "user_name", "").makeGlobal().makeShared();
|
||||||
|
|
||||||
public static final String BILLING_USER_DONATION_WORLD_PARAMETER = "";
|
public static final String BILLING_USER_DONATION_WORLD_PARAMETER = "";
|
||||||
public static final String BILLING_USER_DONATION_NONE_PARAMETER = "none";
|
public static final String BILLING_USER_DONATION_NONE_PARAMETER = "none";
|
||||||
|
@ -1119,11 +1119,11 @@ public class OsmandSettings {
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<String> USER_OSM_BUG_NAME =
|
public final OsmandPreference<String> USER_OSM_BUG_NAME =
|
||||||
new StringPreference(this, "user_osm_bug_name", "NoName/OsmAnd").makeGlobal();
|
new StringPreference(this, "user_osm_bug_name", "NoName/OsmAnd").makeGlobal().makeShared();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<String> USER_PASSWORD =
|
public final OsmandPreference<String> USER_PASSWORD =
|
||||||
new StringPreference(this, "user_password", "").makeGlobal();
|
new StringPreference(this, "user_password", "").makeGlobal().makeShared();
|
||||||
|
|
||||||
public final OsmandPreference<String> USER_ACCESS_TOKEN =
|
public final OsmandPreference<String> USER_ACCESS_TOKEN =
|
||||||
new StringPreference(this, "user_access_token", "").makeGlobal();
|
new StringPreference(this, "user_access_token", "").makeGlobal();
|
||||||
|
@ -1132,7 +1132,7 @@ public class OsmandSettings {
|
||||||
new StringPreference(this, "user_access_token_secret", "").makeGlobal();
|
new StringPreference(this, "user_access_token_secret", "").makeGlobal();
|
||||||
|
|
||||||
// this value boolean is synchronized with settings_pref.xml preference offline POI/Bugs edition
|
// this value boolean is synchronized with settings_pref.xml preference offline POI/Bugs edition
|
||||||
public final OsmandPreference<Boolean> OFFLINE_EDITION = new BooleanPreference(this, "offline_osm_editing", true).makeGlobal();
|
public final OsmandPreference<Boolean> OFFLINE_EDITION = new BooleanPreference(this, "offline_osm_editing", true).makeGlobal().makeShared();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final CommonPreference<DayNightMode> DAYNIGHT_MODE =
|
public final CommonPreference<DayNightMode> DAYNIGHT_MODE =
|
||||||
|
@ -1170,7 +1170,7 @@ public class OsmandSettings {
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}.makeGlobal().cache();
|
}.makeGlobal().makeShared().cache();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> SNAP_TO_ROAD = new BooleanPreference(this, "snap_to_road", false).makeProfile().cache();
|
public final CommonPreference<Boolean> SNAP_TO_ROAD = new BooleanPreference(this, "snap_to_road", false).makeProfile().cache();
|
||||||
|
|
||||||
|
@ -1190,10 +1190,10 @@ public class OsmandSettings {
|
||||||
}
|
}
|
||||||
return valueSaved;
|
return valueSaved;
|
||||||
}
|
}
|
||||||
}.makeGlobal();
|
}.makeGlobal().makeShared();
|
||||||
|
|
||||||
public final CommonPreference<String> PROXY_HOST = new StringPreference(this, "proxy_host", "127.0.0.1").makeGlobal();
|
public final CommonPreference<String> PROXY_HOST = new StringPreference(this, "proxy_host", "127.0.0.1").makeGlobal().makeShared();
|
||||||
public final CommonPreference<Integer> PROXY_PORT = new IntPreference(this, "proxy_port", 8118).makeGlobal();
|
public final CommonPreference<Integer> PROXY_PORT = new IntPreference(this, "proxy_port", 8118).makeGlobal().makeShared();
|
||||||
public final CommonPreference<String> USER_ANDROID_ID = new StringPreference(this, "user_android_id", "").makeGlobal();
|
public final CommonPreference<String> USER_ANDROID_ID = new StringPreference(this, "user_android_id", "").makeGlobal();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
|
@ -1202,7 +1202,7 @@ public class OsmandSettings {
|
||||||
public final CommonPreference<Boolean> SAVE_GLOBAL_TRACK_TO_GPX = new BooleanPreference(this, "save_global_track_to_gpx", false).makeGlobal().cache();
|
public final CommonPreference<Boolean> SAVE_GLOBAL_TRACK_TO_GPX = new BooleanPreference(this, "save_global_track_to_gpx", false).makeGlobal().cache();
|
||||||
public final CommonPreference<Integer> SAVE_GLOBAL_TRACK_INTERVAL = new IntPreference(this, "save_global_track_interval", 5000).makeProfile().cache();
|
public final CommonPreference<Integer> SAVE_GLOBAL_TRACK_INTERVAL = new IntPreference(this, "save_global_track_interval", 5000).makeProfile().cache();
|
||||||
public final CommonPreference<Boolean> SAVE_GLOBAL_TRACK_REMEMBER = new BooleanPreference(this, "save_global_track_remember", false).makeProfile().cache();
|
public final CommonPreference<Boolean> SAVE_GLOBAL_TRACK_REMEMBER = new BooleanPreference(this, "save_global_track_remember", false).makeProfile().cache();
|
||||||
public final CommonPreference<Boolean> SHOW_SAVED_TRACK_REMEMBER = new BooleanPreference(this, "show_saved_track_remember", true).makeGlobal();
|
public final CommonPreference<Boolean> SHOW_SAVED_TRACK_REMEMBER = new BooleanPreference(this, "show_saved_track_remember", true).makeGlobal().makeShared();
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final CommonPreference<Boolean> SAVE_TRACK_TO_GPX = new BooleanPreference(this, "save_track_to_gpx", false).makeProfile().cache();
|
public final CommonPreference<Boolean> SAVE_TRACK_TO_GPX = new BooleanPreference(this, "save_track_to_gpx", false).makeProfile().cache();
|
||||||
|
|
||||||
|
@ -1258,7 +1258,7 @@ public class OsmandSettings {
|
||||||
SHOW_LANES.setModeDefaultValue(ApplicationMode.BICYCLE, true);
|
SHOW_LANES.setModeDefaultValue(ApplicationMode.BICYCLE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> SHOW_WPT = new BooleanPreference(this, "show_gpx_wpt", true).makeGlobal().cache();
|
public final OsmandPreference<Boolean> SHOW_WPT = new BooleanPreference(this, "show_gpx_wpt", true).makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Boolean> SHOW_NEARBY_FAVORITES = new BooleanPreference(this, "show_nearby_favorites", false).makeProfile().cache();
|
public final OsmandPreference<Boolean> SHOW_NEARBY_FAVORITES = new BooleanPreference(this, "show_nearby_favorites", false).makeProfile().cache();
|
||||||
public final OsmandPreference<Boolean> SHOW_NEARBY_POI = new BooleanPreference(this, "show_nearby_poi", false).makeProfile().cache();
|
public final OsmandPreference<Boolean> SHOW_NEARBY_POI = new BooleanPreference(this, "show_nearby_poi", false).makeProfile().cache();
|
||||||
|
|
||||||
|
@ -1278,8 +1278,8 @@ public class OsmandSettings {
|
||||||
public final OsmandPreference<Boolean> SPEAK_SPEED_CAMERA = new BooleanPreference(this, "speak_cameras", false).makeProfile().cache();
|
public final OsmandPreference<Boolean> SPEAK_SPEED_CAMERA = new BooleanPreference(this, "speak_cameras", false).makeProfile().cache();
|
||||||
public final OsmandPreference<Boolean> SPEAK_TUNNELS = new BooleanPreference(this, "speak_tunnels", false).makeProfile().cache();
|
public final OsmandPreference<Boolean> SPEAK_TUNNELS = new BooleanPreference(this, "speak_tunnels", false).makeProfile().cache();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> SPEED_CAMERAS_UNINSTALLED = new BooleanPreference(this, "speed_cameras_uninstalled", false).makeGlobal();
|
public final OsmandPreference<Boolean> SPEED_CAMERAS_UNINSTALLED = new BooleanPreference(this, "speed_cameras_uninstalled", false).makeGlobal().makeShared();
|
||||||
public final OsmandPreference<Boolean> SPEED_CAMERAS_ALERT_SHOWED = new BooleanPreference(this, "speed_cameras_alert_showed", false).makeGlobal();
|
public final OsmandPreference<Boolean> SPEED_CAMERAS_ALERT_SHOWED = new BooleanPreference(this, "speed_cameras_alert_showed", false).makeGlobal().makeShared();
|
||||||
|
|
||||||
public Set<String> getForbiddenTypes() {
|
public Set<String> getForbiddenTypes() {
|
||||||
Set<String> typeNames = new HashSet<>();
|
Set<String> typeNames = new HashSet<>();
|
||||||
|
@ -1325,10 +1325,10 @@ public class OsmandSettings {
|
||||||
}
|
}
|
||||||
}.makeProfile().cache();
|
}.makeProfile().cache();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> GPX_ROUTE_CALC_OSMAND_PARTS = new BooleanPreference(this, "gpx_routing_calculate_osmand_route", true).makeGlobal().cache();
|
public final OsmandPreference<Boolean> GPX_ROUTE_CALC_OSMAND_PARTS = new BooleanPreference(this, "gpx_routing_calculate_osmand_route", true).makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Boolean> GPX_CALCULATE_RTEPT = new BooleanPreference(this, "gpx_routing_calculate_rtept", true).makeGlobal().cache();
|
public final OsmandPreference<Boolean> GPX_CALCULATE_RTEPT = new BooleanPreference(this, "gpx_routing_calculate_rtept", true).makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Boolean> GPX_ROUTE_CALC = new BooleanPreference(this, "calc_gpx_route", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> GPX_ROUTE_CALC = new BooleanPreference(this, "calc_gpx_route", false).makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Boolean> SHOW_START_FINISH_ICONS = new BooleanPreference(this, "show_start_finish_icons", true).makeGlobal().cache();
|
public final OsmandPreference<Boolean> SHOW_START_FINISH_ICONS = new BooleanPreference(this, "show_start_finish_icons", true).makeGlobal().makeShared().cache();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> AVOID_TOLL_ROADS = new BooleanPreference(this, "avoid_toll_roads", false).makeProfile().cache();
|
public final OsmandPreference<Boolean> AVOID_TOLL_ROADS = new BooleanPreference(this, "avoid_toll_roads", false).makeProfile().cache();
|
||||||
public final OsmandPreference<Boolean> AVOID_MOTORWAY = new BooleanPreference(this, "avoid_motorway", false).makeProfile().cache();
|
public final OsmandPreference<Boolean> AVOID_MOTORWAY = new BooleanPreference(this, "avoid_motorway", false).makeProfile().cache();
|
||||||
|
@ -1339,11 +1339,11 @@ public class OsmandSettings {
|
||||||
|
|
||||||
public final OsmandPreference<Long> LAST_UPDATES_CARD_REFRESH = new LongPreference(this, "last_updates_card_refresh", 0).makeGlobal();
|
public final OsmandPreference<Long> LAST_UPDATES_CARD_REFRESH = new LongPreference(this, "last_updates_card_refresh", 0).makeGlobal();
|
||||||
|
|
||||||
public final CommonPreference<Integer> CURRENT_TRACK_COLOR = new IntPreference(this, "current_track_color", 0).makeGlobal().cache();
|
public final CommonPreference<Integer> CURRENT_TRACK_COLOR = new IntPreference(this, "current_track_color", 0).makeGlobal().makeShared().cache();
|
||||||
public final CommonPreference<String> CURRENT_TRACK_WIDTH = new StringPreference(this, "current_track_width", "").makeGlobal().cache();
|
public final CommonPreference<String> CURRENT_TRACK_WIDTH = new StringPreference(this, "current_track_width", "").makeGlobal().makeShared().cache();
|
||||||
public final CommonPreference<Boolean> CURRENT_TRACK_SHOW_ARROWS = new BooleanPreference(this, "current_track_show_arrows", false).makeGlobal().cache();
|
public final CommonPreference<Boolean> CURRENT_TRACK_SHOW_ARROWS = new BooleanPreference(this, "current_track_show_arrows", false).makeGlobal().makeShared().cache();
|
||||||
public final CommonPreference<Boolean> CURRENT_TRACK_SHOW_START_FINISH = new BooleanPreference(this, "current_track_show_start_finish", true).makeGlobal().cache();
|
public final CommonPreference<Boolean> CURRENT_TRACK_SHOW_START_FINISH = new BooleanPreference(this, "current_track_show_start_finish", true).makeGlobal().makeShared().cache();
|
||||||
public final ListStringPreference CUSTOM_TRACK_COLORS = (ListStringPreference) new ListStringPreference(this, "custom_track_colors", null, ",").makeGlobal();
|
public final ListStringPreference CUSTOM_TRACK_COLORS = (ListStringPreference) new ListStringPreference(this, "custom_track_colors", null, ",").makeShared().makeGlobal();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final CommonPreference<Integer> SAVE_TRACK_INTERVAL = new IntPreference(this, "save_track_interval", 5000).makeProfile();
|
public final CommonPreference<Integer> SAVE_TRACK_INTERVAL = new IntPreference(this, "save_track_interval", 5000).makeProfile();
|
||||||
|
@ -1390,7 +1390,7 @@ public class OsmandSettings {
|
||||||
public final CommonPreference<String> LIVE_MONITORING_URL = new StringPreference(this, "live_monitoring_url",
|
public final CommonPreference<String> LIVE_MONITORING_URL = new StringPreference(this, "live_monitoring_url",
|
||||||
"https://example.com?lat={0}&lon={1}×tamp={2}&hdop={3}&altitude={4}&speed={5}").makeProfile();
|
"https://example.com?lat={0}&lon={1}×tamp={2}&hdop={3}&altitude={4}&speed={5}").makeProfile();
|
||||||
|
|
||||||
public final CommonPreference<String> GPS_STATUS_APP = new StringPreference(this, "gps_status_app", "").makeGlobal();
|
public final CommonPreference<String> GPS_STATUS_APP = new StringPreference(this, "gps_status_app", "").makeGlobal().makeShared();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<Boolean> SHOW_OSM_BUGS = new BooleanPreference(this, "show_osm_bugs", false).makeProfile().cache();
|
public final OsmandPreference<Boolean> SHOW_OSM_BUGS = new BooleanPreference(this, "show_osm_bugs", false).makeProfile().cache();
|
||||||
|
@ -1410,7 +1410,7 @@ public class OsmandSettings {
|
||||||
|
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<Boolean> DEBUG_RENDERING_INFO = new BooleanPreference(this, "debug_rendering", false).makeGlobal();
|
public final OsmandPreference<Boolean> DEBUG_RENDERING_INFO = new BooleanPreference(this, "debug_rendering", false).makeGlobal().makeShared();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<Boolean> SHOW_FAVORITES = new BooleanPreference(this, "show_favorites", true).makeProfile().cache();
|
public final OsmandPreference<Boolean> SHOW_FAVORITES = new BooleanPreference(this, "show_favorites", true).makeProfile().cache();
|
||||||
|
@ -1422,7 +1422,7 @@ public class OsmandSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Json
|
// Json
|
||||||
public final OsmandPreference<String> SELECTED_GPX = new StringPreference(this, "selected_gpx", "").makeGlobal();
|
public final OsmandPreference<String> SELECTED_GPX = new StringPreference(this, "selected_gpx", "").makeGlobal().makeShared();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<Integer> MAP_SCREEN_ORIENTATION =
|
public final OsmandPreference<Integer> MAP_SCREEN_ORIENTATION =
|
||||||
|
@ -1544,13 +1544,13 @@ public class OsmandSettings {
|
||||||
|
|
||||||
{
|
{
|
||||||
// 1500 ms delay works for most configurations to establish a BT SCO link
|
// 1500 ms delay works for most configurations to establish a BT SCO link
|
||||||
VOICE_PROMPT_DELAY[0] = new IntPreference(this, "voice_prompt_delay_0", 1500).makeGlobal().cache(); /*AudioManager.STREAM_VOICE_CALL*/
|
VOICE_PROMPT_DELAY[0] = new IntPreference(this, "voice_prompt_delay_0", 1500).makeGlobal().makeShared().cache(); /*AudioManager.STREAM_VOICE_CALL*/
|
||||||
// On most devices sound output works pomptly so usually no voice prompt delay needed
|
// On most devices sound output works pomptly so usually no voice prompt delay needed
|
||||||
VOICE_PROMPT_DELAY[3] = new IntPreference(this, "voice_prompt_delay_3", 0).makeGlobal().cache(); /*AudioManager.STREAM_MUSIC*/
|
VOICE_PROMPT_DELAY[3] = new IntPreference(this, "voice_prompt_delay_3", 0).makeGlobal().makeShared().cache(); /*AudioManager.STREAM_MUSIC*/
|
||||||
VOICE_PROMPT_DELAY[5] = new IntPreference(this, "voice_prompt_delay_5", 0).makeGlobal().cache(); /*AudioManager.STREAM_NOTIFICATION*/
|
VOICE_PROMPT_DELAY[5] = new IntPreference(this, "voice_prompt_delay_5", 0).makeGlobal().makeShared().cache(); /*AudioManager.STREAM_NOTIFICATION*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> DISPLAY_TTS_UTTERANCE = new BooleanPreference(this, "display_tts_utterance", false).makeGlobal();
|
public final OsmandPreference<Boolean> DISPLAY_TTS_UTTERANCE = new BooleanPreference(this, "display_tts_utterance", false).makeGlobal().makeShared();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final CommonPreference<Boolean> MAP_ONLINE_DATA = new BooleanPreference(this, "map_online_data", false).makeProfile();
|
public final CommonPreference<Boolean> MAP_ONLINE_DATA = new BooleanPreference(this, "map_online_data", false).makeProfile();
|
||||||
|
@ -1598,7 +1598,7 @@ public class OsmandSettings {
|
||||||
|
|
||||||
public CommonPreference<String> PREVIOUS_INSTALLED_VERSION = new StringPreference(this, "previous_installed_version", "").makeGlobal();
|
public CommonPreference<String> PREVIOUS_INSTALLED_VERSION = new StringPreference(this, "previous_installed_version", "").makeGlobal();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> SHOULD_SHOW_FREE_VERSION_BANNER = new BooleanPreference(this, "should_show_free_version_banner", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> SHOULD_SHOW_FREE_VERSION_BANNER = new BooleanPreference(this, "should_show_free_version_banner", false).makeGlobal().makeShared().cache();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> MARKERS_DISTANCE_INDICATION_ENABLED = new BooleanPreference(this, "markers_distance_indication_enabled", true).makeProfile();
|
public final OsmandPreference<Boolean> MARKERS_DISTANCE_INDICATION_ENABLED = new BooleanPreference(this, "markers_distance_indication_enabled", true).makeProfile();
|
||||||
|
|
||||||
|
@ -1626,8 +1626,8 @@ public class OsmandSettings {
|
||||||
|
|
||||||
public final OsmandPreference<Integer> EXTERNAL_INPUT_DEVICE = new IntPreference(this, "external_input_device", 0).makeProfile();
|
public final OsmandPreference<Integer> EXTERNAL_INPUT_DEVICE = new IntPreference(this, "external_input_device", 0).makeProfile();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> ROUTE_MAP_MARKERS_START_MY_LOC = new BooleanPreference(this, "route_map_markers_start_my_loc", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> ROUTE_MAP_MARKERS_START_MY_LOC = new BooleanPreference(this, "route_map_markers_start_my_loc", false).makeGlobal().makeShared().cache();
|
||||||
public final OsmandPreference<Boolean> ROUTE_MAP_MARKERS_ROUND_TRIP = new BooleanPreference(this, "route_map_markers_round_trip", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> ROUTE_MAP_MARKERS_ROUND_TRIP = new BooleanPreference(this, "route_map_markers_round_trip", false).makeGlobal().makeShared().cache();
|
||||||
|
|
||||||
public ITileSource getMapTileSource(boolean warnWhenSelected) {
|
public ITileSource getMapTileSource(boolean warnWhenSelected) {
|
||||||
String tileName = MAP_TILE_SOURCES.get();
|
String tileName = MAP_TILE_SOURCES.get();
|
||||||
|
@ -2329,9 +2329,9 @@ public class OsmandSettings {
|
||||||
|
|
||||||
public final CommonPreference<Boolean> QUICK_ACTION = new BooleanPreference(this, "quick_action_state", false).makeProfile();
|
public final CommonPreference<Boolean> QUICK_ACTION = new BooleanPreference(this, "quick_action_state", false).makeProfile();
|
||||||
|
|
||||||
public final CommonPreference<String> QUICK_ACTION_LIST = new StringPreference(this, "quick_action_list", "").makeGlobal();
|
public final CommonPreference<String> QUICK_ACTION_LIST = new StringPreference(this, "quick_action_list", "").makeGlobal().makeShared();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> IS_QUICK_ACTION_TUTORIAL_SHOWN = new BooleanPreference(this, "quick_action_tutorial", false).makeGlobal();
|
public final CommonPreference<Boolean> IS_QUICK_ACTION_TUTORIAL_SHOWN = new BooleanPreference(this, "quick_action_tutorial", false).makeGlobal().makeShared();
|
||||||
|
|
||||||
private final CommonPreference<Integer> QUICK_ACTION_FAB_MARGIN_X_PORTRAIT = new IntPreference(this, QUICK_FAB_MARGIN_X_PORTRAIT_MARGIN, 0).makeProfile();
|
private final CommonPreference<Integer> QUICK_ACTION_FAB_MARGIN_X_PORTRAIT = new IntPreference(this, QUICK_FAB_MARGIN_X_PORTRAIT_MARGIN, 0).makeProfile();
|
||||||
private final CommonPreference<Integer> QUICK_ACTION_FAB_MARGIN_Y_PORTRAIT = new IntPreference(this, QUICK_FAB_MARGIN_Y_PORTRAIT_MARGIN, 0).makeProfile();
|
private final CommonPreference<Integer> QUICK_ACTION_FAB_MARGIN_Y_PORTRAIT = new IntPreference(this, QUICK_FAB_MARGIN_Y_PORTRAIT_MARGIN, 0).makeProfile();
|
||||||
|
@ -2620,13 +2620,13 @@ public class OsmandSettings {
|
||||||
public final OsmandPreference<Boolean> MAP_ACTIVITY_ENABLED = new BooleanPreference(this, "map_activity_enabled", false).makeGlobal();
|
public final OsmandPreference<Boolean> MAP_ACTIVITY_ENABLED = new BooleanPreference(this, "map_activity_enabled", false).makeGlobal();
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<Boolean> SAFE_MODE = new BooleanPreference(this, "safe_mode", false).makeGlobal();
|
public final OsmandPreference<Boolean> SAFE_MODE = new BooleanPreference(this, "safe_mode", false).makeGlobal().makeShared();
|
||||||
public final OsmandPreference<Boolean> PT_SAFE_MODE = new BooleanPreference(this, "pt_safe_mode", false).makeProfile();
|
public final OsmandPreference<Boolean> PT_SAFE_MODE = new BooleanPreference(this, "pt_safe_mode", false).makeProfile();
|
||||||
public final OsmandPreference<Boolean> NATIVE_RENDERING_FAILED = new BooleanPreference(this, "native_rendering_failed_init", false).makeGlobal();
|
public final OsmandPreference<Boolean> NATIVE_RENDERING_FAILED = new BooleanPreference(this, "native_rendering_failed_init", false).makeGlobal();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> USE_OPENGL_RENDER = new BooleanPreference(this, "use_opengl_render",
|
public final OsmandPreference<Boolean> USE_OPENGL_RENDER = new BooleanPreference(this, "use_opengl_render",
|
||||||
false /*Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH*/
|
false /*Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH*/
|
||||||
).makeGlobal().cache();
|
).makeGlobal().makeShared().cache();
|
||||||
|
|
||||||
public final OsmandPreference<Boolean> OPENGL_RENDER_FAILED = new BooleanPreference(this, "opengl_render_failed", false).makeGlobal().cache();
|
public final OsmandPreference<Boolean> OPENGL_RENDER_FAILED = new BooleanPreference(this, "opengl_render_failed", false).makeGlobal().cache();
|
||||||
|
|
||||||
|
@ -2639,7 +2639,7 @@ public class OsmandSettings {
|
||||||
public final OsmandPreference<Boolean> FOLLOW_THE_ROUTE = new BooleanPreference(this, "follow_to_route", false).makeGlobal();
|
public final OsmandPreference<Boolean> FOLLOW_THE_ROUTE = new BooleanPreference(this, "follow_to_route", false).makeGlobal();
|
||||||
public final OsmandPreference<String> FOLLOW_THE_GPX_ROUTE = new StringPreference(this, "follow_gpx", null).makeGlobal();
|
public final OsmandPreference<String> FOLLOW_THE_GPX_ROUTE = new StringPreference(this, "follow_gpx", null).makeGlobal();
|
||||||
|
|
||||||
public final OsmandPreference<String> SELECTED_TRAVEL_BOOK = new StringPreference(this, "selected_travel_book", "").makeGlobal();
|
public final OsmandPreference<String> SELECTED_TRAVEL_BOOK = new StringPreference(this, "selected_travel_book", "").makeGlobal().makeShared();
|
||||||
|
|
||||||
public final ListStringPreference DISPLAYED_TRANSPORT_SETTINGS = (ListStringPreference)
|
public final ListStringPreference DISPLAYED_TRANSPORT_SETTINGS = (ListStringPreference)
|
||||||
new ListStringPreference(this, "displayed_transport_settings", null, ",").makeProfile();
|
new ListStringPreference(this, "displayed_transport_settings", null, ",").makeProfile();
|
||||||
|
@ -2658,7 +2658,7 @@ public class OsmandSettings {
|
||||||
|
|
||||||
// Live Updates
|
// Live Updates
|
||||||
public final OsmandPreference<Boolean> IS_LIVE_UPDATES_ON =
|
public final OsmandPreference<Boolean> IS_LIVE_UPDATES_ON =
|
||||||
new BooleanPreference(this, "is_live_updates_on", false).makeGlobal();
|
new BooleanPreference(this, "is_live_updates_on", false).makeGlobal().makeShared();
|
||||||
public final OsmandPreference<Integer> LIVE_UPDATES_RETRIES =
|
public final OsmandPreference<Integer> LIVE_UPDATES_RETRIES =
|
||||||
new IntPreference(this, "live_updates_retryes", 2).makeGlobal();
|
new IntPreference(this, "live_updates_retryes", 2).makeGlobal();
|
||||||
|
|
||||||
|
@ -2746,7 +2746,7 @@ public class OsmandSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final CommonPreference<Boolean> FLUORESCENT_OVERLAYS =
|
public final CommonPreference<Boolean> FLUORESCENT_OVERLAYS =
|
||||||
new BooleanPreference(this, "fluorescent_overlays", false).makeGlobal().cache();
|
new BooleanPreference(this, "fluorescent_overlays", false).makeGlobal().makeShared().cache();
|
||||||
|
|
||||||
|
|
||||||
// public final OsmandPreference<Integer> NUMBER_OF_FREE_DOWNLOADS_V2 = new IntPreference("free_downloads_v2", 0).makeGlobal();
|
// public final OsmandPreference<Integer> NUMBER_OF_FREE_DOWNLOADS_V2 = new IntPreference("free_downloads_v2", 0).makeGlobal();
|
||||||
|
@ -2767,7 +2767,7 @@ public class OsmandSettings {
|
||||||
new EnumStringPreference<>(this, "rate_us_state", RateUsState.INITIAL_STATE, RateUsState.values()).makeGlobal();
|
new EnumStringPreference<>(this, "rate_us_state", RateUsState.INITIAL_STATE, RateUsState.values()).makeGlobal();
|
||||||
|
|
||||||
public final CommonPreference<String> CUSTOM_APP_MODES_KEYS =
|
public final CommonPreference<String> CUSTOM_APP_MODES_KEYS =
|
||||||
new StringPreference(this, "custom_app_modes_keys", "").makeGlobal().cache();
|
new StringPreference(this, "custom_app_modes_keys", "").makeGlobal().makeShared().cache();
|
||||||
|
|
||||||
public Set<String> getCustomAppModesKeys() {
|
public Set<String> getCustomAppModesKeys() {
|
||||||
String appModesKeys = CUSTOM_APP_MODES_KEYS.get();
|
String appModesKeys = CUSTOM_APP_MODES_KEYS.get();
|
||||||
|
|
|
@ -6,6 +6,7 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.settings.backend.CommonPreference;
|
||||||
import net.osmand.plus.settings.backend.OsmandPreference;
|
import net.osmand.plus.settings.backend.OsmandPreference;
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||||
|
|
||||||
|
@ -47,8 +48,11 @@ public class GlobalSettingsItem extends OsmandSettingsItem {
|
||||||
return new OsmandSettingsItemReader<OsmandSettingsItem>(this, getSettings()) {
|
return new OsmandSettingsItemReader<OsmandSettingsItem>(this, getSettings()) {
|
||||||
@Override
|
@Override
|
||||||
protected void readPreferenceFromJson(@NonNull OsmandPreference<?> preference, @NonNull JSONObject json) throws JSONException {
|
protected void readPreferenceFromJson(@NonNull OsmandPreference<?> preference, @NonNull JSONObject json) throws JSONException {
|
||||||
|
if ((preference instanceof CommonPreference) && (((CommonPreference<?>) preference).isShared())
|
||||||
|
|| getSettings().APPLICATION_MODE.getId().equals(preference.getId())) {
|
||||||
preference.readFromJson(json, null);
|
preference.readFromJson(json, null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,8 +62,11 @@ public class GlobalSettingsItem extends OsmandSettingsItem {
|
||||||
return new OsmandSettingsItemWriter<OsmandSettingsItem>(this, getSettings()) {
|
return new OsmandSettingsItemWriter<OsmandSettingsItem>(this, getSettings()) {
|
||||||
@Override
|
@Override
|
||||||
protected void writePreferenceToJson(@NonNull OsmandPreference<?> preference, @NonNull JSONObject json) throws JSONException {
|
protected void writePreferenceToJson(@NonNull OsmandPreference<?> preference, @NonNull JSONObject json) throws JSONException {
|
||||||
|
if ((preference instanceof CommonPreference) && (((CommonPreference<?>) preference).isShared())
|
||||||
|
|| getSettings().APPLICATION_MODE.getId().equals(preference.getId())) {
|
||||||
preference.writeToJson(json, null);
|
preference.writeToJson(json, null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@ import net.osmand.plus.CustomOsmandPlugin;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandPlugin;
|
import net.osmand.plus.OsmandPlugin;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
|
import net.osmand.plus.settings.backend.ApplicationMode.ApplicationModeBean;
|
||||||
|
import net.osmand.plus.settings.backend.ApplicationMode.ApplicationModeBuilder;
|
||||||
import net.osmand.plus.settings.backend.OsmandPreference;
|
import net.osmand.plus.settings.backend.OsmandPreference;
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||||
import net.osmand.router.GeneralRouter;
|
import net.osmand.router.GeneralRouter;
|
||||||
|
@ -28,8 +30,8 @@ import java.util.Set;
|
||||||
public class ProfileSettingsItem extends OsmandSettingsItem {
|
public class ProfileSettingsItem extends OsmandSettingsItem {
|
||||||
|
|
||||||
private ApplicationMode appMode;
|
private ApplicationMode appMode;
|
||||||
private ApplicationMode.ApplicationModeBuilder builder;
|
private ApplicationModeBuilder builder;
|
||||||
private ApplicationMode.ApplicationModeBean modeBean;
|
private ApplicationModeBean modeBean;
|
||||||
|
|
||||||
private JSONObject additionalPrefsJson;
|
private JSONObject additionalPrefsJson;
|
||||||
private Set<String> appModeBeanPrefsIds;
|
private Set<String> appModeBeanPrefsIds;
|
||||||
|
@ -39,7 +41,7 @@ public class ProfileSettingsItem extends OsmandSettingsItem {
|
||||||
this.appMode = appMode;
|
this.appMode = appMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProfileSettingsItem(@NonNull OsmandApplication app, @Nullable ProfileSettingsItem baseItem, @NonNull ApplicationMode.ApplicationModeBean modeBean) {
|
public ProfileSettingsItem(@NonNull OsmandApplication app, @Nullable ProfileSettingsItem baseItem, @NonNull ApplicationModeBean modeBean) {
|
||||||
super(app.getSettings(), baseItem);
|
super(app.getSettings(), baseItem);
|
||||||
this.modeBean = modeBean;
|
this.modeBean = modeBean;
|
||||||
builder = ApplicationMode.fromModeBean(app, modeBean);
|
builder = ApplicationMode.fromModeBean(app, modeBean);
|
||||||
|
@ -66,7 +68,7 @@ public class ProfileSettingsItem extends OsmandSettingsItem {
|
||||||
return appMode;
|
return appMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApplicationMode.ApplicationModeBean getModeBean() {
|
public ApplicationModeBean getModeBean() {
|
||||||
return modeBean;
|
return modeBean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ import net.osmand.plus.helpers.GpxUiHelper.GPXInfo;
|
||||||
import net.osmand.plus.poi.PoiUIFilter;
|
import net.osmand.plus.poi.PoiUIFilter;
|
||||||
import net.osmand.plus.quickaction.QuickAction;
|
import net.osmand.plus.quickaction.QuickAction;
|
||||||
import net.osmand.plus.quickaction.QuickActionRegistry;
|
import net.osmand.plus.quickaction.QuickActionRegistry;
|
||||||
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode.ApplicationModeBean;
|
import net.osmand.plus.settings.backend.ApplicationMode.ApplicationModeBean;
|
||||||
import net.osmand.plus.settings.backend.ExportSettingsType;
|
import net.osmand.plus.settings.backend.ExportSettingsType;
|
||||||
|
|
||||||
|
@ -427,7 +428,7 @@ public class SettingsHelper {
|
||||||
return settingsItems;
|
return settingsItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<ExportSettingsType, List<?>> getAdditionalData() {
|
public Map<ExportSettingsType, List<?>> getAdditionalData(boolean globalExport) {
|
||||||
Map<ExportSettingsType, List<?>> dataList = new HashMap<>();
|
Map<ExportSettingsType, List<?>> dataList = new HashMap<>();
|
||||||
|
|
||||||
QuickActionRegistry registry = app.getQuickActionRegistry();
|
QuickActionRegistry registry = app.getQuickActionRegistry();
|
||||||
|
@ -505,6 +506,13 @@ public class SettingsHelper {
|
||||||
dataList.put(ExportSettingsType.TRACKS, files);
|
dataList.put(ExportSettingsType.TRACKS, files);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (globalExport) {
|
||||||
|
List<ApplicationModeBean> appModeBeans = new ArrayList<>();
|
||||||
|
for (ApplicationMode mode : ApplicationMode.allPossibleValues()) {
|
||||||
|
appModeBeans.add(mode.toModeBean());
|
||||||
|
}
|
||||||
|
dataList.put(ExportSettingsType.PROFILE, appModeBeans);
|
||||||
|
}
|
||||||
return dataList;
|
return dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -514,6 +522,7 @@ public class SettingsHelper {
|
||||||
List<PoiUIFilter> poiUIFilters = new ArrayList<>();
|
List<PoiUIFilter> poiUIFilters = new ArrayList<>();
|
||||||
List<ITileSource> tileSourceTemplates = new ArrayList<>();
|
List<ITileSource> tileSourceTemplates = new ArrayList<>();
|
||||||
List<AvoidRoadInfo> avoidRoads = new ArrayList<>();
|
List<AvoidRoadInfo> avoidRoads = new ArrayList<>();
|
||||||
|
List<ApplicationModeBean> appModeBeans = new ArrayList<>();
|
||||||
for (Object object : data) {
|
for (Object object : data) {
|
||||||
if (object instanceof QuickAction) {
|
if (object instanceof QuickAction) {
|
||||||
quickActions.add((QuickAction) object);
|
quickActions.add((QuickAction) object);
|
||||||
|
@ -529,6 +538,8 @@ public class SettingsHelper {
|
||||||
}
|
}
|
||||||
} else if (object instanceof AvoidRoadInfo) {
|
} else if (object instanceof AvoidRoadInfo) {
|
||||||
avoidRoads.add((AvoidRoadInfo) object);
|
avoidRoads.add((AvoidRoadInfo) object);
|
||||||
|
} else if (object instanceof ApplicationModeBean) {
|
||||||
|
appModeBeans.add((ApplicationModeBean) object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!quickActions.isEmpty()) {
|
if (!quickActions.isEmpty()) {
|
||||||
|
@ -543,6 +554,14 @@ public class SettingsHelper {
|
||||||
if (!avoidRoads.isEmpty()) {
|
if (!avoidRoads.isEmpty()) {
|
||||||
settingsItems.add(new AvoidRoadsSettingsItem(app, avoidRoads));
|
settingsItems.add(new AvoidRoadsSettingsItem(app, avoidRoads));
|
||||||
}
|
}
|
||||||
|
if (!appModeBeans.isEmpty()) {
|
||||||
|
for (ApplicationModeBean modeBean : appModeBeans) {
|
||||||
|
ApplicationMode mode = ApplicationMode.valueOfStringKey(modeBean.stringKey, null);
|
||||||
|
if (mode != null) {
|
||||||
|
settingsItems.add(new ProfileSettingsItem(app, mode));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return settingsItems;
|
return settingsItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -557,6 +576,7 @@ public class SettingsHelper {
|
||||||
List<File> multimediaFilesList = new ArrayList<>();
|
List<File> multimediaFilesList = new ArrayList<>();
|
||||||
List<File> tracksFilesList = new ArrayList<>();
|
List<File> tracksFilesList = new ArrayList<>();
|
||||||
List<AvoidRoadInfo> avoidRoads = new ArrayList<>();
|
List<AvoidRoadInfo> avoidRoads = new ArrayList<>();
|
||||||
|
List<GlobalSettingsItem> globalSettingsItems = new ArrayList<>();
|
||||||
for (SettingsItem item : settingsItems) {
|
for (SettingsItem item : settingsItems) {
|
||||||
switch (item.getType()) {
|
switch (item.getType()) {
|
||||||
case PROFILE:
|
case PROFILE:
|
||||||
|
@ -606,6 +626,9 @@ public class SettingsHelper {
|
||||||
avoidRoads.addAll(avoidRoadsItem.getItems());
|
avoidRoads.addAll(avoidRoadsItem.getItems());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case GLOBAL:
|
||||||
|
globalSettingsItems.add((GlobalSettingsItem) item);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -638,6 +661,9 @@ public class SettingsHelper {
|
||||||
if (!tracksFilesList.isEmpty()) {
|
if (!tracksFilesList.isEmpty()) {
|
||||||
settingsToOperate.put(ExportSettingsType.TRACKS, tracksFilesList);
|
settingsToOperate.put(ExportSettingsType.TRACKS, tracksFilesList);
|
||||||
}
|
}
|
||||||
|
if (!globalSettingsItems.isEmpty()) {
|
||||||
|
settingsToOperate.put(ExportSettingsType.GLOBAL, globalSettingsItems);
|
||||||
|
}
|
||||||
return settingsToOperate;
|
return settingsToOperate;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -436,7 +436,7 @@ public class ConfigureProfileFragment extends BaseSettingsFragment implements Co
|
||||||
ExportProfileBottomSheet.showInstance(
|
ExportProfileBottomSheet.showInstance(
|
||||||
fragmentManager,
|
fragmentManager,
|
||||||
this,
|
this,
|
||||||
getSelectedAppMode());
|
getSelectedAppMode(), false);
|
||||||
}
|
}
|
||||||
} else if (DELETE_PROFILE.equals(prefId)) {
|
} else if (DELETE_PROFILE.equals(prefId)) {
|
||||||
onDeleteProfileClick();
|
onDeleteProfileClick();
|
||||||
|
|
|
@ -31,6 +31,7 @@ import net.osmand.plus.render.RenderingIcons;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode.ApplicationModeBean;
|
import net.osmand.plus.settings.backend.ApplicationMode.ApplicationModeBean;
|
||||||
import net.osmand.plus.settings.backend.ExportSettingsType;
|
import net.osmand.plus.settings.backend.ExportSettingsType;
|
||||||
|
import net.osmand.plus.settings.backend.backup.GlobalSettingsItem;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
import net.osmand.view.ThreeStateCheckbox;
|
import net.osmand.view.ThreeStateCheckbox;
|
||||||
|
|
||||||
|
@ -262,6 +263,12 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter {
|
||||||
setupIcon(icon, R.drawable.ic_action_route_distance, itemSelected);
|
setupIcon(icon, R.drawable.ic_action_route_distance, itemSelected);
|
||||||
subText.setVisibility(View.GONE);
|
subText.setVisibility(View.GONE);
|
||||||
break;
|
break;
|
||||||
|
case GLOBAL:
|
||||||
|
String name = ((GlobalSettingsItem) currentItem).getPublicName(app);
|
||||||
|
title.setText(name);
|
||||||
|
setupIcon(icon, R.drawable.ic_action_settings, itemSelected);
|
||||||
|
subText.setVisibility(View.GONE);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
@ -338,6 +345,8 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter {
|
||||||
return R.string.shared_string_tracks;
|
return R.string.shared_string_tracks;
|
||||||
case MULTIMEDIA_NOTES:
|
case MULTIMEDIA_NOTES:
|
||||||
return R.string.audionotes_plugin_name;
|
return R.string.audionotes_plugin_name;
|
||||||
|
case GLOBAL:
|
||||||
|
return R.string.general_settings_2;
|
||||||
default:
|
default:
|
||||||
return R.string.access_empty_list;
|
return R.string.access_empty_list;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,17 +31,20 @@ import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
|
||||||
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithCompoundButton;
|
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithCompoundButton;
|
||||||
import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem;
|
import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem;
|
||||||
import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
|
import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
|
||||||
import net.osmand.plus.settings.backend.ExportSettingsType;
|
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
import net.osmand.plus.settings.backend.backup.SettingsHelper;
|
import net.osmand.plus.settings.backend.ExportSettingsType;
|
||||||
|
import net.osmand.plus.settings.backend.backup.GlobalSettingsItem;
|
||||||
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
|
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
|
||||||
|
import net.osmand.plus.settings.backend.backup.SettingsHelper.SettingsExportListener;
|
||||||
import net.osmand.plus.settings.backend.backup.SettingsItem;
|
import net.osmand.plus.settings.backend.backup.SettingsItem;
|
||||||
import net.osmand.plus.settings.bottomsheets.BasePreferenceBottomSheet;
|
import net.osmand.plus.settings.bottomsheets.BasePreferenceBottomSheet;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -52,37 +55,50 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet {
|
||||||
|
|
||||||
private static final Log LOG = PlatformUtil.getLog(ExportProfileBottomSheet.class);
|
private static final Log LOG = PlatformUtil.getLog(ExportProfileBottomSheet.class);
|
||||||
|
|
||||||
private static final String INCLUDE_ADDITIONAL_DATA_KEY = "INCLUDE_ADDITIONAL_DATA_KEY";
|
private static final String GLOBAL_EXPORT_KEY = "global_export_key";
|
||||||
|
private static final String EXPORT_START_TIME_KEY = "export_start_time_key";
|
||||||
private static final String EXPORTING_PROFILE_KEY = "exporting_profile_key";
|
private static final String EXPORTING_PROFILE_KEY = "exporting_profile_key";
|
||||||
|
private static final String INCLUDE_ADDITIONAL_DATA_KEY = "include_additional_data_key";
|
||||||
|
private static final String INCLUDE_GLOBAL_SETTINGS_KEY = "include_global_settings_key";
|
||||||
|
|
||||||
|
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd-MM-yy");
|
||||||
|
|
||||||
private OsmandApplication app;
|
private OsmandApplication app;
|
||||||
private ApplicationMode profile;
|
|
||||||
private Map<ExportSettingsType, List<?>> dataList = new HashMap<>();
|
private Map<ExportSettingsType, List<?>> dataList = new HashMap<>();
|
||||||
private ExportImportSettingsAdapter adapter;
|
private ExportImportSettingsAdapter adapter;
|
||||||
|
|
||||||
private SettingsHelper.SettingsExportListener exportListener;
|
private SettingsExportListener exportListener;
|
||||||
private ProgressDialog progress;
|
private ProgressDialog progress;
|
||||||
|
|
||||||
private boolean includeAdditionalData = false;
|
private long exportStartTime;
|
||||||
|
|
||||||
|
private boolean globalExport = false;
|
||||||
private boolean exportingProfile = false;
|
private boolean exportingProfile = false;
|
||||||
|
private boolean includeAdditionalData = false;
|
||||||
|
private boolean includeGlobalSettings = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
app = requiredMyApplication();
|
app = requiredMyApplication();
|
||||||
profile = getAppMode();
|
|
||||||
dataList = app.getSettingsHelper().getAdditionalData();
|
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
includeAdditionalData = savedInstanceState.getBoolean(INCLUDE_ADDITIONAL_DATA_KEY);
|
globalExport = savedInstanceState.getBoolean(GLOBAL_EXPORT_KEY);
|
||||||
exportingProfile = savedInstanceState.getBoolean(EXPORTING_PROFILE_KEY);
|
exportingProfile = savedInstanceState.getBoolean(EXPORTING_PROFILE_KEY);
|
||||||
|
includeAdditionalData = savedInstanceState.getBoolean(INCLUDE_ADDITIONAL_DATA_KEY);
|
||||||
|
includeGlobalSettings = savedInstanceState.getBoolean(INCLUDE_GLOBAL_SETTINGS_KEY);
|
||||||
|
exportStartTime = savedInstanceState.getLong(EXPORT_START_TIME_KEY);
|
||||||
}
|
}
|
||||||
|
dataList = app.getSettingsHelper().getAdditionalData(globalExport);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSaveInstanceState(Bundle outState) {
|
public void onSaveInstanceState(Bundle outState) {
|
||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
outState.putBoolean(INCLUDE_ADDITIONAL_DATA_KEY, includeAdditionalData);
|
outState.putBoolean(GLOBAL_EXPORT_KEY, globalExport);
|
||||||
outState.putBoolean(EXPORTING_PROFILE_KEY, exportingProfile);
|
outState.putBoolean(EXPORTING_PROFILE_KEY, exportingProfile);
|
||||||
|
outState.putBoolean(INCLUDE_ADDITIONAL_DATA_KEY, includeAdditionalData);
|
||||||
|
outState.putBoolean(INCLUDE_GLOBAL_SETTINGS_KEY, includeGlobalSettings);
|
||||||
|
outState.putLong(EXPORT_START_TIME_KEY, exportStartTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -91,16 +107,33 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet {
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LayoutInflater inflater = UiUtilities.getInflater(app, nightMode);
|
if (globalExport) {
|
||||||
|
items.add(new TitleItem(getString(R.string.shared_string_export)));
|
||||||
|
|
||||||
|
final BottomSheetItemWithCompoundButton[] globalSettingsItem = new BottomSheetItemWithCompoundButton[1];
|
||||||
|
globalSettingsItem[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder()
|
||||||
|
.setChecked(includeGlobalSettings)
|
||||||
|
.setTitle(getString(R.string.general_settings_2))
|
||||||
|
.setLayoutId(R.layout.bottom_sheet_item_with_switch_no_icon)
|
||||||
|
.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
boolean checked = !globalSettingsItem[0].isChecked();
|
||||||
|
globalSettingsItem[0].setChecked(checked);
|
||||||
|
includeGlobalSettings = checked;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.create();
|
||||||
|
items.add(globalSettingsItem[0]);
|
||||||
|
} else {
|
||||||
|
items.add(new TitleItem(getString(R.string.export_profile)));
|
||||||
|
ApplicationMode profile = getAppMode();
|
||||||
int profileColor = profile.getIconColorInfo().getColor(nightMode);
|
int profileColor = profile.getIconColorInfo().getColor(nightMode);
|
||||||
int colorNoAlpha = ContextCompat.getColor(context, profileColor);
|
int colorNoAlpha = ContextCompat.getColor(context, profileColor);
|
||||||
|
|
||||||
Drawable backgroundIcon = UiUtilities.getColoredSelectableDrawable(context, colorNoAlpha, 0.3f);
|
Drawable backgroundIcon = UiUtilities.getColoredSelectableDrawable(context, colorNoAlpha, 0.3f);
|
||||||
Drawable[] layers = {new ColorDrawable(UiUtilities.getColorWithAlpha(colorNoAlpha, 0.10f)), backgroundIcon};
|
Drawable[] layers = {new ColorDrawable(UiUtilities.getColorWithAlpha(colorNoAlpha, 0.10f)), backgroundIcon};
|
||||||
|
|
||||||
items.add(new TitleItem(getString(R.string.export_profile)));
|
|
||||||
|
|
||||||
BaseBottomSheetItem profileItem = new BottomSheetItemWithCompoundButton.Builder()
|
BaseBottomSheetItem profileItem = new BottomSheetItemWithCompoundButton.Builder()
|
||||||
.setChecked(true)
|
.setChecked(true)
|
||||||
.setCompoundButtonColorId(profileColor)
|
.setCompoundButtonColorId(profileColor)
|
||||||
|
@ -112,11 +145,17 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet {
|
||||||
.setLayoutId(R.layout.preference_profile_item_with_radio_btn)
|
.setLayoutId(R.layout.preference_profile_item_with_radio_btn)
|
||||||
.create();
|
.create();
|
||||||
items.add(profileItem);
|
items.add(profileItem);
|
||||||
|
}
|
||||||
|
setupAdditionalItems();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupAdditionalItems() {
|
||||||
if (!dataList.isEmpty()) {
|
if (!dataList.isEmpty()) {
|
||||||
final View additionalDataView = inflater.inflate(R.layout.bottom_sheet_item_additional_data, null);
|
LayoutInflater inflater = UiUtilities.getInflater(app, nightMode);
|
||||||
|
View additionalDataView = inflater.inflate(R.layout.bottom_sheet_item_additional_data, null);
|
||||||
ExpandableListView listView = additionalDataView.findViewById(R.id.list);
|
ExpandableListView listView = additionalDataView.findViewById(R.id.list);
|
||||||
adapter = new ExportImportSettingsAdapter(app, nightMode, false);
|
adapter = new ExportImportSettingsAdapter(app, nightMode, false);
|
||||||
|
|
||||||
View listHeader = inflater.inflate(R.layout.item_header_export_expand_list, null);
|
View listHeader = inflater.inflate(R.layout.item_header_export_expand_list, null);
|
||||||
final View topSwitchDivider = listHeader.findViewById(R.id.topSwitchDivider);
|
final View topSwitchDivider = listHeader.findViewById(R.id.topSwitchDivider);
|
||||||
final View bottomSwitchDivider = listHeader.findViewById(R.id.bottomSwitchDivider);
|
final View bottomSwitchDivider = listHeader.findViewById(R.id.bottomSwitchDivider);
|
||||||
|
@ -130,7 +169,7 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet {
|
||||||
topSwitchDivider.setVisibility(includeAdditionalData ? View.VISIBLE : View.GONE);
|
topSwitchDivider.setVisibility(includeAdditionalData ? View.VISIBLE : View.GONE);
|
||||||
bottomSwitchDivider.setVisibility(includeAdditionalData ? View.VISIBLE : View.GONE);
|
bottomSwitchDivider.setVisibility(includeAdditionalData ? View.VISIBLE : View.GONE);
|
||||||
if (includeAdditionalData) {
|
if (includeAdditionalData) {
|
||||||
adapter.updateSettingsList(app.getSettingsHelper().getAdditionalData());
|
adapter.updateSettingsList(app.getSettingsHelper().getAdditionalData(globalExport));
|
||||||
adapter.selectAll(true);
|
adapter.selectAll(true);
|
||||||
} else {
|
} else {
|
||||||
adapter.selectAll(false);
|
adapter.selectAll(false);
|
||||||
|
@ -207,9 +246,18 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setGlobalExport(boolean globalExport) {
|
||||||
|
this.globalExport = globalExport;
|
||||||
|
}
|
||||||
|
|
||||||
private List<SettingsItem> prepareSettingsItemsForExport() {
|
private List<SettingsItem> prepareSettingsItemsForExport() {
|
||||||
List<SettingsItem> settingsItems = new ArrayList<>();
|
List<SettingsItem> settingsItems = new ArrayList<>();
|
||||||
settingsItems.add(new ProfileSettingsItem(app, profile));
|
if (!globalExport) {
|
||||||
|
settingsItems.add(new ProfileSettingsItem(app, getAppMode()));
|
||||||
|
}
|
||||||
|
if (includeGlobalSettings) {
|
||||||
|
settingsItems.add(new GlobalSettingsItem(app.getSettings()));
|
||||||
|
}
|
||||||
if (includeAdditionalData) {
|
if (includeAdditionalData) {
|
||||||
settingsItems.addAll(app.getSettingsHelper().prepareAdditionalSettingsItems(adapter.getData()));
|
settingsItems.addAll(app.getSettingsHelper().prepareAdditionalSettingsItems(adapter.getData()));
|
||||||
}
|
}
|
||||||
|
@ -219,13 +267,25 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet {
|
||||||
private void prepareFile() {
|
private void prepareFile() {
|
||||||
if (app != null) {
|
if (app != null) {
|
||||||
exportingProfile = true;
|
exportingProfile = true;
|
||||||
|
exportStartTime = System.currentTimeMillis();
|
||||||
showExportProgressDialog();
|
showExportProgressDialog();
|
||||||
File tempDir = FileUtils.getTempDir(app);
|
File tempDir = FileUtils.getTempDir(app);
|
||||||
String fileName = profile.toHumanString();
|
String fileName = getFileName();
|
||||||
app.getSettingsHelper().exportSettings(tempDir, fileName, getSettingsExportListener(), prepareSettingsItemsForExport(), true);
|
app.getSettingsHelper().exportSettings(tempDir, fileName, getSettingsExportListener(), prepareSettingsItemsForExport(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getFileName() {
|
||||||
|
if (globalExport) {
|
||||||
|
if (exportStartTime == 0) {
|
||||||
|
exportStartTime = System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
return "Export_" + DATE_FORMAT.format(new Date(exportStartTime));
|
||||||
|
} else {
|
||||||
|
return getAppMode().toHumanString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void showExportProgressDialog() {
|
private void showExportProgressDialog() {
|
||||||
Context context = getContext();
|
Context context = getContext();
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
|
@ -241,16 +301,16 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet {
|
||||||
progress.show();
|
progress.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private SettingsHelper.SettingsExportListener getSettingsExportListener() {
|
private SettingsExportListener getSettingsExportListener() {
|
||||||
if (exportListener == null) {
|
if (exportListener == null) {
|
||||||
exportListener = new SettingsHelper.SettingsExportListener() {
|
exportListener = new SettingsExportListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSettingsExportFinished(@NonNull File file, boolean succeed) {
|
public void onSettingsExportFinished(@NonNull File file, boolean succeed) {
|
||||||
dismissExportProgressDialog();
|
dismissExportProgressDialog();
|
||||||
exportingProfile = false;
|
exportingProfile = false;
|
||||||
if (succeed) {
|
if (succeed) {
|
||||||
shareProfile(file, profile);
|
shareProfile(file);
|
||||||
} else {
|
} else {
|
||||||
app.showToastMessage(R.string.export_profile_failed);
|
app.showToastMessage(R.string.export_profile_failed);
|
||||||
}
|
}
|
||||||
|
@ -269,7 +329,7 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet {
|
||||||
app.getSettingsHelper().updateExportListener(file, getSettingsExportListener());
|
app.getSettingsHelper().updateExportListener(file, getSettingsExportListener());
|
||||||
} else if (file.exists()) {
|
} else if (file.exists()) {
|
||||||
dismissExportProgressDialog();
|
dismissExportProgressDialog();
|
||||||
shareProfile(file, profile);
|
shareProfile(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -283,15 +343,15 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet {
|
||||||
|
|
||||||
private File getExportFile() {
|
private File getExportFile() {
|
||||||
File tempDir = FileUtils.getTempDir(app);
|
File tempDir = FileUtils.getTempDir(app);
|
||||||
String fileName = profile.toHumanString();
|
String fileName = getFileName();
|
||||||
return new File(tempDir, fileName + IndexConstants.OSMAND_SETTINGS_FILE_EXT);
|
return new File(tempDir, fileName + IndexConstants.OSMAND_SETTINGS_FILE_EXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void shareProfile(@NonNull File file, @NonNull ApplicationMode profile) {
|
private void shareProfile(@NonNull File file) {
|
||||||
try {
|
try {
|
||||||
final Intent sendIntent = new Intent();
|
final Intent sendIntent = new Intent();
|
||||||
sendIntent.setAction(Intent.ACTION_SEND);
|
sendIntent.setAction(Intent.ACTION_SEND);
|
||||||
sendIntent.putExtra(Intent.EXTRA_SUBJECT, profile.toHumanString() + IndexConstants.OSMAND_SETTINGS_FILE_EXT);
|
sendIntent.putExtra(Intent.EXTRA_SUBJECT, file.getName());
|
||||||
sendIntent.putExtra(Intent.EXTRA_STREAM, AndroidUtils.getUriForFile(getMyApplication(), file));
|
sendIntent.putExtra(Intent.EXTRA_STREAM, AndroidUtils.getUriForFile(getMyApplication(), file));
|
||||||
sendIntent.setType("*/*");
|
sendIntent.setType("*/*");
|
||||||
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
|
@ -304,11 +364,12 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean showInstance(@NonNull FragmentManager fragmentManager,
|
public static boolean showInstance(@NonNull FragmentManager fragmentManager,
|
||||||
Fragment target,
|
Fragment target, @NonNull ApplicationMode appMode,
|
||||||
@NonNull ApplicationMode appMode) {
|
boolean globalExport) {
|
||||||
try {
|
try {
|
||||||
ExportProfileBottomSheet fragment = new ExportProfileBottomSheet();
|
ExportProfileBottomSheet fragment = new ExportProfileBottomSheet();
|
||||||
fragment.setAppMode(appMode);
|
fragment.setAppMode(appMode);
|
||||||
|
fragment.setGlobalExport(globalExport);
|
||||||
fragment.setTargetFragment(target, 0);
|
fragment.setTargetFragment(target, 0);
|
||||||
fragment.show(fragmentManager, TAG);
|
fragment.show(fragmentManager, TAG);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -7,13 +7,12 @@ import android.widget.ImageView;
|
||||||
|
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
import androidx.preference.PreferenceCategory;
|
|
||||||
import androidx.preference.PreferenceViewHolder;
|
import androidx.preference.PreferenceViewHolder;
|
||||||
import androidx.preference.SwitchPreferenceCompat;
|
import androidx.preference.SwitchPreferenceCompat;
|
||||||
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.SettingsGeneralActivity;
|
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
||||||
import net.osmand.plus.dialogs.SendAnalyticsBottomSheetDialogFragment;
|
import net.osmand.plus.dialogs.SendAnalyticsBottomSheetDialogFragment;
|
||||||
import net.osmand.plus.dialogs.SendAnalyticsBottomSheetDialogFragment.OnSendAnalyticsPrefsUpdate;
|
import net.osmand.plus.dialogs.SendAnalyticsBottomSheetDialogFragment.OnSendAnalyticsPrefsUpdate;
|
||||||
import net.osmand.plus.dialogs.SpeedCamerasBottomSheet;
|
import net.osmand.plus.dialogs.SpeedCamerasBottomSheet;
|
||||||
|
@ -156,7 +155,7 @@ public class GlobalSettingsFragment extends BaseSettingsFragment
|
||||||
preferredLocale.setIcon(getActiveIcon(R.drawable.ic_action_map_language));
|
preferredLocale.setIcon(getActiveIcon(R.drawable.ic_action_map_language));
|
||||||
preferredLocale.setSummary(settings.PREFERRED_LOCALE.get());
|
preferredLocale.setSummary(settings.PREFERRED_LOCALE.get());
|
||||||
|
|
||||||
Pair<String[], String[]> preferredLocaleInfo = SettingsGeneralActivity.getPreferredLocaleIdsAndValues(ctx);
|
Pair<String[], String[]> preferredLocaleInfo = getPreferredLocaleIdsAndValues(ctx);
|
||||||
if (preferredLocaleInfo != null) {
|
if (preferredLocaleInfo != null) {
|
||||||
preferredLocale.setEntries(preferredLocaleInfo.first);
|
preferredLocale.setEntries(preferredLocaleInfo.first);
|
||||||
preferredLocale.setEntryValues(preferredLocaleInfo.second);
|
preferredLocale.setEntryValues(preferredLocaleInfo.second);
|
||||||
|
@ -219,4 +218,147 @@ public class GlobalSettingsFragment extends BaseSettingsFragment
|
||||||
}
|
}
|
||||||
uninstallSpeedCameras.setTitle(uninstalled ? R.string.speed_cameras_removed_descr : R.string.uninstall_speed_cameras);
|
uninstallSpeedCameras.setTitle(uninstalled ? R.string.speed_cameras_removed_descr : R.string.uninstall_speed_cameras);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Pair<String[], String[]> getPreferredLocaleIdsAndValues(Context ctx) {
|
||||||
|
// See language list and statistics at: https://hosted.weblate.org/projects/osmand/main/
|
||||||
|
// Hardy maintenance 2016-05-29:
|
||||||
|
// - Include languages if their translation is >= ~10% (but any language will be visible if it is the device's system locale)
|
||||||
|
// - Mark as "incomplete" if < ~80%
|
||||||
|
String incompleteSuffix = " (" + ctx.getString(R.string.incomplete_locale) + ")";
|
||||||
|
|
||||||
|
// Add " (Device language)" to system default entry in Latin letters, so it can be more easily identified if a foreign language has been selected by mistake
|
||||||
|
String latinSystemDefaultSuffix = " (" + ctx.getString(R.string.system_locale_no_translate) + ")";
|
||||||
|
|
||||||
|
//getResources().getAssets().getLocales();
|
||||||
|
String[] entryValues = new String[] {
|
||||||
|
"",
|
||||||
|
"en",
|
||||||
|
"af",
|
||||||
|
"ar",
|
||||||
|
"ast",
|
||||||
|
"az",
|
||||||
|
"be",
|
||||||
|
//"be_BY",
|
||||||
|
"bg",
|
||||||
|
"ca",
|
||||||
|
"cs",
|
||||||
|
"cy",
|
||||||
|
"da",
|
||||||
|
"de",
|
||||||
|
"el",
|
||||||
|
"en_GB",
|
||||||
|
"eo",
|
||||||
|
"es",
|
||||||
|
"es_AR",
|
||||||
|
"es_US",
|
||||||
|
"eu",
|
||||||
|
"fa",
|
||||||
|
"fi",
|
||||||
|
"fr",
|
||||||
|
"gl",
|
||||||
|
"iw",
|
||||||
|
"hr",
|
||||||
|
"hsb",
|
||||||
|
"hu",
|
||||||
|
"hy",
|
||||||
|
"is",
|
||||||
|
"it",
|
||||||
|
"ja",
|
||||||
|
"ka",
|
||||||
|
"kab",
|
||||||
|
"kn",
|
||||||
|
"ko",
|
||||||
|
"lt",
|
||||||
|
"lv",
|
||||||
|
"ml",
|
||||||
|
"mr",
|
||||||
|
"nb",
|
||||||
|
"nl",
|
||||||
|
"nn",
|
||||||
|
"oc",
|
||||||
|
"pl",
|
||||||
|
"pt",
|
||||||
|
"pt_BR",
|
||||||
|
"ro",
|
||||||
|
"ru",
|
||||||
|
"sc",
|
||||||
|
"sk",
|
||||||
|
"sl",
|
||||||
|
"sr",
|
||||||
|
"sr+Latn",
|
||||||
|
"sv",
|
||||||
|
"tr",
|
||||||
|
"uk",
|
||||||
|
"vi",
|
||||||
|
"zh_CN",
|
||||||
|
"zh_TW"};
|
||||||
|
|
||||||
|
String[] entries = new String[] {
|
||||||
|
ctx.getString(R.string.system_locale) + latinSystemDefaultSuffix,
|
||||||
|
ctx.getString(R.string.lang_en),
|
||||||
|
ctx.getString(R.string.lang_af) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_ar),
|
||||||
|
ctx.getString(R.string.lang_ast) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_az),
|
||||||
|
ctx.getString(R.string.lang_be),
|
||||||
|
// getString(R.string.lang_be_by),
|
||||||
|
ctx.getString(R.string.lang_bg),
|
||||||
|
ctx.getString(R.string.lang_ca),
|
||||||
|
ctx.getString(R.string.lang_cs),
|
||||||
|
ctx.getString(R.string.lang_cy) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_da),
|
||||||
|
ctx.getString(R.string.lang_de),
|
||||||
|
ctx.getString(R.string.lang_el),
|
||||||
|
ctx.getString(R.string.lang_en_gb),
|
||||||
|
ctx.getString(R.string.lang_eo),
|
||||||
|
ctx.getString(R.string.lang_es),
|
||||||
|
ctx.getString(R.string.lang_es_ar),
|
||||||
|
ctx.getString(R.string.lang_es_us),
|
||||||
|
ctx.getString(R.string.lang_eu),
|
||||||
|
ctx.getString(R.string.lang_fa),
|
||||||
|
ctx.getString(R.string.lang_fi) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_fr),
|
||||||
|
ctx.getString(R.string.lang_gl),
|
||||||
|
ctx.getString(R.string.lang_he),
|
||||||
|
ctx.getString(R.string.lang_hr) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_hsb) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_hu),
|
||||||
|
ctx.getString(R.string.lang_hy),
|
||||||
|
ctx.getString(R.string.lang_is),
|
||||||
|
ctx.getString(R.string.lang_it),
|
||||||
|
ctx.getString(R.string.lang_ja),
|
||||||
|
ctx.getString(R.string.lang_ka) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_kab) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_kn) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_ko),
|
||||||
|
ctx.getString(R.string.lang_lt),
|
||||||
|
ctx.getString(R.string.lang_lv),
|
||||||
|
ctx.getString(R.string.lang_ml),
|
||||||
|
ctx.getString(R.string.lang_mr) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_nb),
|
||||||
|
ctx.getString(R.string.lang_nl),
|
||||||
|
ctx.getString(R.string.lang_nn) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_oc) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_pl),
|
||||||
|
ctx.getString(R.string.lang_pt),
|
||||||
|
ctx.getString(R.string.lang_pt_br),
|
||||||
|
ctx.getString(R.string.lang_ro) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_ru),
|
||||||
|
ctx.getString(R.string.lang_sc),
|
||||||
|
ctx.getString(R.string.lang_sk),
|
||||||
|
ctx.getString(R.string.lang_sl),
|
||||||
|
ctx.getString(R.string.lang_sr),
|
||||||
|
ctx.getString(R.string.lang_sr_latn) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_sv),
|
||||||
|
ctx.getString(R.string.lang_tr),
|
||||||
|
ctx.getString(R.string.lang_uk),
|
||||||
|
ctx.getString(R.string.lang_vi) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_zh_cn) + incompleteSuffix,
|
||||||
|
ctx.getString(R.string.lang_zh_tw)};
|
||||||
|
|
||||||
|
String[] valuesPl = ConfigureMapMenu.getSortedMapNamesIds(ctx, entries, entries);
|
||||||
|
String[] idsPl = ConfigureMapMenu.getSortedMapNamesIds(ctx, entryValues, entries);
|
||||||
|
|
||||||
|
return Pair.create(valuesPl, idsPl);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -15,16 +15,16 @@ import androidx.preference.PreferenceViewHolder;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.CallbackWithObject;
|
import net.osmand.CallbackWithObject;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.settings.backend.backup.SettingsItem;
|
|
||||||
import net.osmand.plus.settings.backend.backup.SettingsItemType;
|
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||||
import net.osmand.plus.profiles.SelectProfileBottomSheetDialogFragment;
|
import net.osmand.plus.profiles.SelectProfileBottomSheetDialogFragment;
|
||||||
import net.osmand.plus.profiles.SelectProfileBottomSheetDialogFragment.SelectProfileListener;
|
import net.osmand.plus.profiles.SelectProfileBottomSheetDialogFragment.SelectProfileListener;
|
||||||
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
|
import net.osmand.plus.settings.backend.backup.SettingsItem;
|
||||||
|
import net.osmand.plus.settings.backend.backup.SettingsItemType;
|
||||||
import net.osmand.plus.settings.preferences.SwitchPreferenceEx;
|
import net.osmand.plus.settings.preferences.SwitchPreferenceEx;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -48,6 +48,7 @@ public class MainSettingsFragment extends BaseSettingsFragment {
|
||||||
private static final String CREATE_PROFILE = "create_profile";
|
private static final String CREATE_PROFILE = "create_profile";
|
||||||
private static final String IMPORT_PROFILE = "import_profile";
|
private static final String IMPORT_PROFILE = "import_profile";
|
||||||
private static final String REORDER_PROFILES = "reorder_profiles";
|
private static final String REORDER_PROFILES = "reorder_profiles";
|
||||||
|
private static final String EXPORT_PROFILES = "export_profiles";
|
||||||
|
|
||||||
private List<ApplicationMode> allAppModes;
|
private List<ApplicationMode> allAppModes;
|
||||||
private Set<ApplicationMode> availableAppModes;
|
private Set<ApplicationMode> availableAppModes;
|
||||||
|
@ -147,6 +148,13 @@ public class MainSettingsFragment extends BaseSettingsFragment {
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (EXPORT_PROFILES.equals(prefId)) {
|
||||||
|
MapActivity mapActivity = getMapActivity();
|
||||||
|
if (mapActivity != null) {
|
||||||
|
ApplicationMode mode = getSelectedAppMode();
|
||||||
|
FragmentManager fragmentManager = mapActivity.getSupportFragmentManager();
|
||||||
|
ExportProfileBottomSheet.showInstance(fragmentManager, this, mode, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return super.onPreferenceClick(preference);
|
return super.onPreferenceClick(preference);
|
||||||
}
|
}
|
||||||
|
@ -173,6 +181,9 @@ public class MainSettingsFragment extends BaseSettingsFragment {
|
||||||
|
|
||||||
Preference reorderProfiles = findPreference(REORDER_PROFILES);
|
Preference reorderProfiles = findPreference(REORDER_PROFILES);
|
||||||
reorderProfiles.setIcon(app.getUIUtilities().getIcon(R.drawable.ic_action_edit_dark, activeColorPrimaryResId));
|
reorderProfiles.setIcon(app.getUIUtilities().getIcon(R.drawable.ic_action_edit_dark, activeColorPrimaryResId));
|
||||||
|
|
||||||
|
Preference exportProfiles = findPreference(EXPORT_PROFILES);
|
||||||
|
exportProfiles.setIcon(app.getUIUtilities().getIcon(R.drawable.ic_action_export, activeColorPrimaryResId));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupAppProfiles(PreferenceCategory preferenceCategory) {
|
private void setupAppProfiles(PreferenceCategory preferenceCategory) {
|
||||||
|
|
|
@ -16,12 +16,16 @@ import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.settings.preferences.EditTextPreferenceEx;
|
import net.osmand.plus.settings.preferences.EditTextPreferenceEx;
|
||||||
|
|
||||||
import static net.osmand.plus.activities.SettingsGeneralActivity.IP_ADDRESS_PATTERN;
|
|
||||||
|
|
||||||
public class ProxySettingsFragment extends BaseSettingsFragment {
|
public class ProxySettingsFragment extends BaseSettingsFragment {
|
||||||
|
|
||||||
public static final String TAG = ProxySettingsFragment.class.getSimpleName();
|
public static final String TAG = ProxySettingsFragment.class.getSimpleName();
|
||||||
|
|
||||||
|
private static final String IP_ADDRESS_PATTERN =
|
||||||
|
"^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
|
||||||
|
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
|
||||||
|
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
|
||||||
|
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])$";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setupPreferences() {
|
protected void setupPreferences() {
|
||||||
Preference mapDuringNavigationInfo = findPreference("proxy_preferences_info");
|
Preference mapDuringNavigationInfo = findPreference("proxy_preferences_info");
|
||||||
|
|
|
@ -24,20 +24,20 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.google.android.material.slider.Slider;
|
import com.google.android.material.slider.Slider;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.StateChangedListener;
|
import net.osmand.StateChangedListener;
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.Version;
|
import net.osmand.plus.Version;
|
||||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
|
||||||
import net.osmand.plus.activities.SettingsNavigationActivity;
|
|
||||||
import net.osmand.plus.routing.RouteProvider;
|
import net.osmand.plus.routing.RouteProvider;
|
||||||
import net.osmand.plus.routing.RoutingHelper;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
import net.osmand.plus.settings.backend.BooleanPreference;
|
import net.osmand.plus.settings.backend.BooleanPreference;
|
||||||
import net.osmand.plus.settings.backend.CommonPreference;
|
import net.osmand.plus.settings.backend.CommonPreference;
|
||||||
import net.osmand.plus.settings.backend.OsmandPreference;
|
import net.osmand.plus.settings.backend.OsmandPreference;
|
||||||
|
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||||
import net.osmand.plus.settings.bottomsheets.RecalculateRouteInDeviationBottomSheet;
|
import net.osmand.plus.settings.bottomsheets.RecalculateRouteInDeviationBottomSheet;
|
||||||
import net.osmand.plus.settings.preferences.ListPreferenceEx;
|
import net.osmand.plus.settings.preferences.ListPreferenceEx;
|
||||||
import net.osmand.plus.settings.preferences.MultiSelectBooleanPreference;
|
import net.osmand.plus.settings.preferences.MultiSelectBooleanPreference;
|
||||||
|
@ -65,8 +65,8 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
||||||
private static final String ROUTE_PARAMETERS_IMAGE = "route_parameters_image";
|
private static final String ROUTE_PARAMETERS_IMAGE = "route_parameters_image";
|
||||||
private static final String RELIEF_SMOOTHNESS_FACTOR = "relief_smoothness_factor";
|
private static final String RELIEF_SMOOTHNESS_FACTOR = "relief_smoothness_factor";
|
||||||
private static final String ROUTING_SHORT_WAY = "prouting_short_way";
|
private static final String ROUTING_SHORT_WAY = "prouting_short_way";
|
||||||
private static final String ROUTING_RECALC_DISTANCE= "routing_recalc_distance";
|
private static final String ROUTING_RECALC_DISTANCE = "routing_recalc_distance";
|
||||||
private static final String ROUTING_RECALC_WRONG_DIRECTION= "disable_wrong_direction_recalc";
|
private static final String ROUTING_RECALC_WRONG_DIRECTION = "disable_wrong_direction_recalc";
|
||||||
|
|
||||||
public static final float DISABLE_MODE = -1.0f;
|
public static final float DISABLE_MODE = -1.0f;
|
||||||
public static final float DEFAULT_MODE = 0.0f;
|
public static final float DEFAULT_MODE = 0.0f;
|
||||||
|
@ -282,8 +282,8 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
||||||
screen.addPreference(reliefFactorRouting);
|
screen.addPreference(reliefFactorRouting);
|
||||||
}
|
}
|
||||||
for (RoutingParameter p : otherRoutingParameters) {
|
for (RoutingParameter p : otherRoutingParameters) {
|
||||||
String title = SettingsBaseActivity.getRoutingStringPropertyName(app, p.getId(), p.getName());
|
String title = AndroidUtils.getRoutingStringPropertyName(app, p.getId(), p.getName());
|
||||||
String description = SettingsBaseActivity.getRoutingStringPropertyDescription(app, p.getId(), p.getDescription());
|
String description = AndroidUtils.getRoutingStringPropertyDescription(app, p.getId(), p.getDescription());
|
||||||
|
|
||||||
if (p.getType() == RoutingParameterType.BOOLEAN) {
|
if (p.getType() == RoutingParameterType.BOOLEAN) {
|
||||||
OsmandPreference pref = settings.getCustomRoutingBooleanProperty(p.getId(), p.getDefaultBoolean());
|
OsmandPreference pref = settings.getCustomRoutingBooleanProperty(p.getId(), p.getDefaultBoolean());
|
||||||
|
@ -536,7 +536,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
||||||
List<RoutingParameter> routingParameters = DRIVING_STYLE.equals(prefId) ? drivingStyleParameters : reliefFactorParameters;
|
List<RoutingParameter> routingParameters = DRIVING_STYLE.equals(prefId) ? drivingStyleParameters : reliefFactorParameters;
|
||||||
for (RoutingParameter p : routingParameters) {
|
for (RoutingParameter p : routingParameters) {
|
||||||
String parameterId = p.getId();
|
String parameterId = p.getId();
|
||||||
SettingsNavigationActivity.setRoutingParameterSelected(settings, appMode, parameterId, p.getDefaultBoolean(), parameterId.equals(selectedParameterId));
|
setRoutingParameterSelected(settings, appMode, parameterId, p.getDefaultBoolean(), parameterId.equals(selectedParameterId));
|
||||||
}
|
}
|
||||||
recalculateRoute();
|
recalculateRoute();
|
||||||
} else if (ROUTING_SHORT_WAY.equals(prefId) && newValue instanceof Boolean) {
|
} else if (ROUTING_SHORT_WAY.equals(prefId) && newValue instanceof Boolean) {
|
||||||
|
@ -571,7 +571,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
||||||
|
|
||||||
private ListPreferenceEx createRoutingBooleanListPreference(String groupKey, List<RoutingParameter> routingParameters) {
|
private ListPreferenceEx createRoutingBooleanListPreference(String groupKey, List<RoutingParameter> routingParameters) {
|
||||||
String defaultTitle = Algorithms.capitalizeFirstLetterAndLowercase(groupKey.replace('_', ' '));
|
String defaultTitle = Algorithms.capitalizeFirstLetterAndLowercase(groupKey.replace('_', ' '));
|
||||||
String title = SettingsBaseActivity.getRoutingStringPropertyName(app, groupKey, defaultTitle);
|
String title = AndroidUtils.getRoutingStringPropertyName(app, groupKey, defaultTitle);
|
||||||
ApplicationMode am = getSelectedAppMode();
|
ApplicationMode am = getSelectedAppMode();
|
||||||
|
|
||||||
Object[] entryValues = new Object[routingParameters.size()];
|
Object[] entryValues = new Object[routingParameters.size()];
|
||||||
|
@ -581,8 +581,8 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
||||||
for (int i = 0; i < routingParameters.size(); i++) {
|
for (int i = 0; i < routingParameters.size(); i++) {
|
||||||
RoutingParameter parameter = routingParameters.get(i);
|
RoutingParameter parameter = routingParameters.get(i);
|
||||||
entryValues[i] = parameter.getId();
|
entryValues[i] = parameter.getId();
|
||||||
entries[i] = SettingsNavigationActivity.getRoutinParameterTitle(app, parameter);
|
entries[i] = getRoutingParameterTitle(app, parameter);
|
||||||
if (SettingsNavigationActivity.isRoutingParameterSelected(settings, am, parameter)) {
|
if (isRoutingParameterSelected(settings, am, parameter)) {
|
||||||
selectedParameterId = parameter.getId();
|
selectedParameterId = parameter.getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -614,7 +614,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
||||||
RoutingParameter p = routingParameters.get(i);
|
RoutingParameter p = routingParameters.get(i);
|
||||||
BooleanPreference booleanRoutingPref = (BooleanPreference) settings.getCustomRoutingBooleanProperty(p.getId(), p.getDefaultBoolean());
|
BooleanPreference booleanRoutingPref = (BooleanPreference) settings.getCustomRoutingBooleanProperty(p.getId(), p.getDefaultBoolean());
|
||||||
|
|
||||||
entries[i] = SettingsBaseActivity.getRoutingStringPropertyName(app, p.getId(), p.getName());
|
entries[i] = AndroidUtils.getRoutingStringPropertyName(app, p.getId(), p.getName());
|
||||||
prefsIds[i] = booleanRoutingPref.getId();
|
prefsIds[i] = booleanRoutingPref.getId();
|
||||||
|
|
||||||
if (booleanRoutingPref.getModeValue(selectedMode)) {
|
if (booleanRoutingPref.getModeValue(selectedMode)) {
|
||||||
|
@ -645,6 +645,29 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
||||||
otherRoutingParameters.clear();
|
otherRoutingParameters.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getRoutingParameterTitle(Context context, RoutingParameter parameter) {
|
||||||
|
return AndroidUtils.getRoutingStringPropertyName(context, parameter.getId(), parameter.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isRoutingParameterSelected(OsmandSettings settings, ApplicationMode mode, RoutingParameter parameter) {
|
||||||
|
CommonPreference<Boolean> property = settings.getCustomRoutingBooleanProperty(parameter.getId(), parameter.getDefaultBoolean());
|
||||||
|
if (mode != null) {
|
||||||
|
return property.getModeValue(mode);
|
||||||
|
} else {
|
||||||
|
return property.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setRoutingParameterSelected(OsmandSettings settings, ApplicationMode mode,
|
||||||
|
String parameterId, boolean defaultBoolean, boolean isChecked) {
|
||||||
|
CommonPreference<Boolean> property = settings.getCustomRoutingBooleanProperty(parameterId, defaultBoolean);
|
||||||
|
if (mode != null) {
|
||||||
|
property.setModeValue(mode, isChecked);
|
||||||
|
} else {
|
||||||
|
property.set(isChecked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Drawable getRoutingPrefIcon(String prefId) {
|
private Drawable getRoutingPrefIcon(String prefId) {
|
||||||
switch (prefId) {
|
switch (prefId) {
|
||||||
case GeneralRouter.ALLOW_PRIVATE:
|
case GeneralRouter.ALLOW_PRIVATE:
|
||||||
|
|
|
@ -1,16 +1,30 @@
|
||||||
package net.osmand.plus.settings.fragments;
|
package net.osmand.plus.settings.fragments;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
import androidx.preference.PreferenceViewHolder;
|
import androidx.preference.PreferenceViewHolder;
|
||||||
|
|
||||||
|
import com.google.android.material.slider.Slider;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
import net.osmand.plus.UiUtilities;
|
||||||
|
import net.osmand.plus.helpers.enums.SpeedConstants;
|
||||||
import net.osmand.plus.routing.RouteProvider.RouteService;
|
import net.osmand.plus.routing.RouteProvider.RouteService;
|
||||||
import net.osmand.plus.routing.RoutingHelper;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
|
@ -20,13 +34,18 @@ import net.osmand.plus.settings.bottomsheets.VehicleSizeAssets;
|
||||||
import net.osmand.plus.settings.preferences.ListPreferenceEx;
|
import net.osmand.plus.settings.preferences.ListPreferenceEx;
|
||||||
import net.osmand.plus.settings.preferences.SizePreference;
|
import net.osmand.plus.settings.preferences.SizePreference;
|
||||||
import net.osmand.router.GeneralRouter;
|
import net.osmand.router.GeneralRouter;
|
||||||
import net.osmand.util.Algorithms;
|
|
||||||
import net.osmand.router.GeneralRouter.GeneralRouterProfile;
|
import net.osmand.router.GeneralRouter.GeneralRouterProfile;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static net.osmand.plus.activities.SettingsNavigationActivity.showSeekbarSettingsDialog;
|
import static net.osmand.router.GeneralRouter.DEFAULT_SPEED;
|
||||||
import static net.osmand.router.GeneralRouter.*;
|
import static net.osmand.router.GeneralRouter.RoutingParameter;
|
||||||
|
import static net.osmand.router.GeneralRouter.RoutingParameterType;
|
||||||
|
import static net.osmand.router.GeneralRouter.VEHICLE_HEIGHT;
|
||||||
|
import static net.osmand.router.GeneralRouter.VEHICLE_LENGTH;
|
||||||
|
import static net.osmand.router.GeneralRouter.VEHICLE_WEIGHT;
|
||||||
|
import static net.osmand.router.GeneralRouter.VEHICLE_WIDTH;
|
||||||
|
|
||||||
public class VehicleParametersFragment extends BaseSettingsFragment implements OnPreferenceChanged {
|
public class VehicleParametersFragment extends BaseSettingsFragment implements OnPreferenceChanged {
|
||||||
|
|
||||||
|
@ -67,8 +86,8 @@ public class VehicleParametersFragment extends BaseSettingsFragment implements O
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String parameterId = parameter.getId();
|
String parameterId = parameter.getId();
|
||||||
String title = SettingsBaseActivity.getRoutingStringPropertyName(app, parameterId, parameter.getName());
|
String title = AndroidUtils.getRoutingStringPropertyName(app, parameterId, parameter.getName());
|
||||||
String description = SettingsBaseActivity.getRoutingStringPropertyDescription(app, parameterId,
|
String description = AndroidUtils.getRoutingStringPropertyDescription(app, parameterId,
|
||||||
parameter.getDescription());
|
parameter.getDescription());
|
||||||
String defValue = parameter.getType() == RoutingParameterType.NUMERIC
|
String defValue = parameter.getType() == RoutingParameterType.NUMERIC
|
||||||
? ROUTING_PARAMETER_NUMERIC_DEFAULT : ROUTING_PARAMETER_SYMBOLIC_DEFAULT;
|
? ROUTING_PARAMETER_NUMERIC_DEFAULT : ROUTING_PARAMETER_SYMBOLIC_DEFAULT;
|
||||||
|
@ -146,7 +165,10 @@ public class VehicleParametersFragment extends BaseSettingsFragment implements O
|
||||||
if (preference.getKey().equals(DEFAULT_SPEED)) {
|
if (preference.getKey().equals(DEFAULT_SPEED)) {
|
||||||
RouteService routeService = getSelectedAppMode().getRouteService();
|
RouteService routeService = getSelectedAppMode().getRouteService();
|
||||||
boolean defaultSpeedOnly = routeService == RouteService.STRAIGHT || routeService == RouteService.DIRECT_TO;
|
boolean defaultSpeedOnly = routeService == RouteService.STRAIGHT || routeService == RouteService.DIRECT_TO;
|
||||||
showSeekbarSettingsDialog(getActivity(), defaultSpeedOnly, getSelectedAppMode());
|
FragmentActivity activity = getActivity();
|
||||||
|
if (activity != null) {
|
||||||
|
showSeekbarSettingsDialog(activity, defaultSpeedOnly);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.onPreferenceClick(preference);
|
return super.onPreferenceClick(preference);
|
||||||
|
@ -178,6 +200,199 @@ public class VehicleParametersFragment extends BaseSettingsFragment implements O
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showSeekbarSettingsDialog(@NonNull Activity activity, final boolean defaultSpeedOnly) {
|
||||||
|
final ApplicationMode mode = getSelectedAppMode();
|
||||||
|
|
||||||
|
SpeedConstants units = app.getSettings().SPEED_SYSTEM.getModeValue(mode);
|
||||||
|
String speedUnits = units.toShortString(activity);
|
||||||
|
final float[] ratio = new float[1];
|
||||||
|
switch (units) {
|
||||||
|
case MILES_PER_HOUR:
|
||||||
|
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_ONE_MILE;
|
||||||
|
break;
|
||||||
|
case KILOMETERS_PER_HOUR:
|
||||||
|
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_KILOMETER;
|
||||||
|
break;
|
||||||
|
case MINUTES_PER_KILOMETER:
|
||||||
|
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_KILOMETER;
|
||||||
|
speedUnits = activity.getString(R.string.km_h);
|
||||||
|
break;
|
||||||
|
case NAUTICALMILES_PER_HOUR:
|
||||||
|
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_ONE_NAUTICALMILE;
|
||||||
|
break;
|
||||||
|
case MINUTES_PER_MILE:
|
||||||
|
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_ONE_MILE;
|
||||||
|
speedUnits = activity.getString(R.string.mile_per_hour);
|
||||||
|
break;
|
||||||
|
case METERS_PER_SECOND:
|
||||||
|
ratio[0] = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
float settingsMinSpeed = mode.getMinSpeed();
|
||||||
|
float settingsMaxSpeed = mode.getMaxSpeed();
|
||||||
|
float settingsDefaultSpeed = mode.getDefaultSpeed();
|
||||||
|
|
||||||
|
final int[] defaultValue = {Math.round(settingsDefaultSpeed * ratio[0])};
|
||||||
|
final int[] minValue = new int[1];
|
||||||
|
final int[] maxValue = new int[1];
|
||||||
|
final int min;
|
||||||
|
final int max;
|
||||||
|
|
||||||
|
GeneralRouter router = app.getRouter(mode);
|
||||||
|
if (defaultSpeedOnly || router == null) {
|
||||||
|
minValue[0] = Math.round(Math.min(1, settingsDefaultSpeed) * ratio[0]);
|
||||||
|
maxValue[0] = Math.round(Math.max(300, settingsDefaultSpeed) * ratio[0]);
|
||||||
|
min = minValue[0];
|
||||||
|
max = maxValue[0];
|
||||||
|
} else {
|
||||||
|
float minSpeedValue = settingsMinSpeed > 0 ? settingsMinSpeed : router.getMinSpeed();
|
||||||
|
float maxSpeedValue = settingsMaxSpeed > 0 ? settingsMaxSpeed : router.getMaxSpeed();
|
||||||
|
minValue[0] = Math.round(Math.min(minSpeedValue, settingsDefaultSpeed) * ratio[0]);
|
||||||
|
maxValue[0] = Math.round(Math.max(maxSpeedValue, settingsDefaultSpeed) * ratio[0]);
|
||||||
|
|
||||||
|
min = Math.round(Math.min(minValue[0], router.getMinSpeed() * ratio[0] / 2f));
|
||||||
|
max = Math.round(Math.max(maxValue[0], router.getMaxSpeed() * ratio[0] * 1.5f));
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean nightMode = !app.getSettings().isLightContentForMode(mode);
|
||||||
|
Context themedContext = UiUtilities.getThemedContext(activity, nightMode);
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(themedContext);
|
||||||
|
View seekbarView = LayoutInflater.from(themedContext).inflate(R.layout.default_speed_dialog, null, false);
|
||||||
|
builder.setView(seekbarView);
|
||||||
|
builder.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
mode.setDefaultSpeed(defaultValue[0] / ratio[0]);
|
||||||
|
if (!defaultSpeedOnly) {
|
||||||
|
mode.setMinSpeed(minValue[0] / ratio[0]);
|
||||||
|
mode.setMaxSpeed(maxValue[0] / ratio[0]);
|
||||||
|
}
|
||||||
|
RoutingHelper routingHelper = app.getRoutingHelper();
|
||||||
|
if (mode.equals(routingHelper.getAppMode()) && (routingHelper.isRouteCalculated() || routingHelper.isRouteBeingCalculated())) {
|
||||||
|
routingHelper.recalculateRouteDueToSettingsChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||||
|
builder.setNeutralButton(R.string.shared_string_revert, new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
mode.resetDefaultSpeed();
|
||||||
|
if (!defaultSpeedOnly) {
|
||||||
|
mode.setMinSpeed(0f);
|
||||||
|
mode.setMaxSpeed(0f);
|
||||||
|
}
|
||||||
|
RoutingHelper routingHelper = app.getRoutingHelper();
|
||||||
|
if (mode.equals(routingHelper.getAppMode()) && (routingHelper.isRouteCalculated() || routingHelper.isRouteBeingCalculated())) {
|
||||||
|
routingHelper.recalculateRouteDueToSettingsChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
int selectedModeColor = ContextCompat.getColor(app, mode.getIconColorInfo().getColor(nightMode));
|
||||||
|
if (!defaultSpeedOnly) {
|
||||||
|
setupSpeedSlider(SpeedSliderType.DEFAULT_SPEED, speedUnits, defaultValue, minValue, maxValue, min, max, seekbarView, selectedModeColor);
|
||||||
|
setupSpeedSlider(SpeedSliderType.MIN_SPEED, speedUnits, defaultValue, minValue, maxValue, min, max, seekbarView, selectedModeColor);
|
||||||
|
setupSpeedSlider(SpeedSliderType.MAX_SPEED, speedUnits, defaultValue, minValue, maxValue, min, max, seekbarView, selectedModeColor);
|
||||||
|
} else {
|
||||||
|
setupSpeedSlider(SpeedSliderType.DEFAULT_SPEED_ONLY, speedUnits, defaultValue, minValue, maxValue, min, max, seekbarView, selectedModeColor);
|
||||||
|
seekbarView.findViewById(R.id.default_speed_div).setVisibility(View.GONE);
|
||||||
|
seekbarView.findViewById(R.id.default_speed_container).setVisibility(View.GONE);
|
||||||
|
seekbarView.findViewById(R.id.max_speed_div).setVisibility(View.GONE);
|
||||||
|
seekbarView.findViewById(R.id.max_speed_container).setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
builder.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum SpeedSliderType {
|
||||||
|
DEFAULT_SPEED_ONLY,
|
||||||
|
DEFAULT_SPEED,
|
||||||
|
MIN_SPEED,
|
||||||
|
MAX_SPEED,
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupSpeedSlider(final SpeedSliderType type, String speedUnits, final int[] defaultValue,
|
||||||
|
final int[] minValue, final int[] maxValue, final int min, int max,
|
||||||
|
View seekbarView, int activeColor) {
|
||||||
|
View sliderLayout;
|
||||||
|
int titleId;
|
||||||
|
final int[] speedValue;
|
||||||
|
switch (type) {
|
||||||
|
case DEFAULT_SPEED_ONLY:
|
||||||
|
speedValue = defaultValue;
|
||||||
|
sliderLayout = seekbarView.findViewById(R.id.min_speed_layout);
|
||||||
|
titleId = R.string.default_speed_setting_title;
|
||||||
|
break;
|
||||||
|
case MIN_SPEED:
|
||||||
|
speedValue = minValue;
|
||||||
|
sliderLayout = seekbarView.findViewById(R.id.min_speed_layout);
|
||||||
|
titleId = R.string.shared_string_min_speed;
|
||||||
|
break;
|
||||||
|
case MAX_SPEED:
|
||||||
|
speedValue = maxValue;
|
||||||
|
sliderLayout = seekbarView.findViewById(R.id.max_speed_layout);
|
||||||
|
titleId = R.string.shared_string_max_speed;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
speedValue = defaultValue;
|
||||||
|
sliderLayout = seekbarView.findViewById(R.id.default_speed_layout);
|
||||||
|
titleId = R.string.default_speed_setting_title;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
final Slider slider = sliderLayout.findViewById(R.id.speed_slider);
|
||||||
|
final TextView speedTitleTv = sliderLayout.findViewById(R.id.speed_title);
|
||||||
|
final TextView speedMinTv = sliderLayout.findViewById(R.id.speed_seekbar_min_text);
|
||||||
|
final TextView speedMaxTv = sliderLayout.findViewById(R.id.speed_seekbar_max_text);
|
||||||
|
final TextView speedUnitsTv = sliderLayout.findViewById(R.id.speed_units);
|
||||||
|
final TextView speedTv = sliderLayout.findViewById(R.id.speed_text);
|
||||||
|
|
||||||
|
speedTitleTv.setText(titleId);
|
||||||
|
speedMinTv.setText(String.valueOf(min));
|
||||||
|
speedMaxTv.setText(String.valueOf(max));
|
||||||
|
speedTv.setText(String.valueOf(speedValue[0]));
|
||||||
|
speedUnitsTv.setText(speedUnits);
|
||||||
|
slider.setValueTo(max - min);
|
||||||
|
slider.setValue(Math.max(speedValue[0] - min, 0));
|
||||||
|
slider.addOnChangeListener(new Slider.OnChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onValueChange(@NonNull Slider slider, float val, boolean fromUser) {
|
||||||
|
int progress = (int) val;
|
||||||
|
int value = progress + min;
|
||||||
|
switch (type) {
|
||||||
|
case DEFAULT_SPEED:
|
||||||
|
case DEFAULT_SPEED_ONLY:
|
||||||
|
if (value > maxValue[0]) {
|
||||||
|
value = maxValue[0];
|
||||||
|
slider.setValue(Math.max(value - min, 0));
|
||||||
|
} else if (value < minValue[0]) {
|
||||||
|
value = minValue[0];
|
||||||
|
slider.setValue(Math.max(value - min, 0));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MIN_SPEED:
|
||||||
|
if (value > defaultValue[0]) {
|
||||||
|
value = defaultValue[0];
|
||||||
|
slider.setValue(Math.max(value - min, 0));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MAX_SPEED:
|
||||||
|
if (value < defaultValue[0]) {
|
||||||
|
value = defaultValue[0];
|
||||||
|
slider.setValue(Math.max(value - min, 0));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
speedValue[0] = value;
|
||||||
|
speedTv.setText(String.valueOf(value));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
UiUtilities.setupSlider(slider, isNightMode(), activeColor);
|
||||||
|
}
|
||||||
|
|
||||||
private Drawable getPreferenceIcon(String prefId) {
|
private Drawable getPreferenceIcon(String prefId) {
|
||||||
switch (prefId) {
|
switch (prefId) {
|
||||||
case DEFAULT_SPEED:
|
case DEFAULT_SPEED:
|
||||||
|
|
|
@ -17,29 +17,30 @@ import androidx.preference.PreferenceViewHolder;
|
||||||
import androidx.preference.SwitchPreferenceCompat;
|
import androidx.preference.SwitchPreferenceCompat;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.dialogs.SpeedCamerasBottomSheet;
|
|
||||||
import net.osmand.plus.helpers.enums.MetricsConstants;
|
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.Version;
|
import net.osmand.plus.Version;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.dialogs.SpeedCamerasBottomSheet;
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
import net.osmand.plus.download.DownloadActivity;
|
||||||
import net.osmand.plus.download.DownloadActivityType;
|
import net.osmand.plus.download.DownloadActivityType;
|
||||||
import net.osmand.plus.helpers.FileNameTranslationHelper;
|
import net.osmand.plus.helpers.FileNameTranslationHelper;
|
||||||
|
import net.osmand.plus.helpers.enums.MetricsConstants;
|
||||||
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
|
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||||
import net.osmand.plus.settings.preferences.ListPreferenceEx;
|
import net.osmand.plus.settings.preferences.ListPreferenceEx;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static net.osmand.plus.settings.backend.OsmandSettings.VOICE_PROVIDER_NOT_USE;
|
|
||||||
import static net.osmand.plus.UiUtilities.CompoundButtonType.TOOLBAR;
|
import static net.osmand.plus.UiUtilities.CompoundButtonType.TOOLBAR;
|
||||||
import static net.osmand.plus.activities.SettingsNavigationActivity.MORE_VALUE;
|
import static net.osmand.plus.settings.backend.OsmandSettings.VOICE_PROVIDER_NOT_USE;
|
||||||
|
|
||||||
public class VoiceAnnouncesFragment extends BaseSettingsFragment implements OnPreferenceChanged {
|
public class VoiceAnnouncesFragment extends BaseSettingsFragment implements OnPreferenceChanged {
|
||||||
|
|
||||||
public static final String TAG = VoiceAnnouncesFragment.class.getSimpleName();
|
public static final String TAG = VoiceAnnouncesFragment.class.getSimpleName();
|
||||||
|
|
||||||
|
private static final String MORE_VALUE = "MORE_VALUE";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createToolbar(LayoutInflater inflater, View view) {
|
protected void createToolbar(LayoutInflater inflater, View view) {
|
||||||
super.createToolbar(inflater, view);
|
super.createToolbar(inflater, view);
|
||||||
|
@ -105,8 +106,8 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment implements OnPr
|
||||||
|
|
||||||
private void setupSpeedLimitExceedPref() {
|
private void setupSpeedLimitExceedPref() {
|
||||||
//array size must be equal!
|
//array size must be equal!
|
||||||
Float[] valuesKmh = new Float[]{-10f, -7f, -5f, 0f, 5f, 7f, 10f, 15f, 20f};
|
Float[] valuesKmh = new Float[] {-10f, -7f, -5f, 0f, 5f, 7f, 10f, 15f, 20f};
|
||||||
Float[] valuesMph = new Float[]{-7f, -5f, -3f, 0f, 3f, 5f, 7f, 10f, 15f};
|
Float[] valuesMph = new Float[] {-7f, -5f, -3f, 0f, 3f, 5f, 7f, 10f, 15f};
|
||||||
String[] names;
|
String[] names;
|
||||||
if (settings.METRIC_SYSTEM.getModeValue(getSelectedAppMode()) == MetricsConstants.KILOMETERS_AND_METERS) {
|
if (settings.METRIC_SYSTEM.getModeValue(getSelectedAppMode()) == MetricsConstants.KILOMETERS_AND_METERS) {
|
||||||
names = new String[valuesKmh.length];
|
names = new String[valuesKmh.length];
|
||||||
|
|
|
@ -3,6 +3,7 @@ package net.osmand.plus.srtmplugin;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
import net.osmand.plus.ContextMenuAdapter;
|
||||||
import net.osmand.plus.ContextMenuItem;
|
import net.osmand.plus.ContextMenuItem;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
@ -11,7 +12,6 @@ import net.osmand.plus.settings.backend.CommonPreference;
|
||||||
import net.osmand.plus.settings.backend.OsmandSettings;
|
import net.osmand.plus.settings.backend.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
|
||||||
import net.osmand.plus.chooseplan.ChoosePlanDialogFragment;
|
import net.osmand.plus.chooseplan.ChoosePlanDialogFragment;
|
||||||
import net.osmand.plus.download.DownloadActivityType;
|
import net.osmand.plus.download.DownloadActivityType;
|
||||||
import net.osmand.plus.download.DownloadIndexesThread;
|
import net.osmand.plus.download.DownloadIndexesThread;
|
||||||
|
@ -66,7 +66,7 @@ public class ContourLinesMenu {
|
||||||
final CommonPreference<String> densityPref;
|
final CommonPreference<String> densityPref;
|
||||||
final RenderingRuleProperty contourWidthProp = app.getRendererRegistry().getCustomRenderingRuleProperty(CONTOUR_WIDTH_ATTR);
|
final RenderingRuleProperty contourWidthProp = app.getRendererRegistry().getCustomRenderingRuleProperty(CONTOUR_WIDTH_ATTR);
|
||||||
if (contourWidthProp != null) {
|
if (contourWidthProp != null) {
|
||||||
contourWidthName = SettingsActivity.getStringPropertyName(app, contourWidthProp.getAttrName(),
|
contourWidthName = AndroidUtils.getRenderingStringPropertyName(app, contourWidthProp.getAttrName(),
|
||||||
contourWidthProp.getName());
|
contourWidthProp.getName());
|
||||||
widthPref = settings.getCustomRenderProperty(contourWidthProp.getAttrName());
|
widthPref = settings.getCustomRenderProperty(contourWidthProp.getAttrName());
|
||||||
} else {
|
} else {
|
||||||
|
@ -75,7 +75,7 @@ public class ContourLinesMenu {
|
||||||
}
|
}
|
||||||
final RenderingRuleProperty contourDensityProp = app.getRendererRegistry().getCustomRenderingRuleProperty(CONTOUR_DENSITY_ATTR);
|
final RenderingRuleProperty contourDensityProp = app.getRendererRegistry().getCustomRenderingRuleProperty(CONTOUR_DENSITY_ATTR);
|
||||||
if (contourDensityProp != null) {
|
if (contourDensityProp != null) {
|
||||||
contourDensityName = SettingsActivity.getStringPropertyName(app, contourDensityProp.getAttrName(),
|
contourDensityName = AndroidUtils.getRenderingStringPropertyName(app, contourDensityProp.getAttrName(),
|
||||||
contourDensityProp.getName());
|
contourDensityProp.getName());
|
||||||
densityPref = settings.getCustomRenderProperty(contourDensityProp.getAttrName());
|
densityPref = settings.getCustomRenderProperty(contourDensityProp.getAttrName());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -24,7 +24,6 @@ import net.osmand.plus.settings.backend.OsmandSettings;
|
||||||
import net.osmand.plus.settings.backend.CommonPreference;
|
import net.osmand.plus.settings.backend.CommonPreference;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
|
||||||
import net.osmand.plus.dashboard.DashboardOnMap;
|
import net.osmand.plus.dashboard.DashboardOnMap;
|
||||||
import net.osmand.plus.download.DownloadActivityType;
|
import net.osmand.plus.download.DownloadActivityType;
|
||||||
import net.osmand.plus.download.DownloadIndexesThread;
|
import net.osmand.plus.download.DownloadIndexesThread;
|
||||||
|
@ -438,9 +437,9 @@ public class SRTMPlugin extends OsmandPlugin {
|
||||||
|
|
||||||
public String getPrefDescription(final Context ctx, final RenderingRuleProperty p, final CommonPreference<String> pref) {
|
public String getPrefDescription(final Context ctx, final RenderingRuleProperty p, final CommonPreference<String> pref) {
|
||||||
if (!Algorithms.isEmpty(pref.get())) {
|
if (!Algorithms.isEmpty(pref.get())) {
|
||||||
return SettingsActivity.getStringPropertyValue(ctx, pref.get());
|
return AndroidUtils.getRenderingStringPropertyValue(ctx, pref.get());
|
||||||
} else {
|
} else {
|
||||||
return SettingsActivity.getStringPropertyValue(ctx, p.getDefaultValueDescription());
|
return AndroidUtils.getRenderingStringPropertyValue(ctx, p.getDefaultValueDescription());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,7 +447,7 @@ public class SRTMPlugin extends OsmandPlugin {
|
||||||
final RenderingRuleProperty p,
|
final RenderingRuleProperty p,
|
||||||
final CommonPreference<String> pref,
|
final CommonPreference<String> pref,
|
||||||
final Runnable callback) {
|
final Runnable callback) {
|
||||||
final String propertyDescr = SettingsActivity.getStringPropertyDescription(activity,
|
final String propertyDescr = AndroidUtils.getRenderingStringPropertyDescription(activity,
|
||||||
p.getAttrName(), p.getName());
|
p.getAttrName(), p.getName());
|
||||||
boolean nightMode = isNightMode(activity, app);
|
boolean nightMode = isNightMode(activity, app);
|
||||||
int themeRes = getThemeRes(activity, app);
|
int themeRes = getThemeRes(activity, app);
|
||||||
|
@ -467,11 +466,11 @@ public class SRTMPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] possibleValuesString = new String[possibleValues.length + 1];
|
String[] possibleValuesString = new String[possibleValues.length + 1];
|
||||||
possibleValuesString[0] = SettingsActivity.getStringPropertyValue(activity,
|
possibleValuesString[0] = AndroidUtils.getRenderingStringPropertyValue(activity,
|
||||||
p.getDefaultValueDescription());
|
p.getDefaultValueDescription());
|
||||||
|
|
||||||
for (int j = 0; j < possibleValues.length; j++) {
|
for (int j = 0; j < possibleValues.length; j++) {
|
||||||
possibleValuesString[j + 1] = SettingsActivity.getStringPropertyValue(activity,
|
possibleValuesString[j + 1] = AndroidUtils.getRenderingStringPropertyValue(activity,
|
||||||
possibleValues[j]);
|
possibleValues[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.appcompat.widget.SwitchCompat;
|
import androidx.appcompat.widget.SwitchCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.CallbackWithObject;
|
import net.osmand.CallbackWithObject;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
@ -24,7 +25,6 @@ import net.osmand.plus.settings.backend.CommonPreference;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
|
||||||
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
||||||
import net.osmand.render.RenderingRuleProperty;
|
import net.osmand.render.RenderingRuleProperty;
|
||||||
|
|
||||||
|
@ -105,8 +105,7 @@ public class TransportLinesMenu {
|
||||||
for (int i = 0; i < transportRules.size(); i++) {
|
for (int i = 0; i < transportRules.size(); i++) {
|
||||||
RenderingRuleProperty p = transportRules.get(i);
|
RenderingRuleProperty p = transportRules.get(i);
|
||||||
String attrName = p.getAttrName();
|
String attrName = p.getAttrName();
|
||||||
String propertyName = SettingsActivity
|
String propertyName = AndroidUtils.getRenderingStringPropertyName(themedCtx, attrName, p.getName());
|
||||||
.getStringPropertyName(themedCtx, attrName, p.getName());
|
|
||||||
vals[i] = propertyName;
|
vals[i] = propertyName;
|
||||||
Integer iconId = transportIcons.get(attrName);
|
Integer iconId = transportIcons.get(attrName);
|
||||||
if (iconId != null) {
|
if (iconId != null) {
|
||||||
|
|
|
@ -15,12 +15,11 @@ import android.widget.Toast;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.plus.settings.backend.ApplicationMode;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.settings.backend.OsmandPreference;
|
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
|
||||||
import net.osmand.plus.routing.VoiceRouter;
|
import net.osmand.plus.routing.VoiceRouter;
|
||||||
|
import net.osmand.plus.settings.backend.ApplicationMode;
|
||||||
|
import net.osmand.plus.settings.backend.OsmandPreference;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
@ -215,16 +214,16 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||||
speechAllowed = true;
|
speechAllowed = true;
|
||||||
switch (mTts.isLanguageAvailable(newLocale)) {
|
switch (mTts.isLanguageAvailable(newLocale)) {
|
||||||
case TextToSpeech.LANG_MISSING_DATA:
|
case TextToSpeech.LANG_MISSING_DATA:
|
||||||
if (isSettingsActivity(act)) {
|
// if (isSettingsActivity(act)) {
|
||||||
AlertDialog.Builder builder = createAlertDialog(
|
// AlertDialog.Builder builder = createAlertDialog(
|
||||||
R.string.tts_missing_language_data_title,
|
// R.string.tts_missing_language_data_title,
|
||||||
R.string.tts_missing_language_data,
|
// R.string.tts_missing_language_data,
|
||||||
new IntentStarter(
|
// new IntentStarter(
|
||||||
act,
|
// act,
|
||||||
TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA),
|
// TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA),
|
||||||
act);
|
// act);
|
||||||
builder.show();
|
// builder.show();
|
||||||
}
|
// }
|
||||||
ttsVoiceStatus = newLocale.getDisplayName() + ": LANG_MISSING_DATA";
|
ttsVoiceStatus = newLocale.getDisplayName() + ": LANG_MISSING_DATA";
|
||||||
ttsVoiceUsed = getVoiceUsed();
|
ttsVoiceUsed = getVoiceUsed();
|
||||||
break;
|
break;
|
||||||
|
@ -251,17 +250,17 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||||
break;
|
break;
|
||||||
case TextToSpeech.LANG_NOT_SUPPORTED:
|
case TextToSpeech.LANG_NOT_SUPPORTED:
|
||||||
//maybe weird, but I didn't want to introduce parameter in around 5 methods just to do this if condition
|
//maybe weird, but I didn't want to introduce parameter in around 5 methods just to do this if condition
|
||||||
if (isSettingsActivity(act)) {
|
// if (isSettingsActivity(act)) {
|
||||||
AlertDialog.Builder builder = createAlertDialog(
|
// AlertDialog.Builder builder = createAlertDialog(
|
||||||
R.string.tts_language_not_supported_title,
|
// R.string.tts_language_not_supported_title,
|
||||||
R.string.tts_language_not_supported,
|
// R.string.tts_language_not_supported,
|
||||||
new IntentStarter(
|
// new IntentStarter(
|
||||||
act,
|
// act,
|
||||||
Intent.ACTION_VIEW, Uri.parse("market://search?q=text to speech engine"
|
// Intent.ACTION_VIEW, Uri.parse("market://search?q=text to speech engine"
|
||||||
)),
|
// )),
|
||||||
act);
|
// act);
|
||||||
builder.show();
|
// builder.show();
|
||||||
}
|
// }
|
||||||
ttsVoiceStatus = newLocale.getDisplayName() + ": LANG_NOT_SUPPORTED";
|
ttsVoiceStatus = newLocale.getDisplayName() + ": LANG_NOT_SUPPORTED";
|
||||||
ttsVoiceUsed = getVoiceUsed();
|
ttsVoiceUsed = getVoiceUsed();
|
||||||
break;
|
break;
|
||||||
|
@ -269,10 +268,6 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isSettingsActivity(final Context ctx) {
|
|
||||||
return ctx instanceof SettingsActivity;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getVoiceUsed() {
|
private String getVoiceUsed() {
|
||||||
try {
|
try {
|
||||||
if (android.os.Build.VERSION.SDK_INT >= 21) {
|
if (android.os.Build.VERSION.SDK_INT >= 21) {
|
||||||
|
|
Loading…
Reference in a new issue