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

This commit is contained in:
PavelRatushny 2017-09-06 12:34:37 +03:00
commit 45abba80b4
56 changed files with 960 additions and 875 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,002 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 B

View file

@ -1,86 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:layout_marginTop="0dp"/>
<LinearLayout
android:id="@+id/header_layout"
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="@dimen/dashboard_map_toolbar">
<android.support.v7.widget.Toolbar
android:id="@+id/split_interval_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="?attr/actionBarStyle"
app:contentInsetLeft="54dp"
app:contentInsetStart="54dp">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:maxLines="1"
tools:text="2017-02-16" />
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:indeterminate="true"
android:visibility="gone"
tools:visibility="visible" />
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:layout_marginTop="0dp" />
<LinearLayout
android:orientation="horizontal"
android:id="@+id/header_layout"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="?attr/bg_color"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<ImageView
android:id="@+id/header_split_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
tools:src="@drawable/ic_action_split_interval"
android:layout_marginBottom="12dp"
android:layout_marginTop="12dp"
android:layout_marginRight="16dp"/>
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/split_interval_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/split_interval_title"
android:background="@null"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"
android:text="Split interval:"/>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/split_interval_text"
android:background="@null"
android:layout_gravity="center_vertical"
android:gravity="right"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorPrimary"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"
tools:text="10 km"/>
android:layout_height="48dp"
android:background="?attr/bg_color"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<ImageView
android:id="@+id/split_interval_arrow"
android:id="@+id/header_split_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_action_arrow_drop_down"/>
android:layout_marginBottom="12dp"
android:layout_marginRight="16dp"
android:layout_marginTop="12dp"
tools:src="@drawable/ic_action_split_interval" />
<LinearLayout
android:id="@+id/split_interval_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/split_interval_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@null"
android:text="Split interval:"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/split_interval_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:background="@null"
android:gravity="right"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="10 km" />
<ImageView
android:id="@+id/split_interval_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_action_arrow_drop_down" />
</LinearLayout>
</LinearLayout>
<include layout="@layout/card_bottom_divider" />
</LinearLayout>
<include layout="@layout/card_bottom_divider"/>
</FrameLayout>
</LinearLayout>
</FrameLayout>
</LinearLayout>

View file

@ -1193,7 +1193,7 @@ Miesca parkoŭkі і čas vіdać na paneli kіravańnia OsmAnd і na vіdžecie
<string name="tts_missing_language_data">Niama ŭstalavanych dadzienych dla abranaj movy. Vy chočacie pajścі na Google Play, kab ustalavać?</string>
<string name="gpx_option_reverse_route">Razviarnuć kіrunak GPX</string>
<string name="gpx_option_destination_point">Vykarystoŭvać biahučy punkt pryznačeńnia</string>
<string name="gpx_option_from_start_point">Prajścі ŭvieś šlach spačatku</string>
<string name="gpx_option_from_start_point">Prajścі ŭvieś šlach</string>
<string name="switch_to_vector_map_to_see">Dla hetaha rehіjonu dastupnyja lakalnyja vektarnyja mapy.\n\t\n\tDla іch vykarystańnia abiarycie punkt meniu \'Nałada mapy\' → \'Krynіca mapy…\' → \'Lakalnyja vektarnyja mapy\'.</string>
<string name="choose_audio_stream">Vyvad hałasavych padkazak</string>
<string name="choose_audio_stream_descr">Abiarycie kanał dla hałasavych padkazak</string>
@ -2793,9 +2793,9 @@ U vypadku, kali vy lubіcie OsmAnd і OSM і chočacie padtrymać jaho, heta іd
<string name="add_point_before">Dadać kropku pierad</string>
<string name="add_point_after">Dadać kropku paslia</string>
<string name="shared_string_options">Opcyi</string>
<string name="measurement_tool_snap_to_road_descr">OsmAnd dadasć dadatkovyja kropki ŭ zaliežnasci ad typu navihacyi.</string>
<string name="measurement_tool_snap_to_road_descr">OsmAnd zlučyć kropki z maršrutam dlia abranaha profilia.</string>
<string name="measurement_tool_save_as_new_track_descr">Vy možać zachavać kropki, jak kropki maršrutu ci jak liniju.</string>
<string name="choose_navigation_type">Vybrać typ navihacyi</string>
<string name="choose_navigation_type">Abrać profiĺ navihacyi</string>
<string name="add_route_points">Dadać kropki maršrutu</string>
<string name="add_line">Dadać liniju</string>
<string name="empty_state_my_tracks">Dadact i zapisać sliady</string>

View file

@ -631,7 +631,7 @@
<string name="file_can_not_be_renamed">Файл ня можа быць пераназваны.</string>
<string name="file_with_name_already_exists">Файл з такой назвай ужо існуе.</string>
<string name="gpx_navigation">GPX маршрут</string>
<string name="gpx_navigation">GPX-маршрут</string>
<string name="poi_query_by_name_matches_categories">Некалькі катэгорый POI знойдзены, што адпавядаюць запыту:</string>
<string name="data_to_search_poi_not_available">Лякальных зьвестак для пошуку POI няма.</string>
<string name="poi_filter_by_name">Пошук па назве</string>
@ -715,7 +715,7 @@
<string name="tts_missing_language_data">Няма ўсталяваных дадзеных для абранай мовы. Вы хочаце пайсьці на Google Play, каб усталяваць?</string>
<string name="gpx_option_reverse_route">Развярнуць кірунак GPX</string>
<string name="gpx_option_destination_point">Выкарыстоўваць цяперашні пункт прызначэньня</string>
<string name="gpx_option_from_start_point">Прайсьці ўвесь шлях спачатку</string>
<string name="gpx_option_from_start_point">Прайсці ўвесь шлях</string>
<string name="switch_to_vector_map_to_see">Для гэтага рэгіёну даступныя лякальныя вэктарныя мапы.\n\t\n\tДля іх выкарыстаньня абярыце пункт мэню \'Налада мапы\' → \'Крыніца мапы…\' → \'Лякальныя вэктарныя мапы\'.</string>
<string name="choose_audio_stream">Вывад галасавых падказак</string>
<string name="choose_audio_stream_descr">Абярыце канал для галасавых падказак</string>
@ -1223,8 +1223,8 @@
<string name="index_name_canada">Паўночная Амэрыка - Канада</string>
<string name="index_name_italy">Эўропа - Італія</string>
<string name="index_name_gb">Эўропа - Вялікабрытанія</string>
<string name="calculate_osmand_route_without_internet">Вылічыць адрэзак маршруту OsmAnd без Інтэрнэту</string>
<string name="gpx_option_calculate_first_last_segment">Вылічыць маршрут OsmAnd для першага і апошняга ўчастка маршруту</string>
<string name="calculate_osmand_route_without_internet">Разлічыць адрэзак маршруту OsmAnd без Інтэрнэту</string>
<string name="gpx_option_calculate_first_last_segment">Разлічыць маршрут OsmAnd для першага і апошняга ўчастка маршруту</string>
<string name="use_displayed_track_for_navigation">Ці хочаце вы выкарыстоўваць адлюстраваны сьлед для навігацыі?</string>
<string name="route_info">Інфармацыя пра маршрут</string>
<string name="routing_attr_prefer_motorway_name">Аддаваць перавагу аўтамагістралям</string>
@ -1289,7 +1289,7 @@
<string name="voice_pref_title">Голас</string>
<string name="misc_pref_title">Рознае</string>
<string name="localization_pref_title">Лякалізацыя</string>
<string name="interrupt_music">Перапыненьне музыкі</string>
<string name="interrupt_music">Прыпыніць музыку</string>
<string name="osmo_settings_uuid">Унікальны ідэнтыфікатар прылады</string>
<string name="osmo_settings_descr">Глянуць унікальны рэгістрацыйны ключ прыстасаваньня і наладзіць асабісты канал адсочваньня</string>
<string name="osmo_plugin_description">Гэты модуль дае некаторыя функцыянальныя магчымасці для маніторынгу OpenStreetMap гл. https://osmo.mobi
@ -1605,7 +1605,7 @@
<string name="rendering_attr_shareTaxiRoutes_name">Маршрутныя таксі</string>
<string name="rendering_attr_tramTrainRoutes_name">Маршруты трамваяў і цягнікоў</string>
<string name="impassable_road">Пазьбягаць дарогі</string>
<string name="impassable_road">Пазбягаць дарог…</string>
<string name="rendering_category_hide">Схаваць</string>
<string name="wake_on_voice">Уключыць экран</string>
<string name="wake_on_voice_descr">Уключаць экран прыстасаваньня пры набліжэньні да павароту</string>
@ -2170,7 +2170,7 @@
<string name="live_updates">Аўтаматычныя абнаўленні</string>
<string name="select_voice_provider">Выберыце галасавыя ўказаньні</string>
<string name="select_voice_provider_descr">Выберыце ці сьцягніце галасавыя ўказаньні для вашай мовы</string>
<string name="impassable_road_desc">Выберыце дарогі, якія вы хочаце пазьбягаць падчас навігацыі</string>
<string name="impassable_road_desc">Абярыце дарогі, якія вы хочаце пазбягаць падчас навігацыі</string>
<string name="update_time">Час абнаўленьня</string>
<string name="updates_size">Абнаўленьні: %s</string>
@ -2842,9 +2842,9 @@
<string name="add_point_before">Дадаць кропку перад</string>
<string name="add_point_after">Дадаць кропку пасля</string>
<string name="shared_string_options">Опцыі</string>
<string name="measurement_tool_snap_to_road_descr">OsmAnd дадасць дадатковыя кропкі ў залежнасці ад тыпу навігацыі.</string>
<string name="measurement_tool_snap_to_road_descr">OsmAnd злучыць кропкі з маршрутам для абранага профіля.</string>
<string name="measurement_tool_save_as_new_track_descr">Вы можаць захаваць кропкі, як кропкі маршруту ці як лінію.</string>
<string name="choose_navigation_type">Выбраць тып навігацыі</string>
<string name="choose_navigation_type">Абраць профіль навігацыі</string>
<string name="add_route_points">Дадаць кропкі маршруту</string>
<string name="add_line">Дадаць лінію</string>
<string name="empty_state_my_tracks">Дадацт і запісаць сляды</string>

View file

@ -636,7 +636,7 @@ Memòria proporcional %4$s MB (límit de l\'Android %5$s MB, Dalvik %6$s MB).</s
<string name="basemap_missing">No es troba el mapa base mundial (cobreix tot el món però amb poc detall). És recomanable que us baixeu el fitxer World_basemap_x.obf per gaudir d\'una perspectiva global.</string>
<string name="vector_data_missing">No s\'ha trobat les dades descarregades («fora de línia») a la targeta SD. És recomanable que les baixeu per utilitzar mapes sense connexió.</string>
<string name="tts_missing_language_data">No hi ha dades instal·lades per la llengua seleccionada. Voleu anar al Market per instal·lar-ne?</string>
<string name="gpx_option_from_start_point">Passa al llarg de la traça sencera</string>
<string name="gpx_option_from_start_point">Passa per tota la traça sencera</string>
<string name="switch_to_vector_map_to_see">Hi ha un mapa de vectors fora de línia per aquesta localització.
\n\t\n\tPer activar-lo aneu a «Menú» → «Configuració del mapa» → «Font de mapes…» → «Mapes de vectors fora de línia».</string>
<string name="overlay_transparency_descr">Modifiqueu l\'opacitat de la capa superposada</string>
@ -1116,7 +1116,7 @@ Memòria proporcional %4$s MB (límit de l\'Android %5$s MB, Dalvik %6$s MB).</s
\nLes dades globals (entre 70 graus nord i 70 graus sud) estan basades en mesures del SRTM (Shuttle Radar Topography Mission) i del ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), un instrument de generació d\'imatges a bord de Terra, el satèl·lit insígnia del Sistema d\'Observació de la Terra de la NASA. ASTER és un esforç de col·laboració entre la NASA, el Ministeri d\'Economia i Comerç del Japó (METI) i la fundació Japan Space Systems (J-spacesystems).</string>
<string name="keep_and_add_destination_point">Afegeix com el següent punt de destinació</string>
<string name="calculate_osmand_route_without_internet">Calcula un segment de ruta a l\'OsmAnd sense Internet</string>
<string name="gpx_option_calculate_first_last_segment">Calcula una ruta a l\'OsmAnd pels seus segments primer i darrer</string>
<string name="gpx_option_calculate_first_last_segment">Calcula una ruta OsmAnd al primer i al darrer segment de la ruta</string>
<string name="use_displayed_track_for_navigation">Voleu utilitzar la traça visualitzada per la navegació?</string>
<string name="index_item_nation_addresses">adreces per tot el país</string>
<string name="index_item_world_altitude_correction">Correcció d\'altitud mundial</string>
@ -1174,7 +1174,7 @@ Memòria proporcional %4$s MB (límit de l\'Android %5$s MB, Dalvik %6$s MB).</s
<string name="misc_pref_title">Miscel·lània</string>
<string name="localization_pref_title">Ubicació</string>
<string name="interrupt_music_descr">Les indicacions de veu suspenen la reproducció de música, no s\'hi superposen</string>
<string name="interrupt_music">Interrompre la música</string>
<string name="interrupt_music">Atura la música</string>
<string name="osmo_settings_uuid">Identificador únic del dispositiu</string>
<string name="osmo_settings_descr">Configureu els paràmetres de monitorització i el canal de seguiment personal</string>
<string name="osmo_plugin_description">"Aquest connector us ofereix parcialment la funcionalitat de la Monitorització OpenStreetmap, consulteu http://osmo.mobi.

View file

@ -274,7 +274,7 @@ Proportional hukommelse %4$s MB (Android grænse %5$s MB, Dalvik %6$s MB).</stri
<string name="transport_search_desc">Kollektivtrafiksøgning</string>
<string name="favourites_search_desc">Favoritsøgning</string>
<string name="offline_navigation_not_available">OsmAnd offline navigation er midlertidig utilgængelig.</string>
<string name="offline_navigation_not_available">Offline navigation er midlertidig utilgængelig.</string>
<string name="left_side_navigation">Venstrekørsel</string>
<string name="left_side_navigation_descr">Vælg for lande med venstrekørsel</string>
@ -957,7 +957,7 @@ OSM er et i fællesskab drevet, globalt offentligt domæne kortlægningsprojekt.
<string name="new_route_calculated_dist">Ny rute beregnet, afstand</string>
<string name="arrived_at_destination">Ankommet til destinationen</string>
<string name="invalid_locations">Koordinaterne er ugyldige!</string>
<string name="go_back_to_osmand">Tilbage til OsmAnd-kortet</string>
<string name="go_back_to_osmand">Tilbage til kortet</string>
<string name="loading_data">Indlæser data…</string>
<string name="reading_indexes">Læser lokale data…</string>
<string name="previous_run_crashed">Sidste OsmAnd kørsel fejlede. Logfilen er i {0}. Rapporter hændelsen og vedhæft logfilen.</string>
@ -1208,11 +1208,11 @@ OSM er et i fællesskab drevet, globalt offentligt domæne kortlægningsprojekt.
<string name="guidance_preferences_descr">Indstillinger for navigation</string>
<string name="routing_preferences_descr">Indstillinger for ruteplanlægning</string>
<string name="app_mode_truck">Lastbil</string>
<string name="calculate_osmand_route_gpx">Beregn OsmAnd offline rute</string>
<string name="calculate_osmand_route_gpx">Beregn offline rute</string>
<string name="copying_osmand_one_file_descr">Kopierer fil (%s) til den ny placering…</string>
<string name="copying_osmand_files_descr">Kopierer OsmAnd datafiler til ny destination (%s)…</string>
<string name="copying_osmand_files">Kopierer OsmAnd datafiler…</string>
<string name="copying_osmand_files_descr">Kopierer datafiler til ny destination (%s)…</string>
<string name="copying_osmand_files">Kopierer datafiler…</string>
<string name="android_19_location_disabled">"Siden Android version 4.4 (KitKat) kan man ikke hente og opdatere kort i den tidligere lagerplacering (%s). Skift til den tilladte placering og kopiere alle OsmAnd datafiler dertil?         
\n Note 1: De gamle datafiler forbliver urørt. (men kan slettes manuelt).
\n Note 2: På den nye placering vil det ikke være muligt at dele filer mellem OsmAnd og OsmAnd+."</string>
@ -1237,8 +1237,8 @@ OSM er et i fællesskab drevet, globalt offentligt domæne kortlægningsprojekt.
<string name="keep_and_add_destination_point">Tilføj som efterfølgende destination</string>
<string name="use_displayed_track_for_navigation">Brug viste spor til navigation?</string>
<string name="calculate_osmand_route_without_internet">Beregn OsmAnd rutesegment uden internet</string>
<string name="gpx_option_calculate_first_last_segment">Beregn OsmAnd rute for første og sidste rutesegment</string>
<string name="calculate_osmand_route_without_internet">Beregn rutesegment uden internet</string>
<string name="gpx_option_calculate_first_last_segment">Beregn rute for første og sidste rutesegment</string>
<string name="lang_cy">Walisisk</string>
<string name="index_name_italy">Europa - Italien</string>
<string name="index_name_gb">Europa - Storbritannien</string>

View file

@ -2756,9 +2756,9 @@ Indikas lokon: %1$s x %2$s"</string>
<string name="add_point_before">Aldoni punkton antaŭe</string>
<string name="add_point_after">Aldoni punkton sekve</string>
<string name="shared_string_options">Agordoj</string>
<string name="measurement_tool_snap_to_road_descr">OsmAnd aldonos pliajn punktojn depende de speco de navigado.</string>
<string name="measurement_tool_snap_to_road_descr">OsmAnd kunigos punktojn al vojojn ĉe la elektita profilo.</string>
<string name="measurement_tool_save_as_new_track_descr">Vi povas konservi punktojn kiel kurspunktojn aŭ linion.</string>
<string name="choose_navigation_type">Elektu specon de navigado</string>
<string name="choose_navigation_type">Elektu profilon de navigado</string>
<string name="add_route_points">Aldoni kurspunktojn</string>
<string name="add_line">Aldoni linion</string>
<string name="empty_state_my_tracks">Aldoni kaj registri spurojn</string>

View file

@ -621,7 +621,7 @@ Biltegiratzean {1} MB erabiliko dira.
<string name="select_search_position">Jatorria:</string>
<string name="context_menu_item_search">Bilatu honen inguruan</string>
<string name="shared_string_save_as_gpx">Gorde GPX lorratz gisa</string>
<string name="shared_string_save_as_gpx">Gorde GPX lorratz berri gisa</string>
<string name="route_successfully_saved_at">Ibilbidea \'%1$s\' bezala ongi gorde da.</string>
<string name="filename_input">Fitxategi-izena:</string>
<string name="file_with_name_already_exist">Izen berdineko beste fitxategi bat dago dagoeneko.</string>
@ -2594,7 +2594,7 @@ Area honi dagokio: %1$s x %2$s</string>
<string name="do_not_send_anonymous_app_usage">Ez bidali aplikazioaren erabilera estatistika anonimoak</string>
<string name="do_not_send_anonymous_app_usage_desc">OsmAndek aplikazioan irekitzen dituzun atalei buruzko informazioa jasotzen du. Zure kokalekua ez da inoiz bidaltzen, ezta aplikazioan idazten duzun ezer edo ikusi, bilatu edo deskargatzen dituzun zonaldeei buruzko ezer ere.</string>
<string name="do_not_show_startup_messages">Ez erakutsi mezuak hasieran</string>
<string name="do_not_show_startup_messages_desc">Aplikazioen deskontuak eta tokiko gertaeren inguruko mezuak bistaratzen ditu</string>
<string name="do_not_show_startup_messages_desc">Aplikazioen deskontuak eta tokiko gertaera berezien mezuak ezkutatzen ditu</string>
<string name="parking_options">Aparkatzeko aukerak</string>
<string name="full_version_thanks">Eskerrik asko OsmAnd aplikazioaren bertsio osoa erosteagatik!</string>
<string name="routing_attr_relief_smoothness_factor_hills_name">Menditsua</string>
@ -2771,4 +2771,26 @@ Area honi dagokio: %1$s x %2$s</string>
<string name="add_point_before">Gehitu puntua aurretik</string>
<string name="add_point_after">Gehitu puntua atzetik</string>
<string name="shared_string_options">Aukerak</string>
</resources>
<string name="move_all_to_history">Eraman guztia historialera</string>
<string name="build_route">Kalkulatu ibilbidea</string>
<string name="show_direction">Erakutsi norabidea</string>
<string name="sort_by">Ordenatu honela</string>
<string name="marker_options">Markatzaile-aukerak</string>
<string name="do_not_use_animations">Ez erabili animazioak</string>
<string name="do_not_use_animations_descr">Aplikazioaren animazioak desgaitzen ditu</string>
<string name="keep_showing_on_map">Jarraitu mapan erakusten</string>
<string name="exit_without_saving">Irten gorde gabe?</string>
<string name="measurement_tool_save_as_new_track_descr">Puntuak puntu ala lerro gisa gorde ditakezu</string>
<string name="measurement_tool_snap_to_road_descr">OsmAndek puntuak hautatutako profilaren ibilbideekin lotuko ditu.</string>
<string name="choose_navigation_type">Hautatu nabigazio profila</string>
<string name="add_route_points">Gehitu ibilbide-puntuak</string>
<string name="add_line">Gehitu lerroa</string>
<string name="empty_state_my_tracks">Gehitu eta grabatu lorratzak</string>
<string name="empty_state_my_tracks_desc">Grabatu edo inportatu lorratzak ikusteko</string>
<string name="empty_state_favourites">Gehitu gogokoak</string>
<string name="empty_state_favourites_desc">Gehitu gogokoak mapan edo inportatu hauek fitxategi sistematik</string>
<string name="import_track">Inportatu lorratza</string>
<string name="import_track_desc">%1$s fitxategiak ez du bide-punturik, inportatu lorratz gisa?</string>
<string name="move_point">Mugitu puntua</string>
<string name="add_segment_to_the_track">Gehitu GPX lorratzera</string>
</resources>

View file

@ -2897,4 +2897,9 @@ Copertura e qualità approssimativamente:
<string name="save_route_point">Salva il Punto Percorso</string>
<string name="route_point_one">Punto Percorso 1</string>
<string name="empty_state_my_tracks">Aggiungi e registra Tracce</string>
<string name="move_all_to_history">Sposta tutto nella cronologia</string>
<string name="build_route">Costruisci un percorso</string>
<string name="show_direction">Mostra la direzione</string>
<string name="sort_by">Ordina per</string>
<string name="marker_options">Opzioni marcatori</string>
</resources>

View file

@ -1775,8 +1775,8 @@
<string name="route_calculation">Ruteutregning</string>
<string name="gpx_appearance">Utseende</string>
<string name="osmo_pause_location">Pause</string>
<string name="osmo_service_running">OsMo-tjenester kjører</string>
<string name="shared_string_notifications">Merknader</string>
<string name="osmo_service_running">OsMo-tjeneste kjører</string>
<string name="shared_string_notifications">Varsler</string>
<string name="shared_string_continue">Fortsett</string>
<string name="shared_string_pause">Pause</string>
<string name="shared_string_trip">Tur</string>
@ -2363,10 +2363,11 @@ Representerer området: %1$s x %2$s</string>
<string name="shared_string_time_moving">Tid i bevegelse</string>
<string name="shared_string_time_span">Varighet</string>
<string name="shared_string_max">Maks.</string>
<string name="routing_attr_relief_smoothness_factor_name">Velg høydesvingninger</string>
<string name="routing_attr_relief_smoothness_factor_name">Velg preferanse for høydeforskjeller</string>
<string name="move_all_to_history">Flytt alle til historikk</string>
<string name="build_route">Lag rute</string>
<string name="show_direction">Vis retning</string>
<string name="sort_by">Sorter etter</string>
<string name="marker_options">Markøralternativer</string>
<string name="shared_string_paused">I pausemodus</string>
</resources>

View file

@ -2831,8 +2831,8 @@ Reprezentuje obszar: %1$s x %2$s</string>
<string name="import_track_desc">Plik %1$s nie zawiera punktów trasy, czy zaimportować go jako ślad?</string>
<string name="move_point">Przesuń punkt</string>
<string name="add_segment_to_the_track">Dodaj do śladu GPX</string>
<string name="keep_showing_on_map">Wciąż wyświetlaj na mapie</string>
<string name="exit_without_saving">Czy wyjść bez zapisywania?</string>
<string name="keep_showing_on_map">Wyświetlanie na mapie</string>
<string name="exit_without_saving">Zakończyć bez zapisywania?</string>
<string name="do_not_use_animations">Wyłącz animacje</string>
<string name="do_not_use_animations_descr">Wyłącza animacje w programie</string>
<string name="move_all_to_history">Przenieś wszystkie do historii</string>

View file

@ -505,7 +505,7 @@
<string name="poi_travel_agent">Турагентство</string>
<string name="poi_viewpoint">Место с хорошим видом</string>
<string name="poi_camp_site">Место для лагеря</string>
<string name="poi_caravan_site">Место для ночлега</string>
<string name="poi_caravan_site">Ночлег</string>
<string name="poi_picnic_site">Место для пикника</string>
<string name="poi_spring">Родник</string>
<string name="poi_cemetery">Кладбище</string>

View file

@ -2472,4 +2472,20 @@
<string name="rendering_value_translucent_pink_name">Прозрачно-розовый</string>
<string name="lang_ber">Берберский язык</string>
<string name="move_all_to_history">Переместить все в историю</string>
<string name="sort_by">Сортировать по</string>
<string name="marker_options">Параметры маркера</string>
<string name="do_not_use_animations">Не использовать анимацию</string>
<string name="do_not_use_animations_descr">Отключение анимации в приложении</string>
<string name="exit_without_saving">Выйти без сохранения?</string>
<string name="save_as_route_point">Сохранить как точки маршрута</string>
<string name="save_as_line">Сохранить как линию</string>
<string name="route_point">Точка маршрута</string>
<string name="edit_line">Редактировать линию</string>
<string name="add_point_before">Добавить точку перед</string>
<string name="add_point_after">Добавить точку после</string>
<string name="shared_string_options">Параметры</string>
<string name="measurement_tool_snap_to_road_descr">OsmAnd соединит точки с маршрутом для выбранного профиля.</string>
<string name="measurement_tool_save_as_new_track_descr">Вы можете сохранить точки, как точки маршрута или как линию.</string>
<string name="choose_navigation_type">Выберите профиль навигации</string>
<string name="of">%1$d из %2$d</string>
</resources>

View file

@ -494,7 +494,7 @@
<string name="menu_mute_off">Zvuk zapnutý</string>
<string name="menu_mute_on">Zvuk vypnutý</string>
<string name="voice_provider_descr">Výber hlasových údajov pre navigáciu</string>
<string name="voice_provider">Hlasové údaje</string>
<string name="voice_provider">Hlasové pokyny</string>
<string name="voice_data_initializing">Inicializácia hlasových údajov…</string>
<string name="voice_data_not_supported">Nepodporovaná verzia hlasových údajov</string>
<string name="voice_data_corrupted">Vybrané hlasové údaje sú poškodené</string>
@ -2857,4 +2857,9 @@ Zodpovedá oblasti: %1$s x %2$s</string>
<string name="do_not_use_animations_descr">Vypne animácie v aplikácii</string>
<string name="keep_showing_on_map">Zobrazovať ďalej na mape</string>
<string name="exit_without_saving">Ukončiť bez uloženia?</string>
<string name="move_all_to_history">Presunúť všetko do histórie</string>
<string name="build_route">Zostaviť trasu</string>
<string name="show_direction">Zobraziť smer</string>
<string name="sort_by">Zotriediť podľa</string>
<string name="marker_options">Možnosti značiek</string>
</resources>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><resources>
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="about_version">Верзија:</string>
<string name="shared_string_about">Oko</string>
<string name="about_settings_descr">Верзија инфо, лиценце, чланови пројекта</string>
@ -428,14 +429,14 @@
<string name="lang_mk">Македонски</string>
<string name="read_more">Прочитај више</string>
<string name="whats_new">Шта је ново</string>
<string name="rendering_attr_hideProposed_name">Сакриј предложене предмете</string>
<string name="rendering_attr_hideProposed_name">Предложени објекти</string>
<string name="shared_string_update">Освежи</string>
<string name="shared_string_upload">Отпреми</string>
<string name="world_map_download_descr">Основна карта света (која покрива целу Земљу при погледу издалека) не постоји или је застарела. Молим, преузмите основну карту света за употпуњавање радне средине.</string>
<string name="shared_string_qr_code">КуР-ски код</string>
<string name="map_downloaded">Карта је преузета</string>
<string name="map_downloaded_descr">Карта %1$s је преузета. Може да се вратите на карту и почнете да је користите.</string>
<string name="go_to_map">Иди на карту</string>
<string name="go_to_map">Прикажи карту</string>
<string name="simulate_initial_startup_descr">Поставља заставицу која приказује прво покретање, све остале поставке оставља непромењеним</string>
<string name="simulate_initial_startup">Подражавај прво покретање програма</string>
<string name="share_menu_location">Дели свој положај</string>
@ -758,7 +759,7 @@
<string name="enable_sleep_mode">Омогући рад у позадини ГПИкс-а</string>
<string name="save_track_to_gpx_globally">Уписуј путању у датотеку ГПИкс-а</string>
<string name="save_track_to_gpx_globally_headline">Праћење путање по захтеву</string>
<string name="item_removed">Избрисана ставка</string>
<string name="item_removed">Ставка уклоњена</string>
<string name="n_items_removed">избрисане ставке</string>
<string name="shared_string_undo_all">ОПОЗОВИ СВЕ</string>
<string name="shared_string_type">Врста</string>
@ -791,7 +792,7 @@
<string name="gpx_info_start_time">"Почетно време: %1$tF, %1$tT "</string>
<string name="gpx_info_end_time">"Време завршетка: %1$tF, %1$tT "</string>
<string name="gpx_info_average_speed">"Просечна брзина: %1$s "</string>
<string name="gpx_info_maximum_speed">"Највећа брзина: %1$s "</string>
<string name="gpx_info_maximum_speed">Највећа брзина: %1$s</string>
<string name="gpx_info_avg_altitude">Просечна висина: %1$s</string>
<string name="gpx_info_diff_altitude">Распон висине: %1$s</string>
<string name="gpx_info_asc_altitude">Падина/успон: %1$s</string>
@ -841,7 +842,7 @@
<string name="osmo_group_name">Име скупа</string>
<string name="osmo_connect_to_device">Веза са уређајем</string>
<string name="osmo_connect_to_group">Веза са скупом</string>
<string name="osmo_connect">Повежи се са</string>
<string name="osmo_connect">Придружи се</string>
<string name="osmo_create_group">Направи скуп</string>
<string name="osmo_server_operation_failed">Дејство услуге ОсМа није успело</string>
<string name="osmo_activity">Надзор Опенстритмапа</string>
@ -1069,7 +1070,7 @@
<string name="shared_string_status">Стање</string>
<string name="shared_string_save_changes">Сачувај измене</string>
<string name="shared_string_email_address">Адреса е-поште</string>
<string name="rendering_attr_hideUnderground_name">Сакриј подземне предмете</string>
<string name="rendering_attr_hideUnderground_name">Подземни објекти</string>
<string name="data_is_not_available">Нема доступних података</string>
<string name="shared_string_remove">Уклони</string>
<string name="shared_string_read_more">Сазнајте више</string>
@ -1111,9 +1112,9 @@
<string name="release_2_5"/>
<string name="rendering_attr_contourColorScheme_description">Образац боја линија обриса</string>
<string name="save_track_min_speed">Најмања брзина бележења</string>
<string name="save_track_min_speed_descr">Постави најмању брзину која ће бити бележена тачка</string>
<string name="save_track_min_distance">Препознавање покрета бележења</string>
<string name="save_track_min_distance_descr">Постави најмање растојање од последњег положаја за бележење тачке</string>
<string name="save_track_min_speed_descr">Филтер: Постави најмању брзину при којој ће тачка бити записана</string>
<string name="save_track_min_distance">Најмањи померај бележења</string>
<string name="save_track_min_distance_descr">Филтер: Постави најмање растојање од последњег положаја за бележење тачке</string>
<string name="save_track_precision">Најмања тачност бележења</string>
<string name="save_track_precision_descr">Постави најмању прецизност за бележење тачке</string>
<string name="christmas_poi">Божићне тачке</string>
@ -1145,7 +1146,7 @@
<string name="get_for">Добавите за %1$s</string>
<string name="get_for_month">Добавите за %1$s месечно</string>
<string name="osm_live_banner_desc">Добавите неограничено преузимање и надоградње карата више пута месечно: седмично, дневно или часовно.</string>
<string name="osmand_plus_banner_desc">Пуно издање ОсмАнда са неограниченим преузимањем карата и месечним надоградњама карата.</string>
<string name="osmand_plus_banner_desc">Неограничена преузимања карти, надоградње, прикључак за Википедију.</string>
<string name="si_mi_meters">Миље/метри</string>
<string name="skip_map_downloading">Прескочи преузимање карата</string>
<string name="skip_map_downloading_desc">Немате уграђених карата. Можете изабрати карту са списка или преузети карте касније преко Изборника - %1$s.</string>
@ -1178,7 +1179,7 @@
<string name="back_to_search">Назад на претрагу</string>
<string name="confirmation_to_delete_history_items">Желите ли уклонити изабране ставке из историје?</string>
<string name="show_something_on_map">Прикажи на карти %1$s</string>
<string name="share_history_subject">" дељено преко ОсмАнда"</string>
<string name="share_history_subject">дељено преко ОсмАнда</string>
<string name="search_categories">Врсте</string>
<string name="postcode">Поштански број</string>
<string name="shared_string_from">из</string>
@ -1307,7 +1308,7 @@
<string name="rendering_value_medium_name">Средње</string>
<string name="rendering_value_bold_name">Дебело</string>
<string name="report">Извештај</string>
<string name="osmo_tracker_id_descr">Кликните за преглед ЛБ-а пратиоца</string>
<string name="osmo_tracker_id_descr">Тапните за приказ ИД-а пратиоца</string>
<string name="storage_permission_restart_is_required">Апликацији је сада дозвољен упис на спољно складиште. Неопходно је да ручно поново покренете апликацију.</string>
<string name="dist_away_from_my_location">Тражи на растојању %1$s</string>
<string name="shared_string_move_up">Помери навише</string>
@ -1360,7 +1361,7 @@
<string name="shared_string_reverse_order">Обрнут редослед</string>
<string name="clear_markers_history_q">Да ли желите да очистите историју ознака карата?</string>
<string name="map_marker">Ознака карте</string>
<string name="consider_turning_polygons_off">Препоручиво је да искључите приказ многоуглова</string>
<string name="consider_turning_polygons_off">Препоручиво је да искључите приказ многоуглова.</string>
<string name="show_polygons">Приказуј многоуглове</string>
<string name="road_blocked">Пут је препречен</string>
<string name="rendering_attr_horseRoutes_name">Коњски путеви</string>
@ -1389,7 +1390,7 @@
<string name="restart_search">Препокрени претрагу</string>
<string name="increase_search_radius">Повећај област претраге</string>
<string name="nothing_found">Нема ничег пронађеног :(</string>
<string name="nothing_found_descr">Покушајте преправити упит претраге или увећајте област претраге</string>
<string name="nothing_found_descr">Преправите упит претраге или увећајте област претраге</string>
<string name="quick_action_showhide_osmbugs_title">Приказ/скривање белешки ОСМ-а</string>
<string name="quick_action_osmbugs_show">Прикажи белешке ОСМ-а</string>
<string name="quick_action_osmbugs_hide">Сакриј белешке ОСМ-а</string>
@ -1415,8 +1416,8 @@
<string name="select_postcode">Изаберите поштански број</string>
<string name="quick_action_auto_zoom">Укључити/искључити самостално увећање карте</string>
<string name="quick_action_auto_zoom_desc">Тапкање на дугмету радње ће укључити/искључити самоувећање карте према брзини кретања.</string>
<string name="quick_action_auto_zoom_on">Самоувећање карте укључи</string>
<string name="quick_action_auto_zoom_off">Самоувећање карте искључи</string>
<string name="quick_action_auto_zoom_on">Укључи самоувећање карте</string>
<string name="quick_action_auto_zoom_off">Искључи самоувећање карте</string>
<string name="quick_action_add_destination">Додај одредиште</string>
<string name="quick_action_replace_destination">Замени одредиште</string>
<string name="quick_action_add_destination_desc">Тапкање на дугме радње ће додати одредиште на средишњи положај екрана. Претходно постављено одредиште ће постати последња међутачка.</string>
@ -1436,15 +1437,15 @@
<string name="do_not_send_anonymous_app_usage">Не шаљи безимене податке о коришћеном програму</string>
<string name="do_not_send_anonymous_app_usage_desc">Османд прикупља податке о томе које делове програма отварате. Ваш положај се не шаље, нити ишта што унесете у програм нити појединости о областима које видите, тражите или преузмете.</string>
<string name="do_not_show_startup_messages">Не приказуј поруке при покретању</string>
<string name="do_not_show_startup_messages_desc">Приказује попусте у програму и нарочите месне поруке догађаја</string>
<string name="do_not_show_startup_messages_desc">Потискује приказ попуста у програму и посебне месне поруке догађаја</string>
<string name="parking_options">Могућности паркирања</string>
<string name="full_version_thanks">Хвала Вам за куповину пуног издања Османда!</string>
<string name="routing_attr_relief_smoothness_factor_hills_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_driving_style_speed_name">Брзина</string>
<string name="routing_attr_driving_style_speed_name">Краће руте</string>
<string name="routing_attr_driving_style_balance_name">Уравнотежено</string>
<string name="routing_attr_driving_style_safety_name">Безбедност</string>
<string name="routing_attr_driving_style_safety_name">Преферирај споредне</string>
<string name="relief_smoothness_factor_descr">Омиљени терен: равно или брдовито</string>
<string name="shared_string_slope">Нагиб</string>
<string name="add_new_folder">Додај нови омот</string>
@ -1453,7 +1454,7 @@
<string name="route_points_category_name">Број скретања на овом путу</string>
<string name="track_points_category_name">Истакнуте тачке на овом путу</string>
<string name="gpx_track">Стазе</string>
<string name="max_speed">Највећа дозвољена брзина</string>
<string name="max_speed">Највећа брзина</string>
<string name="average_speed">Просечна брзина</string>
<string name="shared_string_time_moving">Време кретања</string>
<string name="shared_string_time_span">Временски распон</string>

View file

@ -549,7 +549,7 @@
<string name="menu_mute_off">Звук увімкнено</string>
<string name="menu_mute_on">Звук вимкнено</string>
<string name="voice_provider_descr">Виберіть голосові вказівки для навігації</string>
<string name="voice_provider">Голосові дані</string>
<string name="voice_provider">Голосові настанови</string>
<string name="voice_data_initializing">Ініціалізуються голосові дані…</string>
<string name="voice_data_not_supported">Голосові дані не підтримуються поточною версією програми</string>
<string name="voice_data_corrupted">Голосові дані неправильного формату або пошкоджені</string>
@ -1179,7 +1179,7 @@
<string name="distance_measurement_clear_route">Очистити всі точки</string>
<string name="distance_measurement_load_gpx">Відкрити збережений GPX</string>
<string name="cancel_route">Відмінити маршрут</string>
<string name="cancel_route">Відхилити маршрут</string>
<string name="search_street_in_neighborhood_cities">Шукати в навколишніх містах</string>
<string name="intermediate_items_sort_return">Проміжні точки впорядковано оптимальним чином від поточної до кінцевої.</string>
<string name="intermediate_items_sort_by_distance">Впорядкувати за відстанню</string>
@ -1524,7 +1524,7 @@
<string name="index_name_gb">Європа - Великобританія</string>
<string name="calculate_osmand_route_without_internet">Розрахувати ділянку маршруту OsmAnd без Інтернету</string>
<string name="gpx_option_calculate_first_last_segment">Обчислити маршрут OsmAnd для першого та останнього сегментів маршруту</string>
<string name="use_displayed_track_for_navigation">Бажаєте використовувати показаний трек для навігації?</string>
<string name="use_displayed_track_for_navigation">Чи Ви хочете використовувати відображення треку для навігації?</string>
<string name="keep_and_add_destination_point">Додати як наступний пункт призначення</string>
<string name="select_gpx">Обрати GPX…</string>
<string name="route_descr_select_destination">Виберіть пункт призначення</string>
@ -1592,7 +1592,7 @@
<string name="route_descr_destination">Місце призначення</string>
<string name="interrupt_music_descr">Голосові підказки призупиняють музику, а не лише зменшують гучність</string>
<string name="interrupt_music">Пауза музики</string>
<string name="interrupt_music">Призупинити музику</string>
<string name="share_route_as_gpx">Поділитись маршрутом за допомоги файлу GPX</string>
<string name="share_route_subject">Маршрут наданий через OsmAnd</string>
<string name="arrival_distance">Оголошення прибуття</string>
@ -1748,7 +1748,7 @@
<string name="shared_string_my_location">Моя позиція</string>
<string name="navigation_over_track">Почати навігацію по треку?</string>
<string name="navigation_over_track">Почати навігацію уздовж треку?</string>
<string name="avoid_roads_msg">Ви можете вибрати альтернативний маршрут, вибравши дороги, які варто уникати</string>
<string name="speak_pedestrian">Пішохідні переходи</string>
@ -2261,7 +2261,7 @@
<string name="shared_string_toolbar">Панель інструментів</string>
<string name="shared_string_widgets">Віджети</string>
<string name="map_markers_other">Інші позначки</string>
<string name="map_markers_other">Інші маркери</string>
<string name="download_files_error_not_enough_space">Недостатньо пам\'яті!
Необхідно {3} МБ тимчасової та {1} МБ постійної пам\'яті.
На разі доступно лише {2} МБ.</string>
@ -2744,7 +2744,7 @@
<string name="relief_smoothness_factor_descr">Переважний рельєф: рівнинний або гористий</string>
<string name="routing_attr_relief_smoothness_factor_name">Вибрати пересіченість місцевості</string>
<string name="shared_string_paused">Призупинено</string>
<string name="route_is_too_long_v2">Можливо, буде потрібно дуже багато часу для локального (оффлайн) розрахунку маршруту. Будь ласка, додайте один або більше проміжних пунктів на маршруті, якщо розрахунок не завершений через 10 чи більше хвилин.</string>
<string name="route_is_too_long_v2">Цей маршрут може бути надто довгим для розрахунку. Будь ласка, додайте проміжні пункти призначення, якщо протягом 10 хвилин не знайдено жодного результату.</string>
<string name="osmand_extended_description_part1">"OsmAnd (OSM Автоматична Навігація До цілі) — застосунок для мап і навігації з доступом до безкоштовних високоякісних глобальних даних OpenStreetMap (OSM).
\n
\nНасолоджуйтесь голосовою та візуальною навігацією, переглядайте цікаві точки (англ. POI), створюйте та керуйте GPX-треками, переглядайте контурні лінії та дані про висоту (за допомогою зовнішнього втулка), перемикайтеся між режимами автомобіліста, велосипедиста й пішохода, редагуйте OSM та ще багато цікавого."</string>

View file

@ -25,7 +25,7 @@ public class OsmandBackupAgent extends BackupAgentHelper {
SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, prefs);
addHelper("osmand.settings", helper);
FileBackupHelper fileBackupHelper = new FileBackupHelper(this, FavouritesDbHelper.FAVOURITE_DB_NAME);
addHelper("osmand.favorites", fileBackupHelper);
FileBackupHelper fileBackupHelper = new FileBackupHelper(this, FavouritesDbHelper.FILE_TO_BACKUP);
addHelper(FavouritesDbHelper.FILE_TO_BACKUP, fileBackupHelper);
}
}

View file

@ -30,7 +30,7 @@ import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.measurementtool.NewGpxData;
import net.osmand.plus.myplaces.FavoritesActivity;
import net.osmand.plus.myplaces.SplitSegmentFragment;
import net.osmand.plus.myplaces.SplitSegmentDialogFragment;
import net.osmand.plus.myplaces.TrackPointFragment;
import net.osmand.plus.myplaces.TrackSegmentFragment;
import net.osmand.plus.views.AddGpxPointBottomSheetHelper.NewGpxPoint;
@ -61,10 +61,6 @@ public class TrackActivity extends TabActivity {
private boolean openPointsTab = false;
private boolean openTracksList = false;
public PagerSlidingTabStrip getSlidingTabLayout() {
return slidingTabLayout;
}
@Override
public void onCreate(Bundle icicle) {
this.app = getMyApplication();
@ -294,8 +290,8 @@ public class TrackActivity extends TabActivity {
Fragment frag = f.get();
if (frag instanceof TrackSegmentFragment) {
((TrackSegmentFragment) frag).updateContent();
} else if (frag instanceof SplitSegmentFragment) {
((SplitSegmentFragment) frag).reloadSplitFragment();
} else if (frag instanceof SplitSegmentDialogFragment) {
((SplitSegmentDialogFragment) frag).updateContent();
} else if (frag instanceof TrackPointFragment) {
((TrackPointFragment) frag).setContent();
}
@ -348,23 +344,6 @@ public class TrackActivity extends TabActivity {
int itemId = item.getItemId();
switch (itemId) {
case android.R.id.home:
int backStackEntriesCount = getSupportFragmentManager().getBackStackEntryCount();
if (backStackEntriesCount > 0) {
FragmentManager.BackStackEntry backStackEntry = getSupportFragmentManager().getBackStackEntryAt(getSupportFragmentManager().getBackStackEntryCount() - 1);
if (backStackEntry.getName().equals(SplitSegmentFragment.TAG)) {
for (WeakReference<Fragment> f : fragList) {
Fragment frag = f.get();
if (frag instanceof TrackSegmentFragment) {
((TrackSegmentFragment) frag).updateSplitView();
}
}
getSupportFragmentManager().popBackStack();
if (isHavingWayPoints() || isHavingRoutePoints()) {
getSlidingTabLayout().setVisibility(View.VISIBLE);
}
return true;
}
}
if (getIntent().hasExtra(MapActivity.INTENT_KEY_PARENT_MAP_ACTIVITY) || openTracksList) {
OsmAndAppCustomization appCustomization = getMyApplication().getAppCustomization();
final Intent favorites = new Intent(this, appCustomization.getFavoritesActivity());
@ -379,25 +358,17 @@ public class TrackActivity extends TabActivity {
return false;
}
@Override
public void onBackPressed() {
int backStackEntriesCount = getSupportFragmentManager().getBackStackEntryCount();
if (backStackEntriesCount > 0) {
FragmentManager.BackStackEntry backStackEntry = getSupportFragmentManager().getBackStackEntryAt(getSupportFragmentManager().getBackStackEntryCount() - 1);
if (backStackEntry.getName().equals(SplitSegmentFragment.TAG)) {
for (WeakReference<Fragment> f : fragList) {
Fragment frag = f.get();
if (frag instanceof TrackSegmentFragment) {
((TrackSegmentFragment) frag).updateSplitView();
}
}
getSupportFragmentManager().popBackStack();
if (isHavingWayPoints() || isHavingRoutePoints()) {
getSlidingTabLayout().setVisibility(View.VISIBLE);
}
return;
public void updateSplitView() {
for (WeakReference<Fragment> f : fragList) {
Fragment frag = f.get();
if (frag instanceof TrackSegmentFragment) {
((TrackSegmentFragment) frag).updateSplitView();
}
}
}
@Override
public void onBackPressed() {
if (openTracksList) {
OsmAndAppCustomization appCustomization = getMyApplication().getAppCustomization();
final Intent favorites = new Intent(this, appCustomization.getFavoritesActivity());

View file

@ -0,0 +1,719 @@
package net.osmand.plus.myplaces;
import android.content.DialogInterface;
import android.content.res.ColorStateList;
import android.graphics.Paint;
import android.graphics.Rect;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.ListPopupWindow;
import android.support.v7.widget.Toolbar;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import net.osmand.AndroidUtils;
import net.osmand.plus.GPXUtilities;
import net.osmand.plus.GPXUtilities.GPXTrackAnalysis;
import net.osmand.plus.GpxSelectionHelper;
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItemType;
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
import net.osmand.plus.IconsCache;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.TrackActivity;
import net.osmand.plus.helpers.FontCache;
import net.osmand.util.Algorithms;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import gnu.trove.list.array.TIntArrayList;
import static net.osmand.plus.myplaces.TrackSegmentFragment.ARG_TO_FILTER_SHORT_TRACKS;
public class SplitSegmentDialogFragment extends DialogFragment {
public final static String TAG = "SPLIT_SEGMENT_DIALOG_FRAGMENT";
private OsmandApplication app;
private SplitSegmentsAdapter adapter;
private View headerView;
private GpxDisplayItemType[] filterTypes = {GpxDisplayItemType.TRACK_SEGMENT};
private List<String> options = new ArrayList<>();
private List<Double> distanceSplit = new ArrayList<>();
private TIntArrayList timeSplit = new TIntArrayList();
private int selectedSplitInterval;
private IconsCache ic;
private int minMaxSpeedLayoutWidth;
private Paint minMaxSpeedPaint;
private Rect minMaxSpeedTextBounds;
private ListView listView;
private ProgressBar progressBar;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
app = getMyApplication();
ic = app.getIconsCache();
boolean isLightTheme = app.getSettings().OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_THEME;
int themeId = isLightTheme ? R.style.OsmandLightTheme : R.style.OsmandDarkTheme;
setStyle(STYLE_NO_FRAME, themeId);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
listView.setBackgroundColor(getResources().getColor(
getMyApplication().getSettings().isLightContent() ? R.color.ctx_menu_info_view_bg_light
: R.color.ctx_menu_info_view_bg_dark));
getTrackActivity().onAttachFragment(this);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
minMaxSpeedPaint = new Paint();
minMaxSpeedPaint.setTextSize(getResources().getDimension(R.dimen.default_split_segments_data));
minMaxSpeedPaint.setTypeface(FontCache.getFont(getContext(), "fonts/Roboto-Medium.ttf"));
minMaxSpeedPaint.setStyle(Paint.Style.FILL);
minMaxSpeedTextBounds = new Rect();
final View view = getActivity().getLayoutInflater().inflate(R.layout.split_segments_layout, container, false);
Toolbar toolbar = (Toolbar) view.findViewById(R.id.split_interval_toolbar);
TextView titleTextView = (TextView) toolbar.findViewById(R.id.title);
if (app.getSettings().isLightContent()) {
titleTextView.setTextAppearance(getContext(), R.style.Widget_Styled_LightActionBarHeader);
} else {
titleTextView.setTextAppearance(getContext(), R.style.TextAppearance_AppCompat_Widget_ActionBar_Title);
}
ActionBar trackActivityActionBar = getTrackActivity().getSupportActionBar();
if (trackActivityActionBar != null) {
titleTextView.setText(trackActivityActionBar.getTitle());
}
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.ic_arrow_back));
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dismiss();
}
});
progressBar = view.findViewById(R.id.progress_bar);
listView = (ListView) view.findViewById(R.id.list);
listView.setDivider(null);
listView.setDividerHeight(0);
adapter = new SplitSegmentsAdapter(new ArrayList<GpxDisplayItem>());
headerView = view.findViewById(R.id.header_layout);
((ImageView) headerView.findViewById(R.id.header_split_image)).setImageDrawable(ic.getIcon(R.drawable.ic_action_split_interval, app.getSettings().isLightContent() ? R.color.icon_color : 0));
listView.addHeaderView(getActivity().getLayoutInflater().inflate(R.layout.gpx_split_segments_empty_header, null, false));
listView.addFooterView(getActivity().getLayoutInflater().inflate(R.layout.list_shadow_footer, null, false));
listView.setOnScrollListener(new AbsListView.OnScrollListener() {
int previousYPos = -1;
@Override
public void onScrollStateChanged(AbsListView absListView, int i) {
if (i == SCROLL_STATE_IDLE) {
previousYPos = -1;
}
}
@Override
public void onScroll(AbsListView absListView, int i, int i1, int i2) {
View c = absListView.getChildAt(0);
if (c != null) {
int currentYPos = -c.getTop() + absListView.getFirstVisiblePosition() * c.getHeight();
if (previousYPos == -1) {
previousYPos = currentYPos;
}
float yTranslationToSet = headerView.getTranslationY() + (previousYPos - currentYPos);
if (yTranslationToSet < 0 && yTranslationToSet > -headerView.getHeight()) {
headerView.setTranslationY(yTranslationToSet);
} else if (yTranslationToSet < -headerView.getHeight()) {
headerView.setTranslationY(-headerView.getHeight());
} else if (yTranslationToSet > 0) {
headerView.setTranslationY(0);
}
previousYPos = currentYPos;
}
}
});
listView.setAdapter(adapter);
return view;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
updateContent();
}
private void updateHeader() {
final View splitIntervalView = headerView.findViewById(R.id.split_interval_view);
if (getGpx() != null && !getGpx().showCurrentTrack && adapter.getCount() > 0) {
setupSplitIntervalView(splitIntervalView);
if (options.size() == 0) {
prepareSplitIntervalAdapterData();
}
updateSplitIntervalView(splitIntervalView);
splitIntervalView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final ListPopupWindow popup = new ListPopupWindow(getActivity());
popup.setAnchorView(splitIntervalView);
popup.setContentWidth(AndroidUtils.dpToPx(app, 200f));
popup.setModal(true);
popup.setDropDownGravity(Gravity.RIGHT | Gravity.TOP);
popup.setVerticalOffset(AndroidUtils.dpToPx(app, -48f));
popup.setHorizontalOffset(AndroidUtils.dpToPx(app, -6f));
popup.setAdapter(new ArrayAdapter<>(getTrackActivity(),
R.layout.popup_list_text_item, options));
popup.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
selectedSplitInterval = position;
GpxSelectionHelper.SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), true, false);
final List<GpxDisplayGroup> groups = getDisplayGroups();
if (groups.size() > 0) {
updateSplit(groups, sf);
}
popup.dismiss();
updateSplitIntervalView(splitIntervalView);
}
});
popup.show();
}
});
splitIntervalView.setVisibility(View.VISIBLE);
} else {
splitIntervalView.setVisibility(View.GONE);
}
}
public void updateContent() {
if (getTrackActivity() != null) {
adapter.clear();
adapter.setNotifyOnChange(false);
GpxDisplayItem overviewSegments = getOverviewSegment();
adapter.add(overviewSegments);
List<GpxDisplayItem> splitSegments = getSplitSegments();
adapter.addAll(splitSegments);
adapter.notifyDataSetChanged();
listView.setSelection(0);
headerView.setTranslationY(0);
updateHeader();
}
}
private void updateSplit(List<GpxDisplayGroup> groups, GpxSelectionHelper.SelectedGpxFile sf) {
new SplitTrackAsyncTask(sf, groups).execute((Void) null);
}
private void setupSplitIntervalView(View view) {
final TextView title = (TextView) view.findViewById(R.id.split_interval_title);
final TextView text = (TextView) view.findViewById(R.id.split_interval_text);
final ImageView img = (ImageView) view.findViewById(R.id.split_interval_arrow);
int colorId;
final List<GpxDisplayGroup> groups = getDisplayGroups();
if (groups.size() > 0) {
colorId = app.getSettings().isLightContent() ?
R.color.primary_text_light : R.color.primary_text_dark;
} else {
colorId = app.getSettings().isLightContent() ?
R.color.secondary_text_light : R.color.secondary_text_dark;
}
int color = app.getResources().getColor(colorId);
title.setTextColor(color);
text.setTextColor(color);
img.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, colorId));
}
private void updateSplitIntervalView(View view) {
final TextView text = (TextView) view.findViewById(R.id.split_interval_text);
if (selectedSplitInterval == 0) {
text.setText(getString(R.string.shared_string_none));
} else {
text.setText(options.get(selectedSplitInterval));
}
}
private GPXUtilities.GPXFile getGpx() {
return getTrackActivity().getGpx();
}
public TrackActivity getTrackActivity() {
return (TrackActivity) getActivity();
}
private void prepareSplitIntervalAdapterData() {
final List<GpxDisplayGroup> groups = getDisplayGroups();
options.add(app.getString(R.string.shared_string_none));
distanceSplit.add(-1d);
timeSplit.add(-1);
addOptionSplit(30, true, groups); // 50 feet, 20 yards, 20
// m
addOptionSplit(60, true, groups); // 100 feet, 50 yards,
// 50 m
addOptionSplit(150, true, groups); // 200 feet, 100 yards,
// 100 m
addOptionSplit(300, true, groups); // 500 feet, 200 yards,
// 200 m
addOptionSplit(600, true, groups); // 1000 feet, 500 yards,
// 500 m
addOptionSplit(1500, true, groups); // 2000 feet, 1000 yards, 1 km
addOptionSplit(3000, true, groups); // 1 mi, 2 km
addOptionSplit(6000, true, groups); // 2 mi, 5 km
addOptionSplit(15000, true, groups); // 5 mi, 10 km
addOptionSplit(15, false, groups);
addOptionSplit(30, false, groups);
addOptionSplit(60, false, groups);
addOptionSplit(120, false, groups);
addOptionSplit(150, false, groups);
addOptionSplit(300, false, groups);
addOptionSplit(600, false, groups);
addOptionSplit(900, false, groups);
addOptionSplit(1800, false, groups);
addOptionSplit(3600, false, groups);
}
private List<GpxDisplayGroup> getDisplayGroups() {
return filterGroups(true);
}
private void addOptionSplit(int value, boolean distance, List<GpxDisplayGroup> model) {
if (distance) {
double dvalue = OsmAndFormatter.calculateRoundedDist(value, app);
options.add(OsmAndFormatter.getFormattedDistance((float) dvalue, app));
distanceSplit.add(dvalue);
timeSplit.add(-1);
if (Math.abs(model.get(0).getSplitDistance() - dvalue) < 1) {
selectedSplitInterval = distanceSplit.size() - 1;
}
} else {
if (value < 60) {
options.add(value + " " + app.getString(R.string.int_seconds));
} else if (value % 60 == 0) {
options.add((value / 60) + " " + app.getString(R.string.int_min));
} else {
options.add((value / 60f) + " " + app.getString(R.string.int_min));
}
distanceSplit.add(-1d);
timeSplit.add(value);
if (model.get(0).getSplitTime() == value) {
selectedSplitInterval = distanceSplit.size() - 1;
}
}
}
private List<GpxDisplayGroup> filterGroups(boolean useDisplayGroups) {
List<GpxDisplayGroup> groups = new ArrayList<>();
if (getTrackActivity() != null) {
List<GpxDisplayGroup> result = getTrackActivity().getGpxFile(useDisplayGroups);
for (GpxDisplayGroup group : result) {
boolean add = hasFilterType(group.getType());
if (isArgumentTrue(ARG_TO_FILTER_SHORT_TRACKS)) {
Iterator<GpxDisplayItem> item = group.getModifiableList().iterator();
while (item.hasNext()) {
GpxDisplayItem it2 = item.next();
if (it2.analysis != null && it2.analysis.totalDistance < 100) {
item.remove();
}
}
if (group.getModifiableList().isEmpty()) {
add = false;
}
}
if (add) {
groups.add(group);
}
}
}
return groups;
}
private List<GpxDisplayItem> getSplitSegments() {
List<GpxDisplayGroup> result = getTrackActivity().getGpxFile(true);
List<GpxDisplayItem> splitSegments = new ArrayList<>();
if (result != null && result.size() > 0) {
if (result.get(0).isSplitDistance() || result.get(0).isSplitTime()) {
splitSegments.addAll(result.get(0).getModifiableList());
}
}
return splitSegments;
}
private GpxDisplayItem getOverviewSegment() {
List<GpxDisplayGroup> result = getTrackActivity().getGpxFile(false);
GpxDisplayItem overviewSegment = null;
if (result.size() > 0) {
overviewSegment = result.get(0).getModifiableList().get(0);
}
return overviewSegment;
}
private boolean isArgumentTrue(@NonNull String arg) {
return getArguments() != null && getArguments().getBoolean(arg);
}
protected boolean hasFilterType(GpxDisplayItemType filterType) {
for (GpxDisplayItemType type : filterTypes) {
if (type == filterType) {
return true;
}
}
return false;
}
@Override
public void dismiss() {
getTrackActivity().updateSplitView();
super.dismiss();
}
@Override
public void onCancel(DialogInterface dialog) {
getTrackActivity().updateSplitView();
super.onCancel(dialog);
}
private class SplitSegmentsAdapter extends ArrayAdapter<GpxDisplayItem> {
SplitSegmentsAdapter(List<GpxDisplayItem> items) {
super(getActivity(), 0, items);
}
ColorStateList defaultTextColor;
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
GpxDisplayItem currentGpxDisplayItem = getItem(position);
if (convertView == null) {
convertView = getTrackActivity().getLayoutInflater().inflate(R.layout.gpx_split_segment_fragment, parent, false);
}
convertView.setOnClickListener(null);
TextView overviewTextView = (TextView) convertView.findViewById(R.id.overview_text);
ImageView overviewImageView = (ImageView) convertView.findViewById(R.id.overview_image);
if (position == 0) {
overviewImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_span_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
if (defaultTextColor == null) {
defaultTextColor = overviewTextView.getTextColors();
}
overviewTextView.setTextColor(defaultTextColor);
overviewTextView.setText(app.getString(R.string.shared_string_overview));
if (currentGpxDisplayItem != null) {
((TextView) convertView.findViewById(R.id.fragment_count_text)).setText(app.getString(R.string.shared_string_time_span) + ": " + Algorithms.formatDuration((int) (currentGpxDisplayItem.analysis.timeSpan / 1000), app.accessibilityEnabled()));
}
} else {
if (currentGpxDisplayItem != null && currentGpxDisplayItem.analysis != null) {
overviewTextView.setTextColor(app.getSettings().isLightContent() ? app.getResources().getColor(R.color.gpx_split_overview_light) : app.getResources().getColor(R.color.gpx_split_overview_dark));
if (currentGpxDisplayItem.group.isSplitDistance()) {
overviewImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_track_16, app.getSettings().isLightContent() ? R.color.gpx_split_overview_light : R.color.gpx_split_overview_dark));
overviewTextView.setText("");
double metricStart = currentGpxDisplayItem.analysis.metricEnd - currentGpxDisplayItem.analysis.totalDistance;
overviewTextView.append(OsmAndFormatter.getFormattedDistance((float) metricStart, app));
overviewTextView.append(" - ");
overviewTextView.append(OsmAndFormatter.getFormattedDistance((float) currentGpxDisplayItem.analysis.metricEnd, app));
} else if (currentGpxDisplayItem.group.isSplitTime()) {
overviewImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_span_16, app.getSettings().isLightContent() ? R.color.gpx_split_overview_light : R.color.gpx_split_overview_dark));
overviewTextView.setText("");
double metricStart = currentGpxDisplayItem.analysis.metricEnd - (currentGpxDisplayItem.analysis.timeSpan / 1000);
overviewTextView.append(OsmAndFormatter.getFormattedDuration((int) metricStart, app));
overviewTextView.append(" - ");
overviewTextView.append(OsmAndFormatter.getFormattedDuration((int) currentGpxDisplayItem.analysis.metricEnd, app));
}
((TextView) convertView.findViewById(R.id.fragment_count_text)).setText(app.getString(R.string.of, position, adapter.getCount() - 1));
}
}
((ImageView) convertView.findViewById(R.id.start_time_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_start_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.end_time_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_end_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.average_altitude_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_altitude_average_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.altitude_range_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_altitude_range_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.ascent_descent_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_altitude_descent_ascent_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.moving_time_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_moving_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.average_speed_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_speed_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.max_speed_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_max_speed_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
if (currentGpxDisplayItem != null) {
GPXTrackAnalysis analysis = currentGpxDisplayItem.analysis;
if (analysis != null) {
ImageView distanceOrTimeSpanImageView = ((ImageView) convertView.findViewById(R.id.distance_or_timespan_image));
TextView distanceOrTimeSpanValue = (TextView) convertView.findViewById(R.id.distance_or_time_span_value);
TextView distanceOrTimeSpanText = (TextView) convertView.findViewById(R.id.distance_or_time_span_text);
if (position == 0) {
distanceOrTimeSpanImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_track_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
distanceOrTimeSpanValue.setText(OsmAndFormatter.getFormattedDistance(analysis.totalDistance, app));
distanceOrTimeSpanText.setText(app.getString(R.string.distance));
} else {
if (currentGpxDisplayItem.group.isSplitDistance()) {
distanceOrTimeSpanImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_span_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
if (analysis.timeSpan > 0) {
distanceOrTimeSpanValue.setText(Algorithms.formatDuration((int) (analysis.timeSpan / 1000), app.accessibilityEnabled()));
} else {
distanceOrTimeSpanValue.setText("-");
}
distanceOrTimeSpanText.setText(app.getString(R.string.shared_string_time_span));
} else if (currentGpxDisplayItem.group.isSplitTime()) {
distanceOrTimeSpanImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_track_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
distanceOrTimeSpanValue.setText(OsmAndFormatter.getFormattedDistance(analysis.totalDistance, app));
distanceOrTimeSpanText.setText(app.getString(R.string.distance));
}
}
TextView startTimeValue = (TextView) convertView.findViewById(R.id.start_time_value);
TextView startDateValue = (TextView) convertView.findViewById(R.id.start_date_value);
TextView endTimeValue = (TextView) convertView.findViewById(R.id.end_time_value);
TextView endDateValue = (TextView) convertView.findViewById(R.id.end_date_value);
if (analysis.timeSpan > 0) {
DateFormat tf = SimpleDateFormat.getTimeInstance(DateFormat.SHORT);
DateFormat df = SimpleDateFormat.getDateInstance(DateFormat.MEDIUM);
Date start = new Date(analysis.startTime);
startTimeValue.setText(tf.format(start));
startDateValue.setText(df.format(start));
Date end = new Date(analysis.endTime);
endTimeValue.setText(tf.format(end));
endDateValue.setText(df.format(end));
} else {
startTimeValue.setText("-");
startDateValue.setText("-");
endTimeValue.setText("-");
endDateValue.setText("-");
}
View elevationDivider = convertView.findViewById(R.id.elevation_divider);
View elevationSection = convertView.findViewById(R.id.elevation_layout);
if (analysis.hasElevationData) {
elevationDivider.setVisibility(View.VISIBLE);
elevationSection.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.average_altitude_value))
.setText(OsmAndFormatter.getFormattedAlt(analysis.avgElevation, app));
String min = OsmAndFormatter.getFormattedAlt(analysis.minElevation, app);
String max = OsmAndFormatter.getFormattedAlt(analysis.maxElevation, app);
String min_max_elevation = min.substring(0, min.indexOf(" ")).concat("/").concat(max);
if (min_max_elevation.length() > 9) {
(convertView.findViewById(R.id.min_altitude_value))
.setVisibility(View.VISIBLE);
(convertView.findViewById(R.id.max_altitude_value))
.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.min_altitude_value))
.setText(min);
((TextView) convertView.findViewById(R.id.max_altitude_value))
.setText(max);
(convertView.findViewById(R.id.min_max_altitude_value))
.setVisibility(View.GONE);
} else {
(convertView.findViewById(R.id.min_max_altitude_value))
.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.min_max_altitude_value))
.setText(min_max_elevation);
(convertView.findViewById(R.id.min_altitude_value))
.setVisibility(View.GONE);
(convertView.findViewById(R.id.max_altitude_value))
.setVisibility(View.GONE);
}
TextView ascentValue = (TextView) convertView.findViewById(R.id.ascent_value);
TextView descentValue = (TextView) convertView.findViewById(R.id.descent_value);
TextView ascentDescentValue = (TextView) convertView.findViewById(R.id.ascent_descent_value);
String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
String desc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app);
String asc_desc = asc.substring(0, asc.indexOf(" ")).concat("/").concat(desc);
if (asc_desc.length() > 9) {
ascentValue.setVisibility(View.VISIBLE);
descentValue.setVisibility(View.VISIBLE);
ascentValue.setText(asc);
descentValue.setText(desc);
ascentDescentValue.setVisibility(View.GONE);
} else {
ascentDescentValue.setVisibility(View.VISIBLE);
ascentDescentValue.setText(asc_desc);
ascentValue.setVisibility(View.GONE);
descentValue.setVisibility(View.GONE);
}
} else {
elevationDivider.setVisibility(View.GONE);
elevationSection.setVisibility(View.GONE);
}
View speedDivider = convertView.findViewById(R.id.speed_divider);
View speedSection = convertView.findViewById(R.id.speed_layout);
if (analysis.hasSpeedData) {
speedDivider.setVisibility(View.VISIBLE);
speedSection.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.moving_time_value))
.setText(Algorithms.formatDuration((int) (analysis.timeMoving / 1000), app.accessibilityEnabled()));
((TextView) convertView.findViewById(R.id.average_speed_value))
.setText(OsmAndFormatter.getFormattedSpeed(analysis.avgSpeed, app));
String maxSpeed = OsmAndFormatter.getFormattedSpeed(analysis.maxSpeed, app);
String minSpeed = OsmAndFormatter.getFormattedSpeed(analysis.minSpeed, app);
String maxMinSpeed;
if (maxSpeed.contains(" ")) {
maxMinSpeed = maxSpeed.substring(0, maxSpeed.indexOf(" ")).concat("/").concat(minSpeed);
} else {
maxMinSpeed = maxSpeed.substring(0, maxSpeed.indexOf("-")).concat("/").concat(minSpeed);
}
if (minMaxSpeedLayoutWidth == 0) {
DisplayMetrics metrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
int screenWidth = metrics.widthPixels;
int widthWithoutSidePadding = screenWidth - AndroidUtils.dpToPx(getActivity(), 32);
int singleLayoutWidth = widthWithoutSidePadding / 3;
int twoLayouts = 2 * (singleLayoutWidth + AndroidUtils.dpToPx(getActivity(), 3));
minMaxSpeedLayoutWidth = widthWithoutSidePadding - twoLayouts - AndroidUtils.dpToPx(getActivity(), 28);
}
minMaxSpeedPaint.getTextBounds(maxMinSpeed, 0, maxMinSpeed.length(), minMaxSpeedTextBounds);
int minMaxStringWidth = minMaxSpeedTextBounds.width();
if (analysis.minSpeed == 0) {
(convertView.findViewById(R.id.max_speed_value))
.setVisibility(View.VISIBLE);
(convertView.findViewById(R.id.min_speed_value))
.setVisibility(View.GONE);
((TextView) convertView.findViewById(R.id.max_speed_value))
.setText(maxSpeed);
(convertView.findViewById(R.id.max_min_speed_value))
.setVisibility(View.GONE);
((TextView) convertView.findViewById(R.id.max_min_speed_text))
.setText(app.getString(R.string.shared_string_max));
} else if (minMaxStringWidth > minMaxSpeedLayoutWidth) {
(convertView.findViewById(R.id.max_speed_value))
.setVisibility(View.VISIBLE);
(convertView.findViewById(R.id.min_speed_value))
.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.max_speed_value))
.setText(maxSpeed);
((TextView) convertView.findViewById(R.id.min_speed_value))
.setText(minSpeed);
(convertView.findViewById(R.id.max_min_speed_value))
.setVisibility(View.GONE);
((TextView) convertView.findViewById(R.id.max_min_speed_text))
.setText(app.getString(R.string.max_min));
} else {
(convertView.findViewById(R.id.max_min_speed_value))
.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.max_min_speed_value))
.setText(maxMinSpeed);
(convertView.findViewById(R.id.max_speed_value))
.setVisibility(View.GONE);
(convertView.findViewById(R.id.min_speed_value))
.setVisibility(View.GONE);
((TextView) convertView.findViewById(R.id.max_min_speed_text))
.setText(app.getString(R.string.max_min));
}
} else {
speedDivider.setVisibility(View.GONE);
speedSection.setVisibility(View.GONE);
}
}
}
return convertView;
}
}
private class SplitTrackAsyncTask extends AsyncTask<Void, Void, Void> {
@Nullable
private final GpxSelectionHelper.SelectedGpxFile mSelectedGpxFile;
private final List<GpxDisplayGroup> groups;
SplitTrackAsyncTask(@Nullable GpxSelectionHelper.SelectedGpxFile selectedGpxFile, List<GpxDisplayGroup> groups) {
mSelectedGpxFile = selectedGpxFile;
this.groups = groups;
}
protected void onPreExecute() {
progressBar.setVisibility(View.VISIBLE);
}
protected void onPostExecute(Void result) {
progressBar.setVisibility(View.GONE);
if (mSelectedGpxFile != null) {
List<GpxDisplayGroup> groups = getDisplayGroups();
mSelectedGpxFile.setDisplayGroups(groups);
}
updateContent();
}
@Override
protected Void doInBackground(Void... params) {
for (GpxDisplayGroup model : groups) {
if (selectedSplitInterval == 0) {
model.noSplit(app);
} else if (distanceSplit.get(selectedSplitInterval) > 0) {
model.splitByDistance(app, distanceSplit.get(selectedSplitInterval));
} else if (timeSplit.get(selectedSplitInterval) > 0) {
model.splitByTime(app, timeSplit.get(selectedSplitInterval));
}
}
return null;
}
}
private OsmandApplication getMyApplication() {
return (OsmandApplication) getActivity().getApplication();
}
public static boolean showInstance(TrackActivity trackActivity) {
try {
SplitSegmentDialogFragment fragment = new SplitSegmentDialogFragment();
fragment.show(trackActivity.getSupportFragmentManager(), TAG);
return true;
} catch (RuntimeException e) {
return false;
}
}
}

View file

@ -1,690 +0,0 @@
package net.osmand.plus.myplaces;
import android.content.res.ColorStateList;
import android.graphics.Paint;
import android.graphics.Rect;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.ListPopupWindow;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import net.osmand.AndroidUtils;
import net.osmand.plus.GPXUtilities;
import net.osmand.plus.GPXUtilities.GPXTrackAnalysis;
import net.osmand.plus.GpxSelectionHelper;
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItemType;
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
import net.osmand.plus.IconsCache;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.TrackActivity;
import net.osmand.plus.base.OsmAndListFragment;
import net.osmand.plus.helpers.FontCache;
import net.osmand.util.Algorithms;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import gnu.trove.list.array.TIntArrayList;
import static net.osmand.plus.myplaces.TrackSegmentFragment.ARG_TO_FILTER_SHORT_TRACKS;
public class SplitSegmentFragment extends OsmAndListFragment {
public final static String TAG = "SPLIT_SEGMENT_FRAGMENT";
private OsmandApplication app;
private SplitSegmentsAdapter adapter;
private View headerView;
private GpxDisplayItemType[] filterTypes = { GpxDisplayItemType.TRACK_SEGMENT };
private List<String> options = new ArrayList<>();
private List<Double> distanceSplit = new ArrayList<>();
private TIntArrayList timeSplit = new TIntArrayList();
private int selectedSplitInterval;
private IconsCache ic;
private int minMaxSpeedLayoutWidth;
private Paint minMaxSpeedPaint;
private Rect minMaxSpeedTextBounds;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
app = getMyApplication();
ic = app.getIconsCache();
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
updateContent();
// Obsolete: updateHeader();
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
getListView().setBackgroundColor(getResources().getColor(
getMyApplication().getSettings().isLightContent() ? R.color.ctx_menu_info_view_bg_light
: R.color.ctx_menu_info_view_bg_dark));
getTrackActivity().onAttachFragment(this);
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
menu.clear();
getTrackActivity().getClearToolbar(false);
}
@Override
public ArrayAdapter<?> getAdapter() {
return adapter;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
setHasOptionsMenu(true);
minMaxSpeedPaint = new Paint();
minMaxSpeedPaint.setTextSize(getResources().getDimension(R.dimen.default_split_segments_data));
minMaxSpeedPaint.setTypeface(FontCache.getFont(getContext(), "fonts/Roboto-Medium.ttf"));
minMaxSpeedPaint.setStyle(Paint.Style.FILL);
minMaxSpeedTextBounds = new Rect();
final View view = getActivity().getLayoutInflater().inflate(R.layout.split_segments_layout, container, false);
final ListView listView = (ListView) view.findViewById(android.R.id.list);
listView.setDivider(null);
listView.setDividerHeight(0);
adapter = new SplitSegmentsAdapter(new ArrayList<GpxDisplayItem>());
headerView = view.findViewById(R.id.header_layout);
((ImageView) headerView.findViewById(R.id.header_split_image)).setImageDrawable(ic.getIcon(R.drawable.ic_action_split_interval, app.getSettings().isLightContent() ? R.color.icon_color : 0));
listView.addHeaderView(getActivity().getLayoutInflater().inflate(R.layout.gpx_split_segments_empty_header, null, false));
listView.addFooterView(getActivity().getLayoutInflater().inflate(R.layout.list_shadow_footer, null, false));
setListAdapter(adapter);
listView.setOnScrollListener(new AbsListView.OnScrollListener() {
int previousYPos = -1;
@Override
public void onScrollStateChanged(AbsListView absListView, int i) {
if (i == SCROLL_STATE_IDLE) {
previousYPos = -1;
}
}
@Override
public void onScroll(AbsListView absListView, int i, int i1, int i2) {
View c = absListView.getChildAt(0);
if (c != null) {
int currentYPos = -c.getTop() + absListView.getFirstVisiblePosition() * c.getHeight();
if (previousYPos == -1) {
previousYPos = currentYPos;
}
float yTranslationToSet = headerView.getTranslationY() + (previousYPos - currentYPos);
if (yTranslationToSet < 0 && yTranslationToSet > -headerView.getHeight()) {
headerView.setTranslationY(yTranslationToSet);
} else if (yTranslationToSet < -headerView.getHeight()) {
headerView.setTranslationY(-headerView.getHeight());
} else if (yTranslationToSet > 0) {
headerView.setTranslationY(0);
}
previousYPos = currentYPos;
}
}
});
return view;
}
private void updateHeader() {
final View splitIntervalView = headerView.findViewById(R.id.split_interval_view);
if (getGpx() != null && !getGpx().showCurrentTrack && adapter.getCount() > 0) {
setupSplitIntervalView(splitIntervalView);
if (options.size() == 0) {
prepareSplitIntervalAdapterData();
}
updateSplitIntervalView(splitIntervalView);
splitIntervalView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final ListPopupWindow popup = new ListPopupWindow(getActivity());
popup.setAnchorView(splitIntervalView);
popup.setContentWidth(AndroidUtils.dpToPx(app, 200f));
popup.setModal(true);
popup.setDropDownGravity(Gravity.RIGHT | Gravity.TOP);
popup.setVerticalOffset(AndroidUtils.dpToPx(app, -48f));
popup.setHorizontalOffset(AndroidUtils.dpToPx(app, -6f));
popup.setAdapter(new ArrayAdapter<>(getTrackActivity(),
R.layout.popup_list_text_item, options));
popup.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
selectedSplitInterval = position;
GpxSelectionHelper.SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), true, false);
final List<GpxDisplayGroup> groups = getDisplayGroups();
if (groups.size() > 0) {
updateSplit(groups, sf);
}
popup.dismiss();
updateSplitIntervalView(splitIntervalView);
}
});
popup.show();
}
});
splitIntervalView.setVisibility(View.VISIBLE);
} else {
splitIntervalView.setVisibility(View.GONE);
}
}
public void updateContent() {
adapter.clear();
adapter.setNotifyOnChange(false);
GpxDisplayItem overviewSegments = getOverviewSegment();
adapter.add(overviewSegments);
List<GpxDisplayItem> splitSegments = getSplitSegments();
adapter.addAll(splitSegments);
// Obsolete: adapter.setNotifyOnChange(true);
adapter.notifyDataSetChanged();
getListView().setSelection(0);
headerView.setTranslationY(0);
updateHeader();
}
private void updateSplit(List<GpxDisplayGroup> groups, GpxSelectionHelper.SelectedGpxFile sf) {
new SplitTrackAsyncTask(sf, groups).execute((Void) null);
}
private void setupSplitIntervalView(View view) {
final TextView title = (TextView) view.findViewById(R.id.split_interval_title);
final TextView text = (TextView) view.findViewById(R.id.split_interval_text);
final ImageView img = (ImageView) view.findViewById(R.id.split_interval_arrow);
int colorId;
final List<GpxDisplayGroup> groups = getDisplayGroups();
if (groups.size() > 0) {
colorId = app.getSettings().isLightContent() ?
R.color.primary_text_light : R.color.primary_text_dark;
} else {
colorId = app.getSettings().isLightContent() ?
R.color.secondary_text_light : R.color.secondary_text_dark;
}
int color = app.getResources().getColor(colorId);
title.setTextColor(color);
text.setTextColor(color);
img.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, colorId));
}
private void updateSplitIntervalView(View view) {
final TextView text = (TextView) view.findViewById(R.id.split_interval_text);
if (selectedSplitInterval == 0) {
text.setText(getString(R.string.shared_string_none));
} else {
text.setText(options.get(selectedSplitInterval));
}
}
private GPXUtilities.GPXFile getGpx() {
return getTrackActivity().getGpx();
}
public TrackActivity getTrackActivity() {
return (TrackActivity) getActivity();
}
private void prepareSplitIntervalAdapterData() {
final List<GpxDisplayGroup> groups = getDisplayGroups();
options.add(app.getString(R.string.shared_string_none));
distanceSplit.add(-1d);
timeSplit.add(-1);
addOptionSplit(30, true, groups); // 50 feet, 20 yards, 20
// m
addOptionSplit(60, true, groups); // 100 feet, 50 yards,
// 50 m
addOptionSplit(150, true, groups); // 200 feet, 100 yards,
// 100 m
addOptionSplit(300, true, groups); // 500 feet, 200 yards,
// 200 m
addOptionSplit(600, true, groups); // 1000 feet, 500 yards,
// 500 m
addOptionSplit(1500, true, groups); // 2000 feet, 1000 yards, 1 km
addOptionSplit(3000, true, groups); // 1 mi, 2 km
addOptionSplit(6000, true, groups); // 2 mi, 5 km
addOptionSplit(15000, true, groups); // 5 mi, 10 km
addOptionSplit(15, false, groups);
addOptionSplit(30, false, groups);
addOptionSplit(60, false, groups);
addOptionSplit(120, false, groups);
addOptionSplit(150, false, groups);
addOptionSplit(300, false, groups);
addOptionSplit(600, false, groups);
addOptionSplit(900, false, groups);
addOptionSplit(1800, false, groups);
addOptionSplit(3600, false, groups);
}
private List<GpxDisplayGroup> getDisplayGroups() {
return filterGroups(true);
}
private void addOptionSplit(int value, boolean distance, List<GpxDisplayGroup> model) {
if (distance) {
double dvalue = OsmAndFormatter.calculateRoundedDist(value, app);
options.add(OsmAndFormatter.getFormattedDistance((float) dvalue, app));
distanceSplit.add(dvalue);
timeSplit.add(-1);
if (Math.abs(model.get(0).getSplitDistance() - dvalue) < 1) {
selectedSplitInterval = distanceSplit.size() - 1;
}
} else {
if (value < 60) {
options.add(value + " " + app.getString(R.string.int_seconds));
} else if (value % 60 == 0) {
options.add((value / 60) + " " + app.getString(R.string.int_min));
} else {
options.add((value / 60f) + " " + app.getString(R.string.int_min));
}
distanceSplit.add(-1d);
timeSplit.add(value);
if (model.get(0).getSplitTime() == value) {
selectedSplitInterval = distanceSplit.size() - 1;
}
}
}
private List<GpxDisplayGroup> filterGroups(boolean useDisplayGroups) {
List<GpxDisplayGroup> groups = new ArrayList<>();
if (getTrackActivity() != null) {
List<GpxDisplayGroup> result = getTrackActivity().getGpxFile(useDisplayGroups);
for (GpxDisplayGroup group : result) {
boolean add = hasFilterType(group.getType());
if (isArgumentTrue(ARG_TO_FILTER_SHORT_TRACKS)) {
Iterator<GpxDisplayItem> item = group.getModifiableList().iterator();
while (item.hasNext()) {
GpxDisplayItem it2 = item.next();
if (it2.analysis != null && it2.analysis.totalDistance < 100) {
item.remove();
}
}
if (group.getModifiableList().isEmpty()) {
add = false;
}
}
if (add) {
groups.add(group);
}
}
}
return groups;
}
private List<GpxDisplayItem> getSplitSegments() {
List<GpxDisplayGroup> result = getTrackActivity().getGpxFile(true);
List<GpxDisplayItem> splitSegments = new ArrayList<>();
if (result != null && result.size() > 0) {
if (result.get(0).isSplitDistance() || result.get(0).isSplitTime()) {
splitSegments.addAll(result.get(0).getModifiableList());
}
}
return splitSegments;
}
private GpxDisplayItem getOverviewSegment() {
List<GpxDisplayGroup> result = getTrackActivity().getGpxFile(false);
GpxDisplayItem overviewSegment = null;
if (result.size() > 0) {
overviewSegment = result.get(0).getModifiableList().get(0);
}
return overviewSegment;
}
private boolean isArgumentTrue(@NonNull String arg) {
return getArguments() != null && getArguments().getBoolean(arg);
}
protected boolean hasFilterType(GpxDisplayItemType filterType) {
for (GpxDisplayItemType type : filterTypes) {
if (type == filterType) {
return true;
}
}
return false;
}
public void reloadSplitFragment() {
getFragmentManager()
.beginTransaction()
.detach(this)
.attach(this)
.commit();
}
private class SplitSegmentsAdapter extends ArrayAdapter<GpxDisplayItem> {
SplitSegmentsAdapter(List<GpxDisplayItem> items) {
super(getActivity(), 0, items);
}
ColorStateList defaultTextColor;
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
GpxDisplayItem currentGpxDisplayItem = getItem(position);
if (convertView == null) {
convertView = getTrackActivity().getLayoutInflater().inflate(R.layout.gpx_split_segment_fragment, parent, false);
}
convertView.setOnClickListener(null);
TextView overviewTextView = (TextView) convertView.findViewById(R.id.overview_text);
ImageView overviewImageView = (ImageView) convertView.findViewById(R.id.overview_image);
if (position == 0) {
overviewImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_span_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
if (defaultTextColor == null) {
defaultTextColor = overviewTextView.getTextColors();
}
overviewTextView.setTextColor(defaultTextColor);
overviewTextView.setText(app.getString(R.string.shared_string_overview));
if (currentGpxDisplayItem != null) {
((TextView) convertView.findViewById(R.id.fragment_count_text)).setText(app.getString(R.string.shared_string_time_span) + ": " + Algorithms.formatDuration((int) (currentGpxDisplayItem.analysis.timeSpan / 1000), app.accessibilityEnabled()));
}
} else {
if (currentGpxDisplayItem != null && currentGpxDisplayItem.analysis != null) {
overviewTextView.setTextColor(app.getSettings().isLightContent() ? app.getResources().getColor(R.color.gpx_split_overview_light) : app.getResources().getColor(R.color.gpx_split_overview_dark));
if (currentGpxDisplayItem.group.isSplitDistance()) {
overviewImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_track_16, app.getSettings().isLightContent() ? R.color.gpx_split_overview_light : R.color.gpx_split_overview_dark));
overviewTextView.setText("");
double metricStart = currentGpxDisplayItem.analysis.metricEnd - currentGpxDisplayItem.analysis.totalDistance;
overviewTextView.append(OsmAndFormatter.getFormattedDistance((float) metricStart, app));
overviewTextView.append(" - ");
overviewTextView.append(OsmAndFormatter.getFormattedDistance((float) currentGpxDisplayItem.analysis.metricEnd, app));
} else if (currentGpxDisplayItem.group.isSplitTime()) {
overviewImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_span_16, app.getSettings().isLightContent() ? R.color.gpx_split_overview_light : R.color.gpx_split_overview_dark));
overviewTextView.setText("");
double metricStart = currentGpxDisplayItem.analysis.metricEnd - (currentGpxDisplayItem.analysis.timeSpan / 1000);
overviewTextView.append(OsmAndFormatter.getFormattedDuration((int) metricStart, app));
overviewTextView.append(" - ");
overviewTextView.append(OsmAndFormatter.getFormattedDuration((int) currentGpxDisplayItem.analysis.metricEnd, app));
}
((TextView) convertView.findViewById(R.id.fragment_count_text)).setText(app.getString(R.string.of, position, adapter.getCount() - 1));
}
}
((ImageView) convertView.findViewById(R.id.start_time_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_start_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.end_time_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_end_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.average_altitude_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_altitude_average_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.altitude_range_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_altitude_range_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.ascent_descent_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_altitude_descent_ascent_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.moving_time_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_moving_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.average_speed_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_speed_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
((ImageView) convertView.findViewById(R.id.max_speed_image))
.setImageDrawable(ic.getIcon(R.drawable.ic_action_max_speed_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
if (currentGpxDisplayItem != null) {
GPXTrackAnalysis analysis = currentGpxDisplayItem.analysis;
if (analysis != null) {
ImageView distanceOrTimeSpanImageView = ((ImageView) convertView.findViewById(R.id.distance_or_timespan_image));
TextView distanceOrTimeSpanValue = (TextView) convertView.findViewById(R.id.distance_or_time_span_value);
TextView distanceOrTimeSpanText = (TextView) convertView.findViewById(R.id.distance_or_time_span_text);
if (position == 0) {
distanceOrTimeSpanImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_track_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
distanceOrTimeSpanValue.setText(OsmAndFormatter.getFormattedDistance(analysis.totalDistance, app));
distanceOrTimeSpanText.setText(app.getString(R.string.distance));
} else {
if (currentGpxDisplayItem.group.isSplitDistance()) {
distanceOrTimeSpanImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_span_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
if (analysis.timeSpan > 0) {
distanceOrTimeSpanValue.setText(Algorithms.formatDuration((int) (analysis.timeSpan / 1000), app.accessibilityEnabled()));
} else {
distanceOrTimeSpanValue.setText("-");
}
distanceOrTimeSpanText.setText(app.getString(R.string.shared_string_time_span));
} else if (currentGpxDisplayItem.group.isSplitTime()) {
distanceOrTimeSpanImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_track_16, app.getSettings().isLightContent() ? R.color.gpx_split_segment_icon_color : 0));
distanceOrTimeSpanValue.setText(OsmAndFormatter.getFormattedDistance(analysis.totalDistance, app));
distanceOrTimeSpanText.setText(app.getString(R.string.distance));
}
}
TextView startTimeValue = (TextView) convertView.findViewById(R.id.start_time_value);
TextView startDateValue = (TextView) convertView.findViewById(R.id.start_date_value);
TextView endTimeValue = (TextView) convertView.findViewById(R.id.end_time_value);
TextView endDateValue = (TextView) convertView.findViewById(R.id.end_date_value);
if (analysis.timeSpan > 0) {
DateFormat tf = SimpleDateFormat.getTimeInstance(DateFormat.SHORT);
DateFormat df = SimpleDateFormat.getDateInstance(DateFormat.MEDIUM);
Date start = new Date(analysis.startTime);
startTimeValue.setText(tf.format(start));
startDateValue.setText(df.format(start));
Date end = new Date(analysis.endTime);
endTimeValue.setText(tf.format(end));
endDateValue.setText(df.format(end));
} else {
startTimeValue.setText("-");
startDateValue.setText("-");
endTimeValue.setText("-");
endDateValue.setText("-");
}
View elevationDivider = convertView.findViewById(R.id.elevation_divider);
View elevationSection = convertView.findViewById(R.id.elevation_layout);
if (analysis.hasElevationData) {
elevationDivider.setVisibility(View.VISIBLE);
elevationSection.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.average_altitude_value))
.setText(OsmAndFormatter.getFormattedAlt(analysis.avgElevation, app));
String min = OsmAndFormatter.getFormattedAlt(analysis.minElevation, app);
String max = OsmAndFormatter.getFormattedAlt(analysis.maxElevation, app);
String min_max_elevation = min.substring(0, min.indexOf(" ")).concat("/").concat(max);
if (min_max_elevation.length() > 9) {
(convertView.findViewById(R.id.min_altitude_value))
.setVisibility(View.VISIBLE);
(convertView.findViewById(R.id.max_altitude_value))
.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.min_altitude_value))
.setText(min);
((TextView) convertView.findViewById(R.id.max_altitude_value))
.setText(max);
(convertView.findViewById(R.id.min_max_altitude_value))
.setVisibility(View.GONE);
} else {
(convertView.findViewById(R.id.min_max_altitude_value))
.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.min_max_altitude_value))
.setText(min_max_elevation);
(convertView.findViewById(R.id.min_altitude_value))
.setVisibility(View.GONE);
(convertView.findViewById(R.id.max_altitude_value))
.setVisibility(View.GONE);
}
TextView ascentValue = (TextView) convertView.findViewById(R.id.ascent_value);
TextView descentValue = (TextView) convertView.findViewById(R.id.descent_value);
TextView ascentDescentValue = (TextView) convertView.findViewById(R.id.ascent_descent_value);
String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
String desc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app);
String asc_desc = asc.substring(0, asc.indexOf(" ")).concat("/").concat(desc);
if (asc_desc.length() > 9) {
ascentValue.setVisibility(View.VISIBLE);
descentValue.setVisibility(View.VISIBLE);
ascentValue.setText(asc);
descentValue.setText(desc);
ascentDescentValue.setVisibility(View.GONE);
} else {
ascentDescentValue.setVisibility(View.VISIBLE);
ascentDescentValue.setText(asc_desc);
ascentValue.setVisibility(View.GONE);
descentValue.setVisibility(View.GONE);
}
} else {
elevationDivider.setVisibility(View.GONE);
elevationSection.setVisibility(View.GONE);
}
View speedDivider = convertView.findViewById(R.id.speed_divider);
View speedSection = convertView.findViewById(R.id.speed_layout);
if (analysis.hasSpeedData) {
speedDivider.setVisibility(View.VISIBLE);
speedSection.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.moving_time_value))
.setText(Algorithms.formatDuration((int) (analysis.timeMoving / 1000), app.accessibilityEnabled()));
((TextView) convertView.findViewById(R.id.average_speed_value))
.setText(OsmAndFormatter.getFormattedSpeed(analysis.avgSpeed, app));
String maxSpeed = OsmAndFormatter.getFormattedSpeed(analysis.maxSpeed, app);
String minSpeed = OsmAndFormatter.getFormattedSpeed(analysis.minSpeed, app);
String maxMinSpeed;
if (maxSpeed.contains(" ")) {
maxMinSpeed = maxSpeed.substring(0, maxSpeed.indexOf(" ")).concat("/").concat(minSpeed);
} else {
maxMinSpeed = maxSpeed.substring(0, maxSpeed.indexOf("-")).concat("/").concat(minSpeed);
}
if (minMaxSpeedLayoutWidth == 0) {
DisplayMetrics metrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
int screenWidth = metrics.widthPixels;
int widthWithoutSidePadding = screenWidth - AndroidUtils.dpToPx(getActivity(), 32);
int singleLayoutWidth = widthWithoutSidePadding / 3;
int twoLayouts = 2 * (singleLayoutWidth + AndroidUtils.dpToPx(getActivity(), 3));
minMaxSpeedLayoutWidth = widthWithoutSidePadding - twoLayouts - AndroidUtils.dpToPx(getActivity(), 28);
}
minMaxSpeedPaint.getTextBounds(maxMinSpeed, 0, maxMinSpeed.length(), minMaxSpeedTextBounds);
int minMaxStringWidth = minMaxSpeedTextBounds.width();
if (analysis.minSpeed == 0) {
(convertView.findViewById(R.id.max_speed_value))
.setVisibility(View.VISIBLE);
(convertView.findViewById(R.id.min_speed_value))
.setVisibility(View.GONE);
((TextView) convertView.findViewById(R.id.max_speed_value))
.setText(maxSpeed);
(convertView.findViewById(R.id.max_min_speed_value))
.setVisibility(View.GONE);
((TextView) convertView.findViewById(R.id.max_min_speed_text))
.setText(app.getString(R.string.shared_string_max));
} else if (minMaxStringWidth > minMaxSpeedLayoutWidth) {
(convertView.findViewById(R.id.max_speed_value))
.setVisibility(View.VISIBLE);
(convertView.findViewById(R.id.min_speed_value))
.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.max_speed_value))
.setText(maxSpeed);
((TextView) convertView.findViewById(R.id.min_speed_value))
.setText(minSpeed);
(convertView.findViewById(R.id.max_min_speed_value))
.setVisibility(View.GONE);
((TextView) convertView.findViewById(R.id.max_min_speed_text))
.setText(app.getString(R.string.max_min));
} else {
(convertView.findViewById(R.id.max_min_speed_value))
.setVisibility(View.VISIBLE);
((TextView) convertView.findViewById(R.id.max_min_speed_value))
.setText(maxMinSpeed);
(convertView.findViewById(R.id.max_speed_value))
.setVisibility(View.GONE);
(convertView.findViewById(R.id.min_speed_value))
.setVisibility(View.GONE);
((TextView) convertView.findViewById(R.id.max_min_speed_text))
.setText(app.getString(R.string.max_min));
}
} else {
speedDivider.setVisibility(View.GONE);
speedSection.setVisibility(View.GONE);
}
}
}
return convertView;
}
}
private class SplitTrackAsyncTask extends AsyncTask<Void, Void, Void> {
@Nullable
private final GpxSelectionHelper.SelectedGpxFile mSelectedGpxFile;
@NonNull private final TrackActivity mActivity;
private final List<GpxDisplayGroup> groups;
SplitTrackAsyncTask(@Nullable GpxSelectionHelper.SelectedGpxFile selectedGpxFile, List<GpxDisplayGroup> groups) {
mSelectedGpxFile = selectedGpxFile;
mActivity = getTrackActivity();
this.groups = groups;
}
protected void onPostExecute(Void result) {
if (!mActivity.isFinishing()) {
mActivity.setSupportProgressBarIndeterminateVisibility(false);
}
if (mSelectedGpxFile != null) {
List<GpxDisplayGroup> groups = getDisplayGroups();
mSelectedGpxFile.setDisplayGroups(groups);
}
updateContent();
}
protected void onPreExecute() {
mActivity.setSupportProgressBarIndeterminateVisibility(true);
}
@Override
protected Void doInBackground(Void... params) {
for (GpxDisplayGroup model : groups) {
OsmandApplication application = mActivity.getMyApplication();
if (selectedSplitInterval == 0) {
model.noSplit(application);
} else if (distanceSplit.get(selectedSplitInterval) > 0) {
model.splitByDistance(application, distanceSplit.get(selectedSplitInterval));
} else if (timeSplit.get(selectedSplitInterval) > 0) {
model.splitByTime(application, timeSplit.get(selectedSplitInterval));
}
}
return null;
}
}
}

View file

@ -124,7 +124,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
private OsmandApplication app;
private SegmentGPXAdapter adapter;
private GpxDisplayItemType[] filterTypes = { GpxSelectionHelper.GpxDisplayItemType.TRACK_SEGMENT };
private GpxDisplayItemType[] filterTypes = {GpxSelectionHelper.GpxDisplayItemType.TRACK_SEGMENT};
private List<String> options = new ArrayList<>();
private List<Double> distanceSplit = new ArrayList<>();
private TIntArrayList timeSplit = new TIntArrayList();
@ -638,10 +638,10 @@ public class TrackSegmentFragment extends OsmAndListFragment {
public void updateSplitView() {
if (getGpx() != null) {
SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), ((SwitchCompat)headerView.findViewById(R.id.showOnMapToggle)).isChecked(), false);
SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), ((SwitchCompat) headerView.findViewById(R.id.showOnMapToggle)).isChecked(), false);
final List<GpxDisplayGroup> groups = getDisplayGroups();
if (groups.size() > 0) {
updateSplit(groups, ((SwitchCompat)headerView.findViewById(R.id.showOnMapToggle)).isChecked() ? sf : null);
updateSplit(groups, ((SwitchCompat) headerView.findViewById(R.id.showOnMapToggle)).isChecked() ? sf : null);
if (getGpxDataItem() != null) {
updateSplitInDatabase();
}
@ -840,7 +840,6 @@ public class TrackSegmentFragment extends OsmAndListFragment {
for (GpxDisplayItem i : flatten(groups)) {
adapter.add(i);
}
// Obsolete: adapter.setNotifyOnChange(true);
adapter.notifyDataSetChanged();
if (getActivity() != null) {
updateHeader();
@ -849,7 +848,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
protected List<GpxDisplayItem> flatten(List<GpxDisplayGroup> groups) {
ArrayList<GpxDisplayItem> list = new ArrayList<>();
for(GpxDisplayGroup g : groups) {
for (GpxDisplayGroup g : groups) {
list.addAll(g.getModifiableList());
}
return list;
@ -1645,7 +1644,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
@Override
public void select(View tab) {
GPXTabItemType tabType = GPXTabItemType.valueOf((String)tab.getTag());
GPXTabItemType tabType = GPXTabItemType.valueOf((String) tab.getTag());
ImageView img = (ImageView) tab.findViewById(R.id.tab_image);
int imageId = getImageId(tabType);
switch (tabs.getTabSelectionType()) {
@ -1660,7 +1659,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
@Override
public void deselect(View tab) {
GPXTabItemType tabType = GPXTabItemType.valueOf((String)tab.getTag());
GPXTabItemType tabType = GPXTabItemType.valueOf((String) tab.getTag());
ImageView img = (ImageView) tab.findViewById(R.id.tab_image);
int imageId = getImageId(tabType);
switch (tabs.getTabSelectionType()) {
@ -1773,12 +1772,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
}
void openSplitIntervalScreen() {
getTrackActivity().getSupportFragmentManager()
.beginTransaction()
.replace(R.id.track_activity_layout, new SplitSegmentFragment())
.addToBackStack(SplitSegmentFragment.TAG)
.commit();
getTrackActivity().getSlidingTabLayout().setVisibility(View.GONE);
SplitSegmentDialogFragment.showInstance(getTrackActivity());
}
private class SaveGpxAsyncTask extends AsyncTask<Void, Void, Void> {
@ -1820,8 +1814,10 @@ public class TrackSegmentFragment extends OsmAndListFragment {
private class SplitTrackAsyncTask extends AsyncTask<Void, Void, Void> {
@Nullable
private final SelectedGpxFile mSelectedGpxFile;
@NonNull private final TrackSegmentFragment mFragment;
@NonNull private final TrackActivity mActivity;
@NonNull
private final TrackSegmentFragment mFragment;
@NonNull
private final TrackActivity mActivity;
private final List<GpxDisplayGroup> groups;