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

This commit is contained in:
Victor Shcherb 2015-02-27 16:36:22 +01:00
commit 4f77802e33
49 changed files with 1531 additions and 843 deletions

View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/current_track"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/card_bg"
android:orientation="vertical">
<include
layout="@layout/dash_gpx_track_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<Button
android:id="@+id/map_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/expandable_list_item_background"
android:text="@string/back_to_map"/>
</LinearLayout>
<LinearLayout android:id="@+id/on_map_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/card_bg"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/showed_on_map"/>
<Button
android:id="@+id/turn_off_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/dashboardGeneralButtonStyle"
android:textColor="@color/color_distance"
android:text="@string/turn_off_all"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<ListView
android:id="@+id/gpx_on_map"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
<ExpandableListView
android:id="@android:id/list"
style="@style/OsmandListView"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:layout_marginTop="0dp"
android:layout_weight="1"
android:background="?attr/expandable_list_background"
android:groupIndicator="@android:color/transparent"/>
</LinearLayout>

View file

@ -1,69 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/dashListItemHeight"
android:orientation="vertical">
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/icon"
android:layout_width="@dimen/dashNoteIconSize"
android:layout_height="@dimen/dashNoteIconSize"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dashFavIconMargin"
android:layout_marginRight="@dimen/dashFavIconMargin"
tools:src="@drawable/ic_type_audio" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/dashFavNameTextSize"
tools:text="@string/lorem_ipsum" />
<TextView
android:id="@+id/descr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:textSize="@dimen/showAllButtonTextSize"
android:textColor="?android:textColorSecondary"
tools:text="@string/lorem_ipsum" />
</LinearLayout>
<ImageButton
android:id="@+id/play"
android:layout_width="@dimen/dashListItemHeight"
android:layout_height="@dimen/dashListItemHeight"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dashFavIconMargin"
android:background="?attr/dashboard_button"
android:src="@drawable/ic_play_light"/>
</LinearLayout>
</LinearLayout>

View file

@ -77,7 +77,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:textColor="@color/dashboard_descr_colol"
android:textColor="@color/icon_color_light"
android:textSize="@dimen/showAllButtonTextSize"/>
</LinearLayout>

View file

@ -1,71 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/dashListItemHeight">
<View android:layout_width="match_parent"
android:background="?attr/dashboard_divider"
android:layout_height="1dp"/>
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/subHeaderMarginLeft"
android:layout_marginRight="@dimen/showAllButtonMarginRight"
android:layout_height="wrap_content">
<TextView android:id="@+id/name"
android:textColor="@color/dashboard_black"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView android:id="@+id/points_icon"
android:src="@drawable/ic_small_point"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/points_count"
android:textColor="@color/dashboard_descr_colol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:minHeight="@dimen/dashListItemHeight"
android:orientation="vertical">
<ImageView android:id="@+id/distance_icon"
android:src="@drawable/ic_small_distance"
android:layout_marginLeft="@dimen/dashPluginMargin"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/distance"
android:textColor="@color/dashboard_descr_colol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<ImageView android:id="@+id/time_icon"
android:src="@drawable/ic_small_time"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/time"
android:textColor="@color/dashboard_descr_colol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/subHeaderMarginLeft"
android:layout_marginRight="@dimen/showAllButtonMarginRight"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:textColorPrimary"
tools:text="@string/validate_gpx_upload_name_pwd"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/points_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_small_point"/>
<TextView
android:id="@+id/points_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/icon_color_light"/>
<ImageView
android:id="@+id/distance_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dashPluginMargin"
android:src="@drawable/ic_small_distance"/>
<TextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/icon_color_light"/>
<ImageView
android:id="@+id/time_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_small_time"/>
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/icon_color_light"/>
</LinearLayout>
</LinearLayout>
<ImageView android:id="@+id/stop"
android:visibility="gone"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ImageButton
android:id="@+id/stop"
android:layout_width="@dimen/dashListItemHeight"
android:layout_height="@dimen/dashListItemHeight"
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/favorites_icon_right_margin"
android:background="?attr/options_button_background"
android:src="@drawable/ic_action_rec_stop"
android:visibility="gone"
tools:visibility="visible"/>
<ImageView android:id="@+id/show_on_map"
android:layout_gravity="center_vertical"
android:layout_width="@dimen/dashListItemHeight"
android:layout_height="@dimen/dashListItemHeight"/>
<ImageButton
android:id="@+id/show_on_map"
android:layout_width="@dimen/dashListItemHeight"
android:layout_height="@dimen/dashListItemHeight"
android:layout_gravity="center_vertical"
android:background="?attr/options_button_background"
android:src="@drawable/ic_action_gsave_dark"/>
<include layout="@layout/check_item_rel" />
</LinearLayout>

View file

@ -22,7 +22,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="3"
android:textColor="@color/dashboard_descr_colol"
android:textColor="@color/icon_color_light"
android:text="@string/loading_data"
android:textSize="@dimen/dashProgressTextSize"/>
</LinearLayout>

View file

@ -60,13 +60,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<!--<fragment-->
<!--xmlns:android="http://schemas.android.com/apk/res/android"-->
<!--android:id="@+id/TracksFragment"-->
<!--android:name="net.osmand.plus.dashboard.DashTrackFragment"-->
<!--android:layout_marginTop="@dimen/dashCardMargin"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"/>-->
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/TracksFragment"
android:name="net.osmand.plus.monitoring.DashTrackFragment"
android:layout_marginTop="@dimen/dashCardMargin"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<!--<fragment-->
<!--xmlns:android="http://schemas.android.com/apk/res/android"-->

View file

@ -84,7 +84,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:textColor="@color/dashboard_descr_colol"
android:textColor="@color/icon_color_light"
android:textSize="@dimen/showAllButtonTextSize"/>
</LinearLayout>

View file

@ -15,8 +15,7 @@
android:focusable="false"
android:visibility="gone"
android:layout_marginRight="@dimen/local_index_check_right_margin"
android:layout_marginTop="@dimen/favorites_icon_top_margin"
/>
android:layout_marginTop="@dimen/favorites_icon_top_margin"/>
<ImageView
android:id="@+id/icon"

View file

@ -5,63 +5,85 @@
android:layout_height="wrap_content"
android:background="?attr/expandable_list_item_background"
android:minHeight="@dimen/list_item_height"
android:orientation="horizontal"
android:orientation="vertical"
android:paddingLeft="@dimen/list_content_padding">
<CheckBox
android:id="@+id/check_local_index"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/local_index_check_right_margin"
android:focusable="false"
android:visibility="gone"/>
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/favorites_icon_right_margin"
android:focusable="false"
android:src="@drawable/ic_sdcard"/>
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:visibility="gone"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/name"
style="@style/ListText.Small"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<CheckBox
android:id="@+id/check_local_index"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:ellipsize="end"
tools:text="@string/app_version"/>
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/local_index_check_right_margin"
android:focusable="false"
android:visibility="gone"/>
<TextView
android:id="@+id/descr"
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textSize="@dimen/download_descr_text_size"
android:maxLines="25"
tools:text="@string/app_mode_aircraft"/>
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/favorites_icon_right_margin"
android:focusable="false"
android:src="@drawable/ic_sdcard"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/name"
style="@style/ListText.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:ellipsize="end"
tools:text="@string/app_version"/>
</LinearLayout>
<TextView
android:id="@+id/descr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textSize="@dimen/download_descr_text_size"
android:maxLines="25"
tools:text="@string/app_mode_aircraft"/>
</LinearLayout>
<ImageButton
android:id="@+id/options"
android:layout_width="@dimen/list_item_height"
android:layout_height="@dimen/list_item_height"
android:layout_gravity="center_vertical"
android:background="?attr/options_button_background"
android:focusable="false"
android:src="?attr/list_settings_icon"/>
<ImageButton
android:id="@+id/play"
android:layout_width="@dimen/dashListItemHeight"
android:layout_height="@dimen/dashListItemHeight"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dashFavIconMargin"
android:background="?attr/dashboard_button"
android:src="@drawable/ic_play_light"/>
</LinearLayout>
<ImageButton
android:id="@+id/options"
android:layout_width="@dimen/list_item_height"
android:layout_height="@dimen/list_item_height"
android:layout_gravity="center_vertical"
android:background="?attr/options_button_background"
android:focusable="false"
android:src="?attr/list_settings_icon"/>
</LinearLayout>

View file

@ -13,8 +13,6 @@
<Button
android:id="@+id/clearAll"
android:layout_marginLeft="@dimen/list_content_padding"
android:layout_marginRight="@dimen/list_content_padding"
android:background="?attr/downloadButtonBackground"
android:textColor="?attr/pstsTextColor"
android:layout_width="match_parent"

View file

@ -7,31 +7,67 @@
android:orientation="horizontal"
android:paddingBottom="5dp"
android:paddingLeft="@dimen/list_content_padding"
android:paddingRight="@dimen/list_content_padding"
android:paddingTop="5dp">
<TextView
android:id="@+id/label"
style="@style/ListText"
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/favorites_icon_right_margin"
android:layout_marginTop="@dimen/favorites_icon_top_margin"
android:focusable="false"
android:src="@drawable/ic_sdcard"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="3dp"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
tools:text="@string/lorem_ipsum"/>
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/dashFavNameTextSize"
tools:text="@string/lorem_ipsum"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/direction"
android:layout_width="@dimen/dashFavDirectionSize"
android:layout_height="@dimen/dashFavDirectionSize"
android:layout_gravity="center_vertical"/>
<TextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/showAllButtonTextSize"
tools:text="100500 km"/>
</LinearLayout>
</LinearLayout>
<ImageButton
android:id="@+id/remove"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/options"
android:layout_width="@dimen/list_item_height"
android:layout_height="@dimen/list_item_height"
android:layout_gravity="center_vertical"
android:background="?attr/reset_image"
android:contentDescription="@string/default_buttons_delete"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:paddingTop="2dp"/>
android:background="?attr/options_button_background"
android:focusable="false"
android:src="?attr/list_settings_icon"/>
</LinearLayout>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources><string name="recording_context_menu_show">اظهر</string>
<?xml version='1.0' encoding='utf-8'?>
<resources><string name="recording_context_menu_show">اظهر</string>
<string name="av_def_action_picture">التقط صورة</string>
<string name="av_def_action_video">تسجيل الفيديو</string>
@ -1443,4 +1444,9 @@ OsmAnd هو المصدر المفتوح و التي يجري تطويرها بن
<string name="osmand_net_previously_installed">هناك نسخة سابقة مثبّتة من OsmAnd. سوف تُنقل كل البيانات المُخزنة إلى التطبيق الجديد ما عدا النقاط المفضلة التي يجب عليك تصديرها من التطبيق القديم ثم استيرادها في التطبيق الجديد.</string>
<string name="gps_status_app_not_found">تطبيق GPS Status غير مثبّت. هل تريد البحث عنه في المتجر؟</string>
<string name="plugin_settings_button_caption">اعدادات</string>
<string name="plugin_description_title">الوصف</string>
<string name="video">فيديو</string>
<string name="photo">صورة</string>
<string name="rename_recording">إعادة تسمية تسجيل</string>
</resources>

View file

@ -2041,4 +2041,5 @@ OsmAnd мае адкрыты зыходны код і актыўна разві
<string name="plugin_nautical_descr2">Файл з дадзенымі зьмяшчае ўсе навігацыйныя сімвалы ў выглядзе адзінага файлу з назвай \"World seamarks\".</string>
<string name="plugin_nautical_descr3">Гэты стыль можа быць скасаваны шляхам яго выключэньня тут або зьменаю ў пункце \"Стыль мапы\" меню \"Налады мапы\" на патрэбны.</string>
<string name="back_to_map">Вярнуцца да мапы</string>
</resources>

View file

@ -1813,7 +1813,7 @@ s často kladenými otázkami.</string>
<string name="rendering_value__name">Výchozí</string>
<string name="gps_status">GPS stav</string>
<string name="version_settings_descr">Stáhnout vývojové verze</string>
<string name="version_settings">Verze</string>
<string name="version_settings">Vývojové verze</string>
<string name="rendering_attr_streetLighting_name">Pouliční osvětlení</string>
<string name="proxy_pref_title">Proxy</string>
<string name="proxy_pref_descr">Nastavit internetové proxy připojení</string>
@ -1854,4 +1854,5 @@ s často kladenými otázkami.</string>
<string name="audio">Audio</string>
<string name="video">Video</string>
<string name="photo">Fotografie</string>
<string name="watch">Zobrazit</string>
</resources>

View file

@ -549,7 +549,7 @@
<string name="poi_island">Ø</string>
<string name="poi_islet">Holm</string>
<string name="poi_seamark_anchorage">Ankringsområde</string>
<string name="poi_seamark_anchorage">Ankerplads</string>
<string name="poi_seamark_anchor_berth">Ankerplads</string>
<string name="poi_seamark_beacon">Båke</string>
<string name="poi_seamark_beacon_cardinal">Kompasbåke</string>
@ -560,13 +560,13 @@
<string name="poi_seamark_building">Sømærke bygning</string>
<string name="poi_seamark_bridge">Sømærke bro</string>
<string name="poi_seamark_buoy_cardinal">Kompastønde</string>
<string name="poi_seamark_buoy_installation">Installation tønde</string>
<string name="poi_seamark_buoy_installation">Installationstønde</string>
<string name="poi_seamark_buoy_isolated_danger">Tønde, isoleret fare</string>
<string name="poi_seamark_buoy_lateral">Sidetønde</string>
<string name="poi_seamark_buoy_safe_water">Midtfarvandstønde</string>
<string name="poi_seamark_buoy_special_purpose">Specialtønde</string>
<string name="poi_seamark_daymark">Dagmærke</string>
<string name="poi_seamark_distance_mark">Distance mærke</string>
<string name="poi_seamark_distance_mark">Afstandsmærke</string>
<string name="poi_seamark_dry_dock">Tørdok</string>
<string name="poi_seamark_dyke">Dige</string>
<string name="poi_seamark_floating_dock">Flydedok</string>
@ -676,7 +676,7 @@
<string name="poi_tourism">Turisme</string>
<string name="poi_entertainment">Fritid</string>
<string name="poi_sustenance">Mad og spise</string>
<string name="poi_service">Serviceydelser</string>
<string name="poi_service">Tjenesteydelse</string>
<string name="poi_finance">Finansiel</string>
<string name="poi_natural">Natur</string>
<string name="poi_seamark">Maritimt</string>

View file

@ -1147,7 +1147,7 @@
<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-kort</string>
<string name="go_back_to_osmand">Tilbage til OsmAnd-kortet</string>
<string name="close">Luk</string>
<string name="loading_data">Indlæser data…</string>
<string name="reading_indexes">Læser lokale data…</string>
@ -1920,7 +1920,7 @@
<string name="roads_only">Kun veje</string>
<string name="notes">Noter</string>
<string name="online_map">Online kort</string>
<string name="watch">Overvåg</string>
<string name="watch">Vis</string>
<string name="share_note">Del note</string>
<string name="rename_recording">Omdøb optagelse</string>
<string name="export">Eksport</string>
@ -1943,4 +1943,9 @@
<string name="plugin_touringview_descr4">Visningen kan altid nulstilles ved enten at deaktivere den igen her, eller ved at ændre \'Kortformat\' under \'Konfigurer kort\' som ønsket.</string>
<string name="location_on_map">Placering:\n Lat %1$s\n Long %2$s</string>
<string name="days_behind">dage bagefter</string>
<string name="rename_failed">Fejl ved omdøbning.</string>
<string name="back_to_map">Tilbage til kortet</string>
<string name="currently_recording_track">Aktuelt optagelsesspor</string>
<string name="showed_on_map">Vist på kortet</string>
<string name="turn_off_all">Deaktiver alle</string>
</resources>

View file

@ -177,12 +177,12 @@
<string name="map_settings">Karten-Einstellungen</string>
<string name="map_settings_descr">Konfigurieren der Karten-Anzeige</string>
<string name="osmand_rastermaps_plugin_description">Ermöglicht die Verwendung zahlreicher Online Kachel-Kartenquellen (auch als Over- oder Underlay). Online-Karten werden im Unterordner \'tiles\' zwischengespeichert. Karten-Kacheln können auch offline erstellt und in das Unterordner \'tiles\' kopiert werden.</string>
<string name="osmand_background_plugin_description">Zeigt Einstellungen für die Standort-Aufzeichnung oder die Navigation während das Gerät im Standby-Modus ist (periodisches Aufwecken des GPS-Empfängers).</string>
<string name="osmand_accessibility_description">Zeigt Einstellungen für spezielle Eingabehilfen.</string>
<string name="osmand_background_plugin_description">Zeigt die Einstellungen für die Standort-Aufzeichnung oder die Navigation während das Gerät im Standby-Modus ist (periodisches Aufwecken des GPS-Empfängers).</string>
<string name="osmand_accessibility_description">Zeigt die Einstellungen für spezielle Eingabehilfen.</string>
<string name="extra_settings">Erweiterte Einstellungen</string>
<string name="osmand_monitoring_description">Ermöglicht das Aufzeichnen zurückgelegter Strecken als lokale GPX-Datei oder online via Web-Service.</string>
<string name="osmand_extra_settings_description">Zeigt Einstellungen für erweiterte Kartenkonfiguration (z.B. mehr Details) und einige Gerätespezifika.</string>
<string name="osmand_development_plugin_description">Zeigt Einstellungen für Entwicklungs- und Fehlersuchhilfen wie simulierte Navigation oder die Messung der Render-Leistung.</string>
<string name="osmand_development_plugin_description">Zeigt die Einstellungen für Entwicklungs- und Fehlersuchhilfen wie simulierte Navigation oder die Messung der Render-Leistung.</string>
<string name="plugins_screen">Plugins</string>
<string name="prefs_plugins_descr">Module aktivieren Experteneinstellungen und Zusatzdienste</string>
<string name="prefs_plugins">Plugins</string>
@ -1199,7 +1199,7 @@
<string name="osmand_parking_am">AM</string>
<string name="osmand_parking_position_name">Park-Position</string>
<string name="osmand_parking_plugin_description">Dieses Modul speichert den Standort eines geparkten Fahrzeugs.</string>
<string name="osmand_parking_plugin_name">Parkplatz-Standort-Plugin</string>
<string name="osmand_parking_plugin_name">Parkplatz-Standort (Externes Plugin)</string>
<string name="context_menu_item_add_parking_point">Parkplatz-Standort festlegen</string>
<string name="context_menu_item_delete_parking_point">Parkplatz-Standort löschen</string>
<string name="gpxup_public">Öffentlich</string>
@ -1299,7 +1299,7 @@
<string name="zxing_barcode_scanner_not_found">Barcode-Scanner-Anwendung nicht installiert. Soll im Play-Store danach gesucht werden?</string>
<string name="close_changeset">Änderungssatz schließen</string>
<string name="incomplete_locale">unfertig</string>
<string name="srtm_plugin_name">Höhenlinien-Plugin</string>
<string name="srtm_plugin_name">Höhenlinien (Externes Plugin)</string>
<string name="srtm_plugin_description">Ermöglicht das Laden von offline Höhenlinien und Relief-Schattierungen (\'Einstellungen\ -&gt; \'Karten-Management\ -&gt; \'Herunterladen\ -&gt; \'Kartentyp wählen\).</string>
<string name="srtm_paid_version_title">Höhenlinien-Plugin</string>
<string name="srtm_paid_version_msg">Bitte überlegen Sie, ob Sie durch den Kauf des Höhenlinien-Plugins im Play-Store die weitere Entwicklung unterstützen wollen.</string>
@ -1816,8 +1816,8 @@ Afghanistan, Ägypten, Albanien, Algerien, Andorra, Angola, Anguilla, Antigua an
<string name="osmo_settings_uuid">Geräte-ID</string>
<string name="osmo_settings_descr">Konfigurieren der Überwachungs-Einstellungen und des persönlichen Überwachungs-Kanals</string>
<string name="osmo_plugin_description">"Erweiterte OpenStreetMap-basierte Live-Überwachung, siehe http://osmo.mobi … Ermöglicht die Positionsdarstellung in von einzelnen Geräten in Echtzeit. Bei anonym erstellten Gruppen sind die Optionen etwas eingeschränkt: Lebensdauer der Gruppe nur für einige Tage, auch ist keine zentrale Steuerung der Gruppe möglich. Es gibt verschiedene Einstellungen für zeitlich begrenzte oder Dauer-Aufzeichnung. Voll funktionsfähige Gruppen müssen auf der genannten Internetseite erstellt werden, auf die Gruppe haben nur registrierte Nutzer Zugriff. "</string>
<string name="osmo_plugin_name">OsMo (Erweiterte Live-Überwachung)</string>
<string name="osmo_settings">OsMo OpenStreetMap-Überwachung</string>
<string name="osmo_plugin_name">OsMo-Überwachung</string>
<string name="osmo_settings">OsMo-Überwachung</string>
<string name="osmo_io_error">OsMo Verbindungsproblem: </string>
<string name="osmo_mode_on">OsMo-Sitzung beenden</string>
<string name="osmo_mode_off">OsMo-Sitzung starten</string>
@ -1999,7 +1999,7 @@ Afghanistan, Ägypten, Albanien, Algerien, Andorra, Angola, Anguilla, Antigua an
<string name="everything_up_to_date">Alle Daten aktuell</string>
<string name="use_opengl_render">OpenGL-Renderung verwenden</string>
<string name="use_opengl_render_descr">Hardware beschleunigtes OpenGL-Rendering verwenden (Funktioniert nicht auf allen Geräten)</string>
<string name="no_internet_connection">Herunterladen nicht möglich. Internet-Verbindung prüfen!</string>
<string name="no_internet_connection">Herunterladen nicht möglich. Bitte die Internet-Verbindung prüfen!</string>
<string name="download_tab_downloads">Alle Downloads</string>
<string name="download_tab_updates">Aktualisierungen</string>
<string name="download_tab_local">Lokal</string>
@ -2027,7 +2027,7 @@ Afghanistan, Ägypten, Albanien, Algerien, Andorra, Angola, Anguilla, Antigua an
<string name="rendering_value__name">Standard</string>
<string name="parking_place">Parkplätze</string>
<string name="remove_the_tag">TAG ENTFERNEN</string>
<string name="gps_status">GPS Status</string>
<string name="gps_status">GPS-Status</string>
<string name="version_settings_descr">Nightly-Builds herunterladen</string>
<string name="version_settings">Builds</string>
<string name="rendering_attr_streetLighting_name">Straßenbeleuchtung</string>
@ -2058,9 +2058,33 @@ Afghanistan, Ägypten, Albanien, Algerien, Andorra, Angola, Anguilla, Antigua an
<string name="free">Frei %1$s </string>
<string name="device_memory">Gerätespeicher</string>
<string name="rendering_attr_pisteGrooming_name">Pistenpflege</string>
<string name="plugin_ski_name">Ski-Karten</string>
<string name="plugin_nautical_name">See-Karten</string>
<string name="world_ski_missing">Um Ski-Karten anzeigen zu können, muss die spezielle Offline-Karte heruntergeladen werden!</string>
<string name="nautical_maps_missing">Um See-Karten anzeigen zu können, muss die spezielle Offline-Karte heruntergeladen werden!</string>
<string name="plugin_ski_name">Ski-Karten-Ansicht</string>
<string name="plugin_nautical_name">See-Karten-Ansicht</string>
<string name="world_ski_missing">Um Ski-Karten anzeigen zu können, muss die entsprechende Offline-Karte heruntergeladen werden</string>
<string name="nautical_maps_missing">Um See-Karten anzeigen zu können, muss die entsprechende Offline-Karte heruntergeladen werden</string>
<string name="get_plugin">Erhalten</string>
</resources>
<string name="rename_failed">Umbenennen fehlgeschlagen.</string>
<string name="currently_recording_track">Derzeit aufnehmender Track</string>
<string name="back_to_map">Zurück zur Karte</string>
<string name="plugin_nautical_descr1">Das Aktivieren dieser Ansicht ändert den Kartinstil zur See-Karte, es werden dann alle nautischen Navigationsmarken und Kartensymbolde angezeigt.</string>
<string name="plugin_nautical_descr2">Eine Karten-Datei, die weltweit alle Seezeichen enthält, ist als einzelne Karte mit dem Namen \'Seezeichen (weltweit)\' herunterladbar.</string>
<string name="plugin_ski_descr1">Das Aktivieren dieser Ansicht ändert den Kartinstil zur \'Winter- und Skikarte\', es werden dann alle winterlichen Landschaftselemente angezeigt.</string>
<string name="plugin_ski_descr2">Eine Karten-Datei, die weltweit alle Loipen und Abfahrtshänge enthält, ist als einzelne Karte mit dem Namen \'Ski-Karte (weltweit)\' herunterladbar.</string>
<string name="plugin_nautical_descr3">Diese Ansicht kann zurückgestellt werden indem sie hier wieder deaktiviert oder in dem der \'Karten-Stil\' unter \'Karte konfigurieren\' wie gewünscht geändert wird.</string>
<string name="plugin_ski_descr3">Diese Ansicht kann zurückgestellt werden indem sie hier wieder deaktiviert oder in dem der \'Karten-Stil\' unter \'Karte konfigurieren\' wie gewünscht geändert wird.</string>
<string name="plugin_touringview_descr3">Ein spezieller Kartendownload ist nicht notwendig, die Ansicht wird aus den Standardkarten generiert.</string>
<string name="plugin_touringview_descr4">Diese Ansicht kann zurückgestellt werden indem sie hier wieder deaktiviert oder in dem der \'Karten-Stil\' unter \'Karte konfigurieren\' wie gewünscht geändert wird.</string>
<string name="audio">Audio</string>
<string name="video">Video</string>
<string name="photo">Foto</string>
<string name="rename_recording">Aufnahme umbenennen</string>
<string name="location_on_map">Position:\n Lat %1$s\n Lon %2$s</string>
<string name="notes">Notizen</string>
<string name="online_map">Online-Karte</string>
<string name="roads_only">Nur Straßen</string>
<string name="rendering_attr_pisteRoutes_name">Pisten</string>
<string name="export">Export</string>
<string name="watch">Ansehen</string>
</resources>

View file

@ -769,13 +769,13 @@
<string name="online_map_settings_descr">Configurar fuentes de mapas en línea o teselas guardadas</string>
<string name="map_settings">Configuraciones del mapa</string>
<string name="map_settings_descr">Configurar la pantalla del mapa</string>
<string name="osmand_rastermaps_plugin_description">Muestra opciones para configurar diversos mapas con conexión o de teselas guardadas como mapa base o como mapas superpuestos / subyacentes. Estos mapas también se pueden preparar sin conexión y copiarlos en la carpeta de datos de OsmAnd.</string>
<string name="osmand_rastermaps_plugin_description">Muestra las opciones para usar diversos mapas con conexión o de teselas guardadas, tanto como mapa base como mapas superpuestos / subyacentes. Estos mapas también se pueden preparar sin conexión y copiarlos en la carpeta de datos de OsmAnd.</string>
<string name="osmand_background_plugin_description">Muestra las configuraciones para habilitar el seguimiento y la navegación en modo suspensión (pantalla apagada) activando periódicamente el dispositivo GPS.</string>
<string name="osmand_accessibility_description">Muestra las configuraciones para características especiales de accesibilidad.</string>
<string name="extra_settings">Configuraciones avanzadas</string>
<string name="osmand_monitoring_description">Este agregado facilita el registro de sus excursiones a un fichero GPX o en directo usando un servicio web.</string>
<string name="osmand_monitoring_description">Muestra el botón y las opciones que facilitan el registro de sus excursiones en un fichero GPX o usando un servicio web.</string>
<string name="osmand_extra_settings_description">Muestra opciones para configuraciones avanzadas de mapa (como aumentar detalles del mapa) y algunas especificas de dispositivos.</string>
<string name="osmand_development_plugin_description">Mostrar opciones de características de desarrollo y depuración como la simulación de rutas o la pantalla de rendimiento de la visualización.</string>
<string name="osmand_development_plugin_description">Muestra las opciones de características de desarrollo y depuración como la simulación de rutas o la indicación de rendimiento de la visualización.</string>
<string name="plugins_screen">Gestor de extras</string>
<string name="select_plugin_to_activate">Toque un extra para activarlo o desactivarlo. (Puede ser necesario reiniciar OsmAnd.)</string>
<string name="prefs_plugins_descr">Los extras activan opciones avanzadas y proporcionan funcionalidades adicionales</string>
@ -784,7 +784,7 @@
\n*Funcionalidad de extras*\n\t - La mayoría de funcionalidades está agrupada por características y pueden ser habilitadas / deshabilitadas en el Gestor de Extras. Puede habilitar fuentes de teselas de mapas (online o cacheadas), opciones de seguimiento, y muchas otras características nuevas y existentes.\n*Soporte para nuevos datos de mapa descargados*\n\t - La visualización de mapa es más rápida y precisa (Los problemas con la línea de la costa y zonas inundadas están mayormente corregidos)\n\t - Necesita descargarse datos completamente nuevos (los datos antiguos no están soportados)\n*Navegación sin conexión*
\n\t - La navegación sin conexión es más robusta\n*Usabilidad e interfaz de usuario*
\n\t - Mejoras en muchas áreas "</string>
<string name="osm_editing_plugin_description">Muestra parámetros para la colaboración con OSM como recolectar / modificar objetos PDI de OSM, crear / comentar fallos de OSM, y contribuir con trazas GPX (requiere credenciales OSM).</string>
<string name="osm_editing_plugin_description">Muestra las opciones necesarias para la colaboración con OSM como crear / modificar objetos PDI de OSM, abrir / comentar fallos de OSM, y contribuir con trazas GPX (requiere credenciales OSM).</string>
<string name="vector_maps_may_display_faster_on_some_devices">Los mapas vectoriales pueden mostrarse más rápido. Puede no funcionar correctamente en algunos dispositivos.</string>
<string name="play_commands_of_currently_selected_voice">Reproduce algunas indicaciones de la voz seleccionada actualmente</string>
@ -911,7 +911,7 @@
<string name="osmand_parking_pm">PM</string>
<string name="osmand_parking_am">AM</string>
<string name="osmand_parking_position_name">Punto de aparcamiento</string>
<string name="osmand_parking_plugin_description">Este extra permite guardar la ubicación de su automóvil aparcado.</string>
<string name="osmand_parking_plugin_description">Extra adicional (descarga aparte) que permite guardar la ubicación de tu automóvil aparcado.</string>
<string name="osmand_parking_plugin_name">Posición de aparcamiento (plugin externo)</string>
<string name="context_menu_item_add_parking_point">Marcar como posición de aparcamiento</string>
<string name="context_menu_item_delete_parking_point">Eliminar un marcador de aparcamiento</string>
@ -1073,7 +1073,7 @@
<string name="osmodroid_plugin_name">Extra OsMoDroid</string>
<string name="index_srtm_parts">piezas</string>
<string name="index_srtm_ele">Curvas de nivel</string>
<string name="srtm_plugin_description">Permite descargar curvas de nivel sin conexión y relieve sombreado (\'Opciones\' → \'Gestionar mapas\' → \'Descargar\' → Seleccionar el tipo de mapa deseado).</string>
<string name="srtm_plugin_description">Extra adicional (descarga aparte) que permite descargar curvas de nivel y relieve sombreado (\'Opciones\' → \'Gestionar mapas\' → \'Descargar\' → Seleccionar el tipo de mapa deseado). Estos se pueden mostrar en combinación con los mapas sin conexión OsmAnd.</string>
<string name="srtm_plugin_name">Contornos de nivel (plugin externo)</string>
<string name="download_select_map_types">Otros mapas</string>
<string name="download_srtm_maps">Curvas de nivel</string>
@ -1270,7 +1270,7 @@
<string name="plugin_distance_point">Punto</string>
<string name="gpx_file_name">Nombre del archivo GPX</string>
<string name="gpx_saved_sucessfully">Archivo GPX guardado correctamente en {0}</string>
<string name="osmand_distance_planning_plugin_description">Crear caminos (o usar / modificar archivos GPX existentes) para medir la distancia entre los puntos. Guardado como GPX, se puede utilizar para planificar rutas GPX.</string>
<string name="osmand_distance_planning_plugin_description">Activa un control que permite crear caminos pulsando en el mapa (o usar / modificar archivos GPX existentes) para medir la distancia entre los puntos. Los resultados pueden guardarse como GPX, y utilizarse para planificar rutas GPX.</string>
<string name="osmand_distance_planning_plugin_name">Cálculador de distancia y herramienta de planificación</string>
<string name="use_distance_measurement_help">* Toca para marcar un punto.\n * Mantenga pulsado el mapa para suprimir el punto anterior.\n * Mantenga pulsado el punto para ver e incluir descripción.\n * Pulse en el control de medición para ver más acciones.</string>
<string name="default_buttons_do_not_show_again">No mostrar de nuevo</string>
@ -1560,8 +1560,8 @@
<string name="interrupt_music">Interrumpir música</string>
<string name="osmo_settings_uuid">Id único del dispositivo</string>
<string name="osmo_settings_descr">Configurar opciones de monitorización y configurar canal de monitoreo</string>
<string name="osmo_plugin_description">"OpenStreetMap-Monitoring - Monitorización avanzada en directo. Proporciona la posibilidad de seguir otros dispositivos y ser seguido. Crea grupos anónimos, comparte las localizaciones de cada uno y comuníquense. Tiene varias opciones para seguimiento por sesión o permanente. Los grupos anónimos están limitados a varios días y a algunas funcionalidades, p.e. no hay control remoto ni administrador de grupo. Los grupos completamente funcionales deben ser creados en la web y solo los usuarios registrados tienen acceso a ellos. Por favor, lee más en http://osmo.mobi. "</string>
<string name="osmo_plugin_name">OsMo monitoring</string>
<string name="osmo_plugin_description">"Muestra las opciones para usar OsMo - Monitorización avanzada en directo, mira http://osmo.mobi. Proporciona la posibilidad de seguir otros dispositivos y ser seguido. Crear grupos anónimos, compartir las localizaciones de cada uno y comunicarse. Tiene varias opciones para seguimiento por sesión o permanente. Los grupos anónimos están limitados a varios días y a algunas funcionalidades, p.e. no hay control remoto ni administrador de grupo. Los grupos completamente funcionales deben ser creados en el sitio web y sólo los usuarios registrados tienen acceso a ellos. "</string>
<string name="osmo_plugin_name">Monitorización OsMo</string>
<string name="osmo_settings">OsMo Monitoring</string>
<string name="share_route_as_gpx">Compartir la ruta como archivo GPX</string>
<string name="share_route_subject">Ruta compartida vía OsmAnd</string>
@ -1789,7 +1789,7 @@
<string name="duration">Duración</string>
<string name="distance">Distancia</string>
<string name="record_plugin_name">Grabación de viaje</string>
<string name="record_plugin_description">Guarde sus trazas tocando un botón en la pantalla del mapa. Mostrar las configuraciones para grabar sus viajes a archivos GPX locales o usando un servicio web en línea.</string>
<string name="record_plugin_description">Activa la funcionalidad para guardar tus trazas tocando un botón en la pantalla del mapa y muestra las opciones para grabar tus viajes a archivos GPX locales o usando un servicio web en línea.</string>
<string name="rendering_attr_publicTransportMode_name">Rutas de autobús, trolebús y lanzadera</string>
<string name="save_track_to_gpx_globally">Guardar traza en fichero GPX</string>
<string name="save_track_interval_globally">Intervalo de guardado</string>
@ -1946,8 +1946,8 @@
<string name="plugin_touringview_descr1">Activando esta vista cambia el estilo de mapa a \'Vista de Touring\', que es una vista de alto detalle especial para los viajeros y conductores profesionales.</string>
<string name="plugin_touringview_descr2">Esta vista proporciona, en cualquier nivel de zoom del mapa, la máxima cantidad de detalles de viaje disponible en los datos del mapa (especialmente carreteras, pistas, senderos y marcas de orientación). También representa claramente todos los tipos de carreteras sin ambigüedades por códigos de color, que es útil cuando por ejemplo conduciendo vehículos grandes.</string>
<string name="days_behind">días atrás</string>
<string name="plugin_touringview_descr3">La descarga de un mapa especial no es necesaria, la vista es creada desde nuestros mapas estándar.</string>
<string name="plugin_touringview_descr4">La vista puede ser revertida desactivandola de nuevo aquí, o cambiando el \'Estilo de mapa\' desde \'Configurar mapa\' como se quiera.</string>
<string name="plugin_touringview_descr3">No es necesario descargar un mapa especial, la vista se crea a partir de nuestros mapas estándar.</string>
<string name="plugin_touringview_descr4">Esta vista puede ser revertida desactivandola de nuevo aquí, o cambiando el \'Estilo de mapa\' desde \'Configurar mapa\'.</string>
<string name="location_on_map">Localización:\n Lat %1$s\n Lon %2$s</string>
<string name="watch">Ver</string>
<string name="plugin_touringview_name">Vista de mapa Touring</string>

View file

@ -218,7 +218,7 @@
<string name="poi_marketplace">Marché</string>
<string name="poi_massage">Massage</string>
<string name="poi_memorial">Mémorial</string>
<string name="poi_military">Zone militaire</string>
<string name="poi_military">Militaire</string>
<string name="poi_mine_historic">Mine abandonnée</string>
<string name="poi_mineshaft">Puits de mine</string>
<string name="poi_miniature_golf">Golf miniature</string>

View file

@ -1959,4 +1959,9 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
<string name="plugin_nautical_descr2">Une carte marine mondiale est disponible en une seul téléchargement nommé \"Carte marine\".</string>
<string name="location_on_map">Position :\n Lat. %1$s\n Lon. %2$s</string>
<string name="days_behind">jours écoulés</string>
<string name="rename_failed">Échec du renommage.</string>
<string name="currently_recording_track">Enregistrement de l\'itinéraire en cours</string>
<string name="back_to_map">Retour à la carte</string>
<string name="turn_off_all">Tout éteindre</string>
<string name="showed_on_map">Affiché sur la carte</string>
</resources>

View file

@ -2109,4 +2109,10 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
<string name="plugin_touringview_descr2">Questa visualizzazione fornisce, per ogni livello di zoom, il massimo dei dettagli di viaggio disponibili nei dati della mappa (particolari delle strade, sentieri e segni di orientamento). Rappresenta anche chiaramente tutte le strade ambigue tramite la colorazione distintiva, ciò risulta utile per esempio guidando autoveicoli di grandi dimensioni.</string>
<string name="plugin_touringview_descr4">Questa visualizzazione può essere ripristinata sia disattivandola nuovamente da qui che cambiando lo \'Stile della mappa\' in \' Configura mappa\' come desiderato.</string>
<string name="plugin_touringview_descr1">Attivando questa visualizzazione lo stile della mappa cambierà in \'Vista turistica\', questa è una visualizzazione particolarmente molto dettagliata per i turisti e autisti professionali.</string>
<string name="back_to_map">Torna alla mappa</string>
<string name="rename_failed">Rinominazione fallita.</string>
<string name="turn_off_all">Spegni tutti</string>
<string name="showed_on_map">Visualizzato sulla mappa</string>
<string name="days_behind">giorni fa</string>
<string name="currently_recording_track">Traccia attualmente in registrazione</string>
</resources>

View file

@ -2174,4 +2174,9 @@
<string name="location_on_map">위치:
\n위도 %1$s\n경도 %2$s</string>
<string name="turn_off_all">모두 끄기</string>
<string name="showed_on_map">지도에서 보기</string>
<string name="rename_failed">이름 바꾸기 실패 했습니다.</string>
<string name="currently_recording_track">현재 기록중인 트랙</string>
<string name="back_to_map">지도로 돌아가기</string>
</resources>

View file

@ -1931,4 +1931,8 @@
<string name="rename_recording">Pervardinti įrašą</string>
<string name="location_on_map">Vieta:\n Plat. %1$s\n Ilg. %2$s</string>
<string name="export">Eksportuoti</string>
<string name="days_behind">dienas atsilikęs</string>
<string name="plugin_nautical_descr1">Aktyvavus šį rodinį bus rodomas jūrlapis su jūriniais navigaciniais ženklais ir simboliais.</string>
<string name="rename_failed">Nepavyko pervardinti.</string>
<string name="back_to_map">Grįžti į žemėlapį</string>
</resources>

View file

@ -611,4 +611,19 @@
<string name="poi_entertainment">Tempus lìberu</string>
<string name="poi_user_defined_other">Definidu dae s\'impitadore</string>
<string name="poi_internet_access_wlan">Atzessu ìnternet: wlan</string>
<string name="poi_internet_access_terminal">Atzessu ìnternet: terminale</string>
<string name="poi_internet_access_wired">Atzessu ìnternet: tramite cavu</string>
<string name="poi_internet_access_public">Atzessu ìnternet: pùblicu</string>
<string name="poi_internet_access_service">Atzessu ìnternet: servìtziu</string>
<string name="poi_farm">Fatoria: butega</string>
<string name="poi_wine">Butega de binos</string>
<string name="poi_child_clothes_shop">Butega de bestires pro pitzinnos</string>
<string name="poi_car">Cuntzessionàriu de màchinas</string>
<string name="poi_car_parts">Cantos de màchinas</string>
<string name="poi_public_transport_stop_position">Firmada de su trasportu pùblicu</string>
<string name="poi_halt">Firmada de sa ferrovia (obsoleta)</string>
<string name="poi_railway_buffer_stop">Denegante pro sos trenos</string>
</resources>

File diff suppressed because one or more lines are too long

View file

@ -2089,4 +2089,7 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
<string name="location_on_map">Umiestnenie:\n Šírka %1$s\n Dĺžka %2$s</string>
<string name="watch">Zobraziť</string>
<string name="days_behind">dní pozadu</string>
<string name="rename_failed">Premenovanie zlyhalo.</string>
<string name="back_to_map">Späť na mapu</string>
</resources>

View file

@ -226,12 +226,12 @@
<string name="rendering_value__name">Подразумевано</string>
<string name="rendering_value_default_name">Подразумевано</string>
<string name="traffic_warning_pedestrian">Пешачки прелаз</string>
<string name="show_pedestrian_warnings">Прикажи пешачке прелазе</string>
<string name="dash_download_msg_none">Да ли желите да преузмете мапе за коришћење ван мреже?</string>
<string name="dash_download_msg">Преузели сте %1$s мапа</string>
<string name="dash_download_new_one">Преузми нову мапу</string>
<string name="show_pedestrian_warnings">Приказуј пешачке прелазе</string>
<string name="dash_download_msg_none">Да ли желите да преузмете карте за коришћење ван мреже?</string>
<string name="dash_download_msg">Преузели сте %1$s карата</string>
<string name="dash_download_new_one">Преузми нову карту</string>
<string name="dash_download_manage">Управљајте</string>
<string name="map_locale">Језик мапе</string>
<string name="map_locale">Језик карте</string>
<string name="application_dir_change_warning2">Да ли желите да Османд умножи и своје податке на ново место? Изаберите „Не“ да би Османд само направио и користио нову фасциклу.</string>
<string name="navigate_point_zone">Област</string>
<string name="download_tab_downloads">Сва преузимања</string>
@ -245,13 +245,13 @@
<string name="osmo_use_https_descr">Користи безбедну везу са сервером</string>
<string name="osmo_use_https">Користи ХТТПС</string>
<string name="advanced_settings">Напредно</string>
<string name="map_update">Доступне су надоградње %1$s мапа</string>
<string name="map_update">Доступне су надоградње %1$s карата</string>
<string name="search_for">Потражи</string>
<string name="show_map">ПРИКАЖИ МАПУ</string>
<string name="show_map">ПРИКАЖИ КАРТУ</string>
<string name="show_all">ПРИКАЖИ СВЕ</string>
<string name="coordinates">Координате</string>
<string name="wake_on_voice_never">Никад</string>
<string name="select_impassable_road">Означи на мапи…</string>
<string name="select_impassable_road">Означи на карти…</string>
<string name="rendering_category_hide">Сакриј</string>
<string name="rendering_category_details">Појединости</string>
<string name="hide_all_waypoints">Уклони све</string>
@ -341,7 +341,7 @@
<string name="traffic_warning_stop">Знак стоп</string>
<string name="speak_pedestrian">Најављуј прешачке прелазе</string>
<string name="rendering_attr_roadStyle_name">Врста пута</string>
<string name="avoid_roads_msg">Можете да измените путању избором путева за избегавање</string>
<string name="avoid_roads_msg">Можете да изаберете заменску путању избором путева за избегавање</string>
<string name="navigation_over_track">Да ли започети навођење по стази?</string>
<string name="rendering_value_orange_name">Наранџаста</string>
<string name="traffic_warning_railways">Пружни прелаз</string>
@ -356,4 +356,39 @@
<string name="navigate_point_northing">Географска ширина</string>
<string name="navigate_point_easting">Географска дужина</string>
<string name="error_avoid_specific_road">Нисам пронашао заобилазнице</string>
<string name="rename_failed">Преименовање није успело.</string>
<string name="currently_recording_track">Стаза која се тренутно снима</string>
<string name="back_to_map">Назад на карту</string>
<string name="plugin_nautical_descr1">Прелазак прегледа карте приказује поморски изглед, чиме се приказују све поморске ознаке навођења и графички знаци.</string>
<string name="plugin_nautical_descr2">"Датотека карте која садржи све опште поморске знаке је доступна у виду једног преузимања и назива се „Светске поморске карте“."</string>
<string name="plugin_nautical_descr3">Преглед може да се врати на стари његовим искључивањем овде, или изменом „Начина приказа карте“ под „Подесите карту“.</string>
<string name="plugin_ski_descr1">Покретање ове измене мења преглед карте на „Зима и скијање“, које приказује у положеном погледу особине предела и зимске услове.</string>
<string name="plugin_ski_descr2">"Светска карта приказује сва скијалишта и скијашке стазе у овом прегледу је доступна преузимањем „Светске скијашке карте“."</string>
<string name="audio">Звук</string>
<string name="video">Видео</string>
<string name="photo">Слика</string>
<string name="share_note">Дели белешку</string>
<string name="rename_recording">Преименуј снимак</string>
<string name="location_on_map">Географски положај:\nШирина %1$s↵\nДужина %2$s</string>
<string name="watch">Прегледај</string>
<string name="notes">Бележница</string>
<string name="online_map">Карта са мреже</string>
<string name="roads_only">Само путеви</string>
<string name="free">"Слободно %1$s "</string>
<string name="device_memory">Складиште уређаја</string>
<string name="plugin_ski_name">Преглед скијашке карте</string>
<string name="plugin_nautical_name">Преглед поморске карте</string>
<string name="world_ski_missing">Да би се приказивала скијашка карта, нарочита карта за преглед ван мреже треба да се преузме</string>
<string name="nautical_maps_missing">Да би се приказивале поморске карте, нарочита карта за преглед ван мреже треба да се преузме</string>
<string name="edit_group">Уреди скуп</string>
<string name="remove_the_tag">УКЛОНИ ОЗНАКУ</string>
<string name="gps_status">Стање ГПС-а</string>
<string name="version_settings_descr">Преузми ноћне изградње</string>
<string name="version_settings">Изградње</string>
<string name="points">Тачке</string>
<string name="tracks">Стазе</string>
<string name="my_location">Мој положај</string>
<string name="osm_editing_manage">Управљајте</string>
<string name="home_button">Матица</string>
</resources>

View file

@ -963,7 +963,7 @@
<string name="download_srtm_maps">Höjdkurvsdata</string>
<string name="tip_recent_changes_1_1_0_t">"Förändringar i 1.1.0:
\n\t* Insticksmodul för beräkning av avstånd\n\t* Insticksmodul för ljud-/videoanteckningar\n\t* Insticksmodul för höjdkurvor\n\t* Buggfixar
\n\t* \'Touring View\' - kartutseende med mer kartdetaljer, nytt utseende för vägar, mer kontrast och fjällvandringsalternativ (SAC-skala)
\n\t* \'Vägkartsvy\' - kartutseende med mer kartdetaljer, nytt utseende för vägar, mer kontrast och fjällvandringsalternativ (SAC-skala)
\n\t* EGM96 geoid offsetkorrigering för GPS-höjdavläsningar "</string>
@ -1828,11 +1828,16 @@
<string name="plugin_touringview_descr3">Ingen speciell hämtning av någon karta krävs; denna vy skapas med våra standardkartor.</string>
<string name="plugin_touringview_descr4">Denna vy kan ändras genom att antingen inaktivera den här igen eller genom att ändra kartstilen under Konfigurera kartor.</string>
<string name="plugin_touringview_descr1">Om du aktiverar denna vy ändras kartan till \'Touring view\', som är en speciell vy med mycket detaljer för resenärer och yrkesförare.</string>
<string name="plugin_touringview_descr1">Om du aktiverar denna vy ändras kartan till \'Vägkartsvy\', som är en speciell vy med mycket detaljer för resenärer och yrkesförare.</string>
<string name="location_on_map">Plats:\n Lat %1$s\n Lon %2$s</string>
<string name="plugin_touringview_descr2">Denna vy ger, vid varje zoomnivå, maximalt antal detaljer som är tillgängliga i kartdatat (speciellt vägar, stigar och orienteringsmärken). Den visar också alla vägtyper på ett mycket tydligt sätt via färgkoder något som är användbart t.ex vid framförande av stora fordon.</string>
<string name="plugin_touringview_name">Touring map-vy</string>
<string name="plugin_touringview_name">Vägkartsvy</string>
<string name="days_behind">dagar efter</string>
<string name="watch">Visa</string>
<string name="rename_failed">Namnbytet misslyckades.</string>
<string name="currently_recording_track">Spelar för tillfället in spår</string>
<string name="back_to_map">Tillbaka till kartan</string>
<string name="turn_off_all">Stäng av alla</string>
<string name="showed_on_map">Visade på kartan</string>
</resources>

View file

@ -1657,7 +1657,7 @@
<string name="gpx_selection_route_points">%1$s \n路線標點 %2$s</string>
<string name="gpx_selection_points">%1$s \n個標點</string>
<string name="gpx_selection_track">%1$s \n軌跡 %2$s</string>
<string name="gpx_available_current_track">正在錄制的軌跡</string>
<string name="gpx_available_current_track">現在正在錄製軌跡</string>
<string name="loading_smth">正在載入 %1$s …</string>
<string name="map_widget_plain_time">目前時間</string>
<string name="selected_gpx_info_show">\n\n長按在地圖上查看</string>
@ -1935,4 +1935,9 @@
<string name="plugin_ski_descr3">此檢視可以在這裡經由再次取消啟動,或透過 \'地圖式樣\' 之下的 \'組態地圖\' 這兩者中的任何一個更改而恢復它。</string>
<string name="plugin_touringview_descr4">此檢視可以在這裡經由再次取消啟動,或透過 \'地圖式樣\' 之下的 \'組態地圖\' 這兩者中的任何一個更改而恢復它。</string>
<string name="rename_failed">重新命名失敗。</string>
<string name="currently_recording_track">現在正在錄製軌跡</string>
<string name="back_to_map">返回地圖</string>
<string name="turn_off_all">全部關閉</string>
<string name="showed_on_map">在地圖上顯示</string>
</resources>

View file

@ -20,7 +20,9 @@
<color name="search_background_dark">#292f33</color>
<color name="dashboard_descr_colol">#727272</color>
<color name="icon_color_light">#727272</color>
<color name="dashboard_gpx_on_map">#448AFF</color>
<color name="dashboard_background">#eaeaea</color>
<color name="dashboard_divider_light">#F0F0F0</color>
<color name="dashboard_divider_dark">#3d474c</color>

View file

@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<resources>
<!--
Disclaimer:
@ -9,7 +9,12 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="turn_off_all">Turn_off_all</string>
<string name="showed_on_map">Showed on map</string>
<string name="rename_failed">Rename failed.</string>
<string name="days_behind">days behind</string>
<string name="currently_recording_track">Currently recording track</string>
<string name="back_to_map">Back to map</string>
<string name="plugin_nautical_descr1">Activating this view changes the map style to Nautical, thus showing all nautical navigation marks and chart symbols.</string>
<string name="plugin_nautical_descr2">A map file containing all nautical symbols globally is available as one single download called \'World seamarks\'.</string>
<string name="plugin_nautical_descr3">This view can be reverted by either de-activating it again here, or by changing the \'Map style\' under \'Configure map\' as desired.</string>

View file

@ -6,6 +6,7 @@ import java.io.IOException;
import net.osmand.IndexConstants;
import net.osmand.core.jni.AlphaChannelPresence;
import net.osmand.core.jni.IMapDataProvider;
import net.osmand.core.jni.MapStubStyle;
import net.osmand.core.jni.SWIGTYPE_p_QByteArray;
import net.osmand.core.jni.SwigUtilities;
@ -13,7 +14,9 @@ import net.osmand.core.jni.TileId;
import net.osmand.core.jni.ZoomLevel;
import net.osmand.core.jni.interface_ImageMapLayerProvider;
import net.osmand.map.ITileSource;
import net.osmand.map.MapTileDownloader;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.resources.AsyncLoadingThread;
import net.osmand.plus.resources.ResourceManager;
public class TileSourceProxyProvider extends interface_ImageMapLayerProvider {
@ -49,14 +52,22 @@ public class TileSourceProxyProvider extends interface_ImageMapLayerProvider {
String tileFilename = rm.calculateTileId(tileSource, tileId.getX(), tileId.getY(),
zoom.swigValue());
if (!rm.tileExistOnFileSystem(tileFilename, tileSource, tileId.getX(), tileId.getY(),
zoom.swigValue())) {
Bitmap loadedBitmap = null;
while (loadedBitmap == null) {
loadedBitmap = rm.getTileImageForMapSync(tileFilename, tileSource,
tileId.getX(), tileId.getY(), zoom.swigValue(), true);
final TileReadyCallback tileReadyCallback = new TileReadyCallback(tileSource,
tileId.getX(), tileId.getY(), zoom.swigValue());
rm.getMapTileDownloader().addDownloaderCallback(tileReadyCallback);
while (rm.getTileImageForMapAsync(tileFilename, tileSource, tileId.getX(), tileId.getY(),
zoom.swigValue(), true) == null) {
synchronized (tileReadyCallback.getSync()) {
if (tileReadyCallback.isReady()) {
break;
}
try {
tileReadyCallback.getSync().wait(250);
} catch (InterruptedException e) {
}
}
}
rm.getMapTileDownloader().removeDownloaderCallback(tileReadyCallback);
image = tileSource.getBytes(tileId.getX(), tileId.getY(), zoom.swigValue(),
app.getAppPath(IndexConstants.TILES_INDEX_DIR).getAbsolutePath());
@ -83,4 +94,54 @@ public class TileSourceProxyProvider extends interface_ImageMapLayerProvider {
public AlphaChannelPresence getAlphaChannelPresence() {
return AlphaChannelPresence.Unknown;
}
@Override
public IMapDataProvider.SourceType getSourceType() {
return IMapDataProvider.SourceType.NetworkDirect;
}
private static class TileReadyCallback implements MapTileDownloader.IMapDownloaderCallback {
private final ITileSource tileSource;
private final int x;
private final int y;
private final int zoom;
private boolean ready = false;
private final Object sync = new Object();
public TileReadyCallback(ITileSource tileSource, int x, int y, int zoom) {
this.tileSource = tileSource;
this.x = x;
this.y = y;
this.zoom = zoom;
}
public boolean isReady() {
return ready;
}
public Object getSync() {
return sync;
}
@Override
public void tileDownloaded(MapTileDownloader.DownloadRequest request) {
if (!(request instanceof AsyncLoadingThread.TileLoadDownloadRequest)) {
return;
}
AsyncLoadingThread.TileLoadDownloadRequest tileLoadRequest =
(AsyncLoadingThread.TileLoadDownloadRequest)request;
if (tileSource != tileLoadRequest.tileSource ||
x != tileLoadRequest.xTile ||
y != tileLoadRequest.yTile ||
zoom != tileLoadRequest.zoom) {
return;
}
synchronized (sync) {
ready = true;
sync.notifyAll();
}
}
}
}

View file

@ -48,6 +48,7 @@ public abstract class ActionBarPreferenceActivity extends PreferenceActivity {
}
tb.setClickable(true);
Drawable back = getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
back.mutate();
back.setColorFilter(0xffffffff, PorterDuff.Mode.MULTIPLY);
tb.setNavigationIcon(back);
tb.setBackgroundColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTabBackground)));

View file

@ -27,8 +27,10 @@ import net.osmand.plus.R;
import net.osmand.plus.dialogs.DirectionsDialogs;
import net.osmand.plus.helpers.GpxUiHelper;
import net.osmand.plus.helpers.ScreenOrientationHelper;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
import net.osmand.plus.osmedit.OsmEditingPlugin;
import net.osmand.util.Algorithms;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
@ -36,9 +38,12 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.PorterDuff;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.ActionBarActivity;
@ -55,12 +60,15 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ExpandableListView;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
@ -69,13 +77,14 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
public static final int SEARCH_ID = -1;
// public static final int ACTION_ID = 0;
// public static final int ACTION_ID = 0;
// protected static final int DELETE_ACTION_ID = 1;
private boolean selectionMode = false;
private List<GpxInfo> selectedItems = new ArrayList<GpxInfo>();
private List<GpxInfo> selectedItems = new ArrayList<>();
private ActionMode actionMode;
private LoadGpxTask asyncLoader;
private GpxIndexesAdapter listAdapter;
private GpxIndexesAdapter allGpxAdapter;
private ShowedOnMapAdapter showOnMapGpxAdapter;
MessageFormat formatMb = new MessageFormat("{0, number,##.#} MB", Locale.US);
private LoadLocalIndexDescriptionTask descriptionLoader;
private ContextMenuAdapter optionsMenuAdapter;
@ -94,8 +103,8 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
asyncLoader = new LoadGpxTask();
selectedGpxHelper = ((OsmandApplication) activity.getApplication()).getSelectedGpxHelper();
savingTrackHelper = ((OsmandApplication) activity.getApplication()).getSavingTrackHelper();
listAdapter = new GpxIndexesAdapter(getActivity());
setAdapter(listAdapter);
allGpxAdapter = new GpxIndexesAdapter(getActivity());
setAdapter(allGpxAdapter);
}
public List<GpxInfo> getSelectedItems() {
@ -109,6 +118,20 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
asyncLoader = new LoadGpxTask();
asyncLoader.execute(getActivity());
}
updateCurrentTrack(getView());
}
private void createShowedOnMapsView(View v) {
ListView onMap = (ListView) v.findViewById(R.id.gpx_on_map);
showOnMapGpxAdapter = new ShowedOnMapAdapter(getActivity(), R.layout.dash_gpx_track_item);
onMap.setAdapter(showOnMapGpxAdapter);
v.findViewById(R.id.turn_off_all).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showOnMapGpxAdapter.notifyDataSetChanged();
}
});
}
@Override
@ -119,6 +142,116 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
}
private void setShowedOnMapVisibility(boolean visibility) {
View v = getView();
if (v == null) {
return;
}
//temporary hiding this view
v.findViewById(R.id.show_on_map).setVisibility(View.GONE);
/* if (visibility) {
v.findViewById(R.id.on_map_layout).setVisibility(View.VISIBLE);
} else {
v.findViewById(R.id.on_map_layout).setVisibility(View.GONE);
}*/
}
private void updateCurrentTrack(View v) {
if (v == null) {
return;
}
if (app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get()) {
GpxSelectionHelper.SelectedGpxFile currentTrack = savingTrackHelper.getCurrentTrack();
v.findViewById(R.id.current_track).setVisibility(View.VISIBLE);
String description = GpxUiHelper.getDescription(getMyApplication(), currentTrack.getGpxFile(), null, true);
int startindex = description.indexOf(">");
int endindex = description.indexOf("</font>");
String distance = description.substring(startindex + 1, endindex);
String points = String.valueOf(currentTrack.getGpxFile().points.size());
((TextView) v.findViewById(R.id.points_count)).setText(points);
((TextView) v.findViewById(R.id.distance)).setText(distance);
} else {
v.findViewById(R.id.current_track).setVisibility(View.GONE);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.available_gpx, container, false);
listView = (ExpandableListView) v.findViewById(android.R.id.list);
if (this.adapter != null) {
listView.setAdapter(this.adapter);
}
setHasOptionsMenu(true);
((TextView) v.findViewById(R.id.name)).setText(R.string.currently_recording_track);
v.findViewById(R.id.time_icon).setVisibility(View.GONE);
createCurrentTrackView(v, getMyApplication());
v.findViewById(R.id.map_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MapActivity.launchMapActivityMoveToTop(getActivity());
}
});
createShowedOnMapsView(v);
return v;
}
public static void createCurrentTrackView(View v, final OsmandApplication app) {
Drawable icon = app.getResources().getDrawable(R.drawable.ic_action_rec_stop);
icon.mutate();
boolean light = app.getSettings().isLightContent();
if (light) {
icon.setColorFilter(0xff727272, PorterDuff.Mode.MULTIPLY);
}
ImageButton stop = ((ImageButton) v.findViewById(R.id.stop));
stop.setImageDrawable(icon);
stop.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Runnable run = new Runnable() {
@Override
public void run() {
final OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
plugin.stopRecording();
}
};
run.run();
}
});
stop.setVisibility(View.VISIBLE);
icon = app.getResources().getDrawable(R.drawable.ic_action_gsave_dark);
icon.mutate();
if (light) {
icon.setColorFilter(0xff727272, PorterDuff.Mode.MULTIPLY);
}
ImageButton save = ((ImageButton) v.findViewById(R.id.show_on_map));
save.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
save.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Runnable run = new Runnable() {
@Override
public void run() {
final OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
plugin.saveCurrentTrack();
}
};
run.run();
}
});
v.findViewById(R.id.divider).setVisibility(View.GONE);
save.setImageDrawable(icon);
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
@ -133,13 +266,13 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
public boolean onQueryTextSubmit(String query) {
listAdapter.getFilter().filter(query);
allGpxAdapter.getFilter().filter(query);
return true;
}
@Override
public boolean onQueryTextChange(String newText) {
listAdapter.getFilter().filter(newText);
allGpxAdapter.getFilter().filter(newText);
return true;
}
});
@ -152,7 +285,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
public boolean onMenuItemActionCollapse(MenuItem item) {
// Needed to hide intermediate progress bar after closing action mode
new Handler().postDelayed(new Runnable() {
new Handler().postDelayed(new Runnable() {
public void run() {
hideProgressBar();
}
@ -168,7 +301,6 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
optionsMenuAdapter = new ContextMenuAdapter(getActivity());
OnContextMenuClick listener = new OnContextMenuClick() {
@Override
@ -192,7 +324,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
};
optionsMenuAdapter.item(R.string.show_gpx_route)
.icons(R.drawable.ic_action_map_marker_dark, R.drawable.ic_action_map_marker_dark).listen(listener).reg();
.icons(R.drawable.ic_show_on_map, R.drawable.ic_show_on_map).listen(listener).reg();
optionsMenuAdapter.item(R.string.local_index_mi_delete)
.icons(R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_dark).listen(listener).reg();
optionsMenuAdapter.item(R.string.local_index_mi_reload)
@ -202,7 +334,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
final MenuItem item;
item = menu.add(0, optionsMenuAdapter.getElementId(j), j + 1, optionsMenuAdapter.getItemName(j));
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
if (ScreenOrientationHelper.isOrientationPortrait(getActivity())){
if (ScreenOrientationHelper.isOrientationPortrait(getActivity())) {
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem menuItem) {
@ -244,12 +376,12 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
public void showProgressBar() {
((FavoritesActivity)getActivity()).setSupportProgressBarIndeterminateVisibility(true);
((FavoritesActivity) getActivity()).setSupportProgressBarIndeterminateVisibility(true);
}
public void hideProgressBar() {
if (getActivity() != null){
((FavoritesActivity)getActivity()).setSupportProgressBarIndeterminateVisibility(false);
if (getActivity() != null) {
((FavoritesActivity) getActivity()).setSupportProgressBarIndeterminateVisibility(false);
}
}
@ -264,14 +396,14 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
private void enableSelectionMode(boolean selectionMode) {
this.selectionMode = selectionMode;
if (ScreenOrientationHelper.isOrientationPortrait(getActivity())) {
((FavoritesActivity)getActivity()).setToolbarVisibility(!selectionMode);
((FavoritesActivity) getActivity()).setToolbarVisibility(!selectionMode);
}
}
private void openShowOnMapMode() {
enableSelectionMode(true);
selectedItems.clear();
final Set<GpxInfo> originalSelectedItems = listAdapter.getSelectedGpx();
final Set<GpxInfo> originalSelectedItems = allGpxAdapter.getSelectedGpx();
selectedItems.addAll(originalSelectedItems);
actionMode = getActionBarActivity().startSupportActionMode(new ActionMode.Callback() {
@ -312,11 +444,11 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
enableSelectionMode(false);
getView().findViewById(R.id.memory_size).setVisibility(View.GONE);
runSelection(false);
listAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
}
});
listAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
}
@ -328,7 +460,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
value = value.substring(0, value.length() - 3);
}
final String actionButton = value;
if (listAdapter.getGroupCount() == 0) {
if (allGpxAdapter.getGroupCount() == 0) {
AccessibleToast.makeText(getActivity(), app.getString(R.string.local_index_no_items_to_do, actionButton.toLowerCase()), Toast.LENGTH_SHORT).show();
return;
}
@ -373,7 +505,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
public void onDestroyActionMode(ActionMode mode) {
enableSelectionMode(false);
getView().findViewById(R.id.memory_size).setVisibility(View.GONE);
listAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
}
});
@ -382,7 +514,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
((TextView) getView().findViewById(R.id.memory_size)).setText(R.string.local_index_upload_gpx_description);
((TextView) getView().findViewById(R.id.memory_size)).setVisibility(View.VISIBLE);
}
listAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
}
private void renameFile(GpxInfo info) {
@ -432,7 +564,9 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
loadGpxAsync(info, resId == R.string.local_index_select_gpx_file);
} else {
getMyApplication().getSelectedGpxHelper().selectGpxFile(info.gpx, resId == R.string.local_index_select_gpx_file, true);
listAdapter.notifyDataSetChanged();
showOnMapGpxAdapter.addGpxInfo(info);
allGpxAdapter.notifyDataSetChanged();
selectedGpxHelper.runUiListeners();
}
} else if (resId == R.string.local_index_mi_delete) {
@ -492,6 +626,10 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
e = false;
getMyApplication().getSelectedGpxHelper().setGpxFileToDisplay(info.gpx);
MapActivity.launchMapActivityMoveToTop(getActivity());
if (showOnMapGpxAdapter.getCount() == 0) {
setShowedOnMapVisibility(true);
}
showOnMapGpxAdapter.addGpxInfo(info);
}
}
if (e) {
@ -499,26 +637,6 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
}
private void showContextMenu(final GpxInfo info) {
Builder builder = new AlertDialog.Builder(getActivity());
final ContextMenuAdapter adapter = new ContextMenuAdapter(getActivity());
basicFileOperation(info, adapter);
String[] values = adapter.getItemNames();
builder.setItems(values, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
OnContextMenuClick clk = adapter.getClickAdapter(which);
if (clk != null) {
clk.onContextMenuClick(null, adapter.getElementId(which), which, false);
}
}
});
builder.show();
}
public class LoadGpxTask extends AsyncTask<Activity, GpxInfo, List<GpxInfo>> {
private List<GpxInfo> result;
@ -540,26 +658,38 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
protected void onPreExecute() {
((ActionBarActivity)getActivity()).setSupportProgressBarIndeterminateVisibility(true);
listAdapter.clear();
((ActionBarActivity) getActivity()).setSupportProgressBarIndeterminateVisibility(true);
allGpxAdapter.clear();
if (showOnMapGpxAdapter != null) {
showOnMapGpxAdapter.clear();
}
}
@Override
protected void onProgressUpdate(GpxInfo... values) {
for (GpxInfo v : values) {
listAdapter.addLocalIndexInfo(v);
allGpxAdapter.addLocalIndexInfo(v);
if (selectedGpxHelper.getSelectedFileByName(v.getFileName()) != null) {
showOnMapGpxAdapter.addGpxInfo(v);
}
}
listAdapter.notifyDataSetChanged();
showOnMapGpxAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
}
public void setResult(List<GpxInfo> result) {
this.result = result;
listAdapter.clear();
allGpxAdapter.clear();
showOnMapGpxAdapter.clear();
if (result != null) {
for (GpxInfo v : result) {
listAdapter.addLocalIndexInfo(v);
allGpxAdapter.addLocalIndexInfo(v);
if (selectedGpxHelper.getSelectedFileByName(v.getFileName()) != null) {
showOnMapGpxAdapter.addGpxInfo(v);
}
}
listAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
showOnMapGpxAdapter.notifyDataSetChanged();
onPostExecute(result);
}
}
@ -567,12 +697,18 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
protected void onPostExecute(List<GpxInfo> result) {
this.result = result;
if(getActivity() != null) {
((ActionBarActivity)getActivity()).setSupportProgressBarIndeterminateVisibility(false);
if (getActivity() != null) {
((ActionBarActivity) getActivity()).setSupportProgressBarIndeterminateVisibility(false);
}
if (listAdapter.getGroupCount() > 0){
if (allGpxAdapter.getGroupCount() > 0) {
getExpandableListView().expandGroup(0);
}
if (showOnMapGpxAdapter.getCount() > 0) {
setShowedOnMapVisibility(true);
} else {
setShowedOnMapVisibility(false);
}
}
private File[] listFilesSorted(File dir) {
@ -586,7 +722,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
private void loadGPXData(File mapPath, List<GpxInfo> result, LoadGpxTask loadTask) {
if (mapPath.canRead()) {
List<GpxInfo> progress = new ArrayList<GpxInfo>();
List<GpxInfo> progress = new ArrayList<>();
loadGPXFolder(mapPath, result, loadTask, progress, "");
if (!progress.isEmpty()) {
loadTask.loadFile(progress.toArray(new GpxInfo[progress.size()]));
@ -624,8 +760,8 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
protected class GpxIndexesAdapter extends OsmandBaseExpandableListAdapter implements Filterable {
Map<String, List<GpxInfo>> data = new LinkedHashMap<String, List<GpxInfo>>();
List<String> category = new ArrayList<String>();
Map<String, List<GpxInfo>> data = new LinkedHashMap<>();
List<String> category = new ArrayList<>();
int warningColor;
int okColor;
int defaultColor;
@ -642,11 +778,11 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
public Set<GpxInfo> getSelectedGpx() {
Set<GpxInfo> originalSelectedItems = new HashSet<GpxInfo>();
Set<GpxInfo> originalSelectedItems = new HashSet<>();
for (List<GpxInfo> l : data.values()) {
if (l != null) {
for (GpxInfo g : l) {
boolean add = false;
boolean add;
if (g.gpx != null && g.gpx.showCurrentTrack) {
add = selectedGpxHelper.getSelectedCurrentRecordingTrack() != null;
} else {
@ -882,8 +1018,13 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
boolean light = getMyApplication().getSettings().isLightContent();
final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
DirectionsDialogs.setupPopUpMenuIcon(optionsMenu);
Drawable showIcon = getResources().getDrawable(R.drawable.ic_show_on_map);
if (light) {
showIcon.mutate();
showIcon.setColorFilter(getResources().getColor(R.color.icon_color_light), PorterDuff.Mode.MULTIPLY);
}
MenuItem item = optionsMenu.getMenu().add(R.string.show_gpx_route)
.setIcon(light ? R.drawable.ic_action_map_marker_light : R.drawable.ic_action_map_marker_dark);
.setIcon(showIcon);
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@ -903,7 +1044,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
});
final OsmEditingPlugin osmEditingPlugin = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class);
if (osmEditingPlugin != null && osmEditingPlugin.isActive()){
if (osmEditingPlugin != null && osmEditingPlugin.isActive()) {
item = optionsMenu.getMenu().add(R.string.export)
.setIcon(light ? R.drawable.ic_action_gup_light : R.drawable.ic_action_gup_dark);
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@ -956,13 +1097,13 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
protected void onProgressUpdate(GpxInfo... values) {
listAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
}
@Override
protected void onPostExecute(GpxInfo[] result) {
hideProgressBar();
listAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
}
@ -976,7 +1117,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
int total = 0;
for (GpxInfo info : params) {
if (!isCancelled() && (info.gpx == null || !info.gpx.showCurrentTrack)) {
boolean successfull = false;
boolean successfull;
successfull = Algorithms.removeAllFiles(info.file);
total++;
if (successfull) {
@ -992,9 +1133,9 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
protected void onProgressUpdate(GpxInfo... values) {
for (GpxInfo g : values) {
listAdapter.delete(g);
allGpxAdapter.delete(g);
}
listAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
}
@Override
@ -1040,12 +1181,12 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
toShow = g.gpx.findPointToShow();
}
}
listAdapter.notifyDataSetInvalidated();
allGpxAdapter.notifyDataSetInvalidated();
}
@Override
protected void onPreExecute() {
((ActionBarActivity)getActivity()).setProgressBarIndeterminateVisibility(true);
getActivity().setProgressBarIndeterminateVisibility(true);
}
@Override
@ -1060,14 +1201,14 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
}
private void loadGpxAsync(GpxInfo info, boolean isSelected){
private void loadGpxAsync(GpxInfo info, boolean isSelected) {
final boolean selected = isSelected;
new AsyncTask<GpxInfo, Void, Void>() {
GpxInfo info;
@Override
protected Void doInBackground(GpxInfo... params) {
if (params == null){
if (params == null) {
return null;
}
info = params[0];
@ -1087,12 +1228,12 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
protected void onPostExecute(Void result) {
if (getActivity() != null){
if (getActivity() != null) {
getActivity().setProgressBarIndeterminateVisibility(false);
}
if (info.gpx != null){
if (info.gpx != null) {
getMyApplication().getSelectedGpxHelper().selectGpxFile(info.gpx, selected, true);
listAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
selectedGpxHelper.runUiListeners();
}
}
@ -1112,7 +1253,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
results.count = 1;
} else {
String cs = constraint.toString().toLowerCase();
List<GpxInfo> res = new ArrayList<GpxInfo>();
List<GpxInfo> res = new ArrayList<>();
for (GpxInfo r : raw) {
if (r.getName().toLowerCase().indexOf(cs) != -1) {
res.add(r);
@ -1128,13 +1269,18 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
if (results.values != null) {
synchronized (listAdapter) {
listAdapter.clear();
synchronized (allGpxAdapter) {
allGpxAdapter.clear();
showOnMapGpxAdapter.clear();
for (GpxInfo i : ((List<GpxInfo>) results.values)) {
listAdapter.addLocalIndexInfo(i);
allGpxAdapter.addLocalIndexInfo(i);
if (selectedGpxHelper.getSelectedFileByName(i.getFileName()) != null) {
showOnMapGpxAdapter.addGpxInfo(i);
}
}
}
listAdapter.notifyDataSetChanged();
showOnMapGpxAdapter.notifyDataSetChanged();
allGpxAdapter.notifyDataSetChanged();
if (constraint != null && constraint.length() > 3) {
collapseTrees(10);
}
@ -1156,7 +1302,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
GpxInfo item = listAdapter.getChild(groupPosition, childPosition);
GpxInfo item = allGpxAdapter.getChild(groupPosition, childPosition);
if (!selectionMode) {
item.setExpanded(!item.isExpanded());
if (item.isExpanded()) {
@ -1171,7 +1317,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
updateSelectionMode(actionMode);
}
listAdapter.notifyDataSetInvalidated();
allGpxAdapter.notifyDataSetInvalidated();
return true;
}
@ -1279,4 +1425,90 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
return fileName = file.getName();
}
}
private void adjustShowOnMapListViewSize() {
View v = getView();
if (v == null) {
return;
}
float size = getResources().getDimension(R.dimen.dashListItemHeight) * 3.5f;
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, (int) size);
getView().findViewById(R.id.gpx_on_map).setLayoutParams(params);
}
class ShowedOnMapAdapter extends ArrayAdapter<GpxInfo> {
public void addGpxInfo(GpxInfo info) {
boolean contains = false;
for (int i = 0; i < getCount(); i++) {
if (getItem(i).equals(info)) {
contains = true;
break;
}
}
if (contains) {
return;
}
add(info);
notifyDataSetChanged();
//if there's too many items, we need to set size of listview
if (getCount() == 4) {
adjustShowOnMapListViewSize();
}
}
public ShowedOnMapAdapter(Context context, int resource) {
super(context, resource);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
LayoutInflater inflater = getActivity().getLayoutInflater();
v = inflater.inflate(R.layout.dash_gpx_track_item, parent, false);
}
final GpxInfo gpxInfo = getItem(position);
TextView viewName = ((TextView) v.findViewById(R.id.name));
viewName.setText(gpxInfo.getName());
v.findViewById(R.id.show_on_map).setVisibility(View.GONE);
v.findViewById(R.id.stop).setVisibility(View.GONE);
v.findViewById(R.id.divider).setVisibility(View.GONE);
if (gpxInfo.gpx != null) {
String description = GpxUiHelper.getDescription(getMyApplication(), gpxInfo.gpx, gpxInfo.file, true);
int startindex = description.indexOf(">");
int endindex = description.indexOf("</font>");
String distnace = description.substring(startindex + 1, endindex);
((TextView) v.findViewById(R.id.distance)).
setText(distnace);
}
final CompoundButton check = (CompoundButton) v.findViewById(R.id.check_item);
check.setVisibility(View.VISIBLE);
if (selectedGpxHelper.getSelectedFileByName(gpxInfo.getFileName()) != null) {
check.setChecked(true);
} else {
check.setChecked(false);
}
check.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (gpxInfo.gpx == null) {
loadGpxAsync(gpxInfo, check.isChecked());
} else {
selectedGpxHelper.selectGpxFile(gpxInfo.gpx, check.isChecked(), true);
}
allGpxAdapter.notifyDataSetChanged();
}
});
return v;
}
}
}

View file

@ -38,10 +38,12 @@ public class FavoritesActivity extends TabActivity {
// private static final String FAVOURITES_INFO = "FAVOURITES_INFO";
private static final String TRACKS = "TRACKS";
// private static final String SELECTED_TRACK = "SELECTED_TRACK";
// public static int FAVORITES_TAB = 0;
// public static int GPX_TAB = 1;
// public static int SELECTED_GPX_TAB = 2;
// public static String TAB_PARAM = "TAB_PARAM";
public static int FAVORITES_TAB = 0;
public static int GPX_TAB = 1;
public static int SELECTED_GPX_TAB = 2;
public static int NOTES_TAB = 3;
public static int OSM_EDITS_TAB = 4;
public static String TAB_PARAM = "TAB_PARAM";
protected List<WeakReference<Fragment>> fragList = new ArrayList<WeakReference<Fragment>>();
@Override
@ -78,10 +80,18 @@ public class FavoritesActivity extends TabActivity {
OsmandPlugin.addMyPlacesTabPlugins(this, mTabs, getIntent());
Integer tab = settings.FAVORITES_TAB.get();
if (tab == NOTES_TAB) {
tab = mTabs.size() -1;
} else if (tab == OSM_EDITS_TAB) {
//TODO implement method of counting position for other plugins
}
setViewPagerAdapter(mViewPager, mTabs);
mSlidingTabLayout.setViewPager(mViewPager);
if (tab > mTabs.size() - 1){
tab = 0;
}
mViewPager.setCurrentItem(tab);
updateSelectedTracks();
// setupHomeButton();

View file

@ -21,7 +21,6 @@ import net.osmand.plus.activities.search.SearchActivity;
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
import net.osmand.plus.base.FavoriteImageDrawable;
import net.osmand.plus.dialogs.DirectionsDialogs;
import net.osmand.util.Algorithms;
import net.osmand.util.MapUtils;
import android.app.Activity;
import android.content.Intent;
@ -156,7 +155,7 @@ public class FavoritesListFragment extends ListFragment implements SearchActivit
}
public FavouritesAdapter(Activity activity, List<FavouritePoint> list) {
super(activity, R.layout.favourites_list_item, list);
super(activity, R.layout.favorites_list_item, list);
this.activity = activity;
this.app = ((OsmandApplication) activity.getApplication());
boolean light = app.getSettings().isLightContent();
@ -178,7 +177,7 @@ public class FavoritesListFragment extends ListFragment implements SearchActivit
View row = convertView;
if (row == null) {
LayoutInflater inflater = activity.getLayoutInflater();
row = inflater.inflate(R.layout.favourites_list_item, parent, false);
row = inflater.inflate(R.layout.favorites_list_item, parent, false);
}
TextView name = (TextView) row.findViewById(R.id.favourite_label);

View file

@ -204,7 +204,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
private boolean editPoint(final FavouritePoint point) {
Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(R.string.favourites_context_menu_edit);
final View v = getActivity().getLayoutInflater().inflate(R.layout.favourite_edit_dialog,
final View v = getActivity().getLayoutInflater().inflate(R.layout.favorite_edit_dialog,
getExpandableListView(), false);
final AutoCompleteTextView cat = (AutoCompleteTextView) v.findViewById(R.id.Category);
final EditText editText = (EditText) v.findViewById(R.id.Name);
@ -762,7 +762,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
View row = convertView;
if (row == null) {
LayoutInflater inflater = getActivity().getLayoutInflater();
row = inflater.inflate(R.layout.favourites_list_item, parent, false);
row = inflater.inflate(R.layout.favorites_list_item, parent, false);
}
TextView name = (TextView) row.findViewById(R.id.favourite_label);

View file

@ -21,8 +21,8 @@ public abstract class OsmandExpandableListFragment extends Fragment
implements OnChildClickListener {
private ExpandableListView listView;
private ExpandableListAdapter adapter;
protected ExpandableListView listView;
protected ExpandableListAdapter adapter;
public OsmandApplication getMyApplication() {

View file

@ -1,6 +1,5 @@
package net.osmand.plus.activities.search;
import java.text.MessageFormat;
import java.util.List;
import net.osmand.data.LatLon;
@ -14,21 +13,24 @@ import net.osmand.plus.dialogs.DirectionsDialogs;
import net.osmand.plus.helpers.SearchHistoryHelper;
import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
import net.osmand.util.MapUtils;
import android.content.Intent;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.ListFragment;
import android.support.v7.widget.PopupMenu;
import android.text.Spannable;
import android.text.style.ForegroundColorSpan;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.TextView.BufferType;
@ -95,7 +97,9 @@ public class SearchHistoryFragment extends ListFragment implements SearchActivit
location = ((OsmandApplication) activity.getApplication()).getSettings().getLastKnownMapLocation();
}
historyAdapter.clear();
historyAdapter.addAll(helper.getHistoryEntries());
for(HistoryEntry entry : helper.getHistoryEntries()){
historyAdapter.add(entry);
}
locationUpdate(location);
clearButton.setVisibility(historyAdapter.isEmpty() ? View.GONE : View.VISIBLE);
@ -118,15 +122,28 @@ public class SearchHistoryFragment extends ListFragment implements SearchActivit
private void selectModel(final HistoryEntry model, View v) {
PointDescription name = model.getName();
boolean light = ((OsmandApplication) getActivity().getApplication()).getSettings().isLightContent();
final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
OsmandSettings settings = ((OsmandApplication) getActivity().getApplication()).getSettings();
DirectionsDialogs.createDirectionsActionsPopUpMenu(optionsMenu, new LatLon(model.getLat(), model.getLon()),
model, name, settings.getLastKnownMapZoom(), getActivity(), true);
MenuItem item = optionsMenu.getMenu().add(
R.string.edit_filter_delete_menu_item).setIcon(light ?
R.drawable.ic_action_delete_light : R.drawable.ic_action_delete_dark);
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
helper.remove(model);
historyAdapter.remove(model);
return true;
}
});
optionsMenu.show();
}
class HistoryAdapter extends ArrayAdapter<HistoryEntry> {
private LatLon location;
Drawable arrowImage;
public void updateLocation(LatLon l) {
location = l;
@ -135,6 +152,14 @@ public class SearchHistoryFragment extends ListFragment implements SearchActivit
public HistoryAdapter(List<HistoryEntry> list) {
super(getActivity(), R.layout.search_history_list_item, list);
arrowImage = getResources().getDrawable(R.drawable.ic_destination_arrow_white);
arrowImage.mutate();
boolean light = getMyApplication().getSettings().isLightContent();
if (light) {
arrowImage.setColorFilter(getResources().getColor(R.color.color_distance), PorterDuff.Mode.MULTIPLY);
} else {
arrowImage.setColorFilter(getResources().getColor(R.color.color_distance), PorterDuff.Mode.MULTIPLY);
}
}
@Override
@ -144,33 +169,28 @@ public class SearchHistoryFragment extends ListFragment implements SearchActivit
LayoutInflater inflater = getActivity().getLayoutInflater();
row = inflater.inflate(R.layout.search_history_list_item, parent, false);
}
TextView label = (TextView) row.findViewById(R.id.label);
TextView nameText = (TextView) row.findViewById(R.id.name);
TextView distanceText = (TextView) row.findViewById(R.id.distance);
String distance = "";
ImageButton icon = (ImageButton) row.findViewById(R.id.remove);
ImageView arrow = (ImageView) row.findViewById(R.id.direction);
arrow.setImageDrawable(arrowImage);
ImageButton options = (ImageButton) row.findViewById(R.id.options);
final HistoryEntry model = getItem(position);
if (location != null) {
int dist = (int) (MapUtils.getDistance(location, model.getLat(), model.getLon()));
distance = OsmAndFormatter.getFormattedDistance(dist, (OsmandApplication) getActivity().getApplication()) + " ";
}
String rnk = MessageFormat.format(" {0,number,#.##E00} ", ((float)model.getRank(System.currentTimeMillis())));
label.setText(distance + rnk + model.getName().getName(), BufferType.SPANNABLE);
((Spannable) label.getText()).setSpan(new ForegroundColorSpan(getResources().getColor(R.color.color_distance)), 0, distance.length(), 0);
icon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
helper.remove(model);
historyAdapter.remove(model);
}
distanceText.setText(distance);
nameText.setText(model.getName().getName(), BufferType.SPANNABLE);
});
View.OnClickListener clickListener = new View.OnClickListener() {
options.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
selectModel(model, v);
}
};
label.setOnClickListener(clickListener);
});
return row;
}
}
@ -181,4 +201,8 @@ public class SearchHistoryFragment extends ListFragment implements SearchActivit
((SearchActivity) getActivity()).getClearToolbar(false);
}
}
public OsmandApplication getMyApplication() {
return (OsmandApplication) getActivity().getApplication();
}
}

View file

@ -170,10 +170,10 @@ public class AudioNotesLayer extends OsmandMapLayer implements IContextMenuProvi
@Override
public PointDescription getObjectName(Object o) {
if(o instanceof Recording){
if(((Recording)o).getName() == null) {
if(((Recording)o).getName(activity).isEmpty()) {
return new PointDescription(PointDescription.POINT_TYPE_NOTE, view.getResources().getString(R.string.recording_default_name));
}
return new PointDescription(PointDescription.POINT_TYPE_NOTE, ((Recording)o).getName());
return new PointDescription(PointDescription.POINT_TYPE_NOTE, ((Recording)o).getName(activity));
}
return null;
}

View file

@ -21,6 +21,7 @@ import net.osmand.PlatformUtil;
import net.osmand.access.AccessibleAlertBuilder;
import net.osmand.access.AccessibleToast;
import net.osmand.data.DataTileManager;
import net.osmand.data.Street;
import net.osmand.plus.ApplicationMode;
import net.osmand.plus.ContextMenuAdapter;
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
@ -67,6 +68,7 @@ import android.media.MediaRecorder;
import android.media.SoundPool;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.MediaStore;
import android.view.Display;
import android.view.KeyEvent;
@ -138,9 +140,8 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
this.file = f;
}
public File file;
private File file;
private String name;
private double lat;
private double lon;
private long duration = -1;
@ -172,12 +173,42 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
}
}
public void setName(String name) {
this.name = name;
public File getFile() {
return file;
}
public String getName() {
return name;
public boolean setName(String name) {
int index = file.getAbsolutePath().lastIndexOf("/") + 1;
if (index < 0) {
return false;
}
File directory = new File(file.getAbsolutePath().substring(0, index));
File to = new File(directory, name.trim());
if (file.renameTo(to)) {
file = to;
return true;
}
return false;
}
public String getFileName() {
return file.getName();
}
public String getName(Context ctx) {
String fileName = file.getName();
int hashInd = fileName.lastIndexOf("_");
if (hashInd != -1) {
return fileName.substring(0, hashInd - 1);
} else if (this.isAudio()) {
return ctx.getResources().getString(R.string.audio);
} else if (this.isVideo()) {
return ctx.getResources().getString(R.string.video);
} else if (this.isPhoto()) {
return ctx.getResources().getString(R.string.photo);
}
return "";
}
public boolean isPhoto() {
@ -210,9 +241,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
try {
Class exClass = Class.forName("android.media.ExifInterface");
Constructor c = exClass.getConstructor(new Class[] { String.class });
Constructor c = exClass.getConstructor(new Class[]{String.class});
Object exInstance = c.newInstance(file.getAbsolutePath());
Method setAttribute = exClass.getMethod("setAttribute", new Class[] { String.class, String.class });
Method setAttribute = exClass.getMethod("setAttribute", new Class[]{String.class, String.class});
setAttribute.invoke(exInstance, "GPSLatitude", convertDegToExifRational(lat));
setAttribute.invoke(exInstance, "GPSLatitudeRef", lat > 0 ? "N" : "S");
setAttribute.invoke(exInstance, "GPSLongitude", convertDegToExifRational(lon));
@ -236,7 +267,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
setAttribute.invoke(exInstance, "GPSAltitude", altString);
setAttribute.invoke(exInstance, "GPSAltitudeRef", alt < 0 ? "1" : "0");
}
Method saveAttributes = exClass.getMethod("saveAttributes", new Class[] {});
Method saveAttributes = exClass.getMethod("saveAttributes", new Class[]{});
saveAttributes.invoke(exInstance);
} catch (Exception e) {
e.printStackTrace();
@ -250,9 +281,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
try {
Class exClass = Class.forName("android.media.ExifInterface");
Constructor c = exClass.getConstructor(new Class[] { String.class });
Constructor c = exClass.getConstructor(new Class[]{String.class});
Object exInstance = c.newInstance(file.getAbsolutePath());
Method getAttributeInt = exClass.getMethod("getAttributeInt", new Class[] { String.class, Integer.TYPE });
Method getAttributeInt = exClass.getMethod("getAttributeInt", new Class[]{String.class, Integer.TYPE});
Integer it = (Integer) getAttributeInt.invoke(exInstance, "Orientation", 1);
orientation = it;
} catch (Exception e) {
@ -265,15 +296,15 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
public int getBitmapRotation() {
int rotation = 0;
switch (getExifOrientation()) {
case 3:
rotation = 180;
break;
case 6:
rotation = 90;
break;
case 8:
rotation = 270;
break;
case 3:
rotation = 180;
break;
case 6:
rotation = 90;
break;
case 8:
rotation = 270;
break;
}
return rotation;
}
@ -289,13 +320,12 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
}
public String getSmallDescription(Context ctx) {
String nm = name == null ? "" : name;
String time = AndroidUtils.formatDateTime(ctx,file.lastModified());
String time = AndroidUtils.formatDateTime(ctx, file.lastModified());
if (isPhoto()) {
return ctx.getString(R.string.recording_photo_description, nm, time).trim();
return ctx.getString(R.string.recording_photo_description, "", time).trim();
}
return ctx.getString(R.string.recording_description, nm, "", time).trim();
return ctx.getString(R.string.recording_description, "", "", time).trim();
}
private String getDuration(Context ctx) {
@ -320,11 +350,11 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
// API 8
if (mRegisterMediaButtonEventReceiver == null) {
mRegisterMediaButtonEventReceiver = AudioManager.class.getMethod("registerMediaButtonEventReceiver",
new Class[] { ComponentName.class });
new Class[]{ComponentName.class});
}
if (mUnregisterMediaButtonEventReceiver == null) {
mUnregisterMediaButtonEventReceiver = AudioManager.class.getMethod("unregisterMediaButtonEventReceiver",
new Class[] { ComponentName.class });
new Class[]{ComponentName.class});
}
/* success, this device will take advantage of better remote */
/* control event handling */
@ -342,7 +372,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
public AudioVideoNotesPlugin(OsmandApplication app) {
this.app = app;
OsmandSettings settings = app.getSettings();
ApplicationMode.regWidget("audionotes", (ApplicationMode[])null);
ApplicationMode.regWidget("audionotes", (ApplicationMode[]) null);
AV_EXTERNAL_RECORDER = settings.registerBooleanPreference("av_external_recorder", false).makeGlobal();
AV_EXTERNAL_PHOTO_CAM = settings.registerBooleanPreference("av_external_cam", true).makeGlobal();
AV_VIDEO_FORMAT = settings.registerIntPreference("av_video_format", VIDEO_OUTPUT_MP4).makeGlobal();
@ -431,7 +461,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
@Override
public void registerMapContextMenuActions(final MapActivity mapActivity, final double latitude, final double longitude,
ContextMenuAdapter adapter, Object selectedObj) {
ContextMenuAdapter adapter, Object selectedObj) {
adapter.item(R.string.recording_context_menu_arecord).icons(R.drawable.ic_action_micro_dark, R.drawable.ic_action_micro_light)
.listen(new OnContextMenuClick() {
@ -530,9 +560,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
private void chooseDefaultAction(final double lat, final double lon, final MapActivity mapActivity) {
AccessibleAlertBuilder ab = new AccessibleAlertBuilder(mapActivity);
ab.setItems(
new String[] { mapActivity.getString(R.string.recording_context_menu_arecord),
new String[]{mapActivity.getString(R.string.recording_context_menu_arecord),
mapActivity.getString(R.string.recording_context_menu_vrecord),
mapActivity.getString(R.string.recording_context_menu_precord), }, new OnClickListener() {
mapActivity.getString(R.string.recording_context_menu_precord),}, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
int action = which == 0 ? AV_DEFAULT_ACTION_AUDIO : (which == 1 ? AV_DEFAULT_ACTION_VIDEO
@ -593,14 +623,15 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
public void mapActivityPause(MapActivity activity) {
stopRecording(activity);
}
@Override
public void mapActivityResume(MapActivity activity) {
this.activity = activity;;
((AudioManager)activity.getSystemService(Context.AUDIO_SERVICE)).registerMediaButtonEventReceiver(
new ComponentName(activity,MediaRemoteControlReceiver.class));
this.activity = activity;
;
((AudioManager) activity.getSystemService(Context.AUDIO_SERVICE)).registerMediaButtonEventReceiver(
new ComponentName(activity, MediaRemoteControlReceiver.class));
}
public MapActivity getActivity() {
return activity;
}
@ -649,7 +680,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
runMediaRecorder(mapActivity, mr, f);
} catch (Exception e) {
logErr(e);
}
}
}
@Override
@ -681,7 +712,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
private void logErr(Exception e) {
log.error("Error starting recorder ", e);
AccessibleToast.makeText(app, app.getString(R.string.recording_error) + " : " + e.getMessage(), Toast.LENGTH_LONG).show();
}
}
protected Camera openCamera() {
try {
@ -752,18 +783,18 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
int rotation = mapActivity.getWindowManager().getDefaultDisplay().getRotation();
int degrees = 0;
switch (rotation) {
case /* Surface.ROTATION_0 */0:
degrees = 0;
break;
case /* Surface.ROTATION_90 */1:
degrees = 90;
break;
case /* Surface.ROTATION_180 */2:
degrees = 180;
break;
case /* Surface.ROTATION_270 */3:
degrees = 270;
break;
case /* Surface.ROTATION_0 */ 0:
degrees = 0;
break;
case /* Surface.ROTATION_90 */ 1:
degrees = 90;
break;
case /* Surface.ROTATION_180 */ 2:
degrees = 180;
break;
case /* Surface.ROTATION_270 */ 3:
degrees = 270;
break;
}
// if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {
@ -796,51 +827,50 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
// camera picture size:
List<Camera.Size> psps = parameters.getSupportedPictureSizes();
int index = AV_CAMERA_PICTURE_SIZE.get();
log.debug("takePhotoWithCamera() index=" + index );
if(index == AV_PHOTO_SIZE_DEFAULT)
{
log.debug("takePhotoWithCamera() index=" + index);
if (index == AV_PHOTO_SIZE_DEFAULT) {
index = cameraPictureSizeDefault;
log.debug("takePhotoWithCamera() Default value of picture size. Set index to cameraPictureSizeDefault. Now index="
+ index );
+ index);
}
Camera.Size selectedCamPicSize = psps.get(index);
parameters.setPictureSize(selectedCamPicSize.width, selectedCamPicSize.height);
log.debug("takePhotoWithCamera() set Picture size: width=" + selectedCamPicSize.width
+ " height=" + selectedCamPicSize.height );
+ " height=" + selectedCamPicSize.height);
// camera focus type:
boolean autofocus = true;
// boolean autofocus = !Boolean.parseBoolean(parameters.get("auto-exposure-lock-supported"));
parameters.setGpsLatitude(lat);
parameters.setGpsLongitude(lon);
switch (AV_CAMERA_FOCUS_TYPE.get()) {
case AV_CAMERA_FOCUS_HIPERFOCAL:
parameters.setFocusMode(Parameters.FOCUS_MODE_FIXED);
autofocus = false;
log.info("Osmand:AudioNotes set camera FOCUS_MODE_FIXED");
break;
case AV_CAMERA_FOCUS_EDOF:
parameters.setFocusMode(Parameters.FOCUS_MODE_EDOF);
autofocus = false;
log.info("Osmand:AudioNotes set camera FOCUS_MODE_EDOF");
break;
case AV_CAMERA_FOCUS_INFINITY:
parameters.setFocusMode(Parameters.FOCUS_MODE_INFINITY);
autofocus = false;
log.info("Osmand:AudioNotes set camera FOCUS_MODE_INFINITY");
break;
case AV_CAMERA_FOCUS_MACRO:
parameters.setFocusMode(Parameters.FOCUS_MODE_MACRO);
log.info("Osmand:AudioNotes set camera FOCUS_MODE_MACRO");
break;
case AV_CAMERA_FOCUS_CONTINUOUS:
parameters.setFocusMode(Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);
log.info("Osmand:AudioNotes set camera FOCUS_MODE_CONTINUOUS_PICTURE");
break;
default:
parameters.setFocusMode(Parameters.FOCUS_MODE_AUTO);
log.info("Osmand:AudioNotes set camera FOCUS_MODE_AUTO");
break;
case AV_CAMERA_FOCUS_HIPERFOCAL:
parameters.setFocusMode(Parameters.FOCUS_MODE_FIXED);
autofocus = false;
log.info("Osmand:AudioNotes set camera FOCUS_MODE_FIXED");
break;
case AV_CAMERA_FOCUS_EDOF:
parameters.setFocusMode(Parameters.FOCUS_MODE_EDOF);
autofocus = false;
log.info("Osmand:AudioNotes set camera FOCUS_MODE_EDOF");
break;
case AV_CAMERA_FOCUS_INFINITY:
parameters.setFocusMode(Parameters.FOCUS_MODE_INFINITY);
autofocus = false;
log.info("Osmand:AudioNotes set camera FOCUS_MODE_INFINITY");
break;
case AV_CAMERA_FOCUS_MACRO:
parameters.setFocusMode(Parameters.FOCUS_MODE_MACRO);
log.info("Osmand:AudioNotes set camera FOCUS_MODE_MACRO");
break;
case AV_CAMERA_FOCUS_CONTINUOUS:
parameters.setFocusMode(Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);
log.info("Osmand:AudioNotes set camera FOCUS_MODE_CONTINUOUS_PICTURE");
break;
default:
parameters.setFocusMode(Parameters.FOCUS_MODE_AUTO);
log.info("Osmand:AudioNotes set camera FOCUS_MODE_AUTO");
break;
}
// parameters.setFocusMode(Parameters.FOCUS_MODE_FIXED);
// parameters.set("auto-exposure-lock", "true");
@ -928,13 +958,13 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
}
});
}
@Override
public void addMyPlacesTab(FavoritesActivity favoritesActivity, List<TabItem> mTabs, Intent intent) {
if (getAllRecordings().size() > 0) {
mTabs.add(favoritesActivity.getTabIndicator(R.string.notes, NotesFragment.class));
if (intent != null && "AUDIO".equals(intent.getStringExtra("TAB"))) {
app.getSettings().FAVORITES_TAB.set(mTabs.size() - 1);
app.getSettings().FAVORITES_TAB.set(FavoritesActivity.NOTES_TAB);
}
}
}
@ -946,9 +976,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
}
Recording r = new Recording(f);
String encodeName = f.getName();
int i = encodeName.indexOf('-');
int i = encodeName.lastIndexOf('_');
if (i > 0) {
encodeName = encodeName.substring(0, i);
encodeName = encodeName.substring(i + 1);
}
i = encodeName.indexOf('.');
if (i > 0) {
@ -971,7 +1001,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
}
recordings.registerObject(r.lat, r.lon, r);
recordingByFileName.put(f.getName(), r);
return true;
return true;
}
@Override
@ -997,33 +1027,33 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
File[] files = avPath.listFiles();
if (files != null) {
for (File f : files) {
indexFile(registerNew, f);
}
indexFile(registerNew, f);
}
}
}
return null;
}
private void indexFile(boolean registerInGPX, File f) {
if (f.getName().endsWith(THREEGP_EXTENSION) || f.getName().endsWith(MPEG4_EXTENSION)
|| f.getName().endsWith(IMG_EXTENSION)) {
boolean newFileIndexed = indexSingleFile(f);
if (newFileIndexed && registerInGPX) {
Recording rec = recordingByFileName.get(f.getName());
if (rec != null &&
(app.getSettings().SAVE_TRACK_TO_GPX.get()
|| app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get())
&& OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class) != null) {
String name = f.getName();
SavingTrackHelper savingTrackHelper = app.getSavingTrackHelper();
savingTrackHelper.insertPointData(rec.lat, rec.lon, System.currentTimeMillis(), name);
}
}
private void indexFile(boolean registerInGPX, File f) {
if (f.getName().endsWith(THREEGP_EXTENSION) || f.getName().endsWith(MPEG4_EXTENSION)
|| f.getName().endsWith(IMG_EXTENSION)) {
boolean newFileIndexed = indexSingleFile(f);
if (newFileIndexed && registerInGPX) {
Recording rec = recordingByFileName.get(f.getName());
if (rec != null &&
(app.getSettings().SAVE_TRACK_TO_GPX.get()
|| app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get())
&& OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class) != null) {
String name = f.getName();
SavingTrackHelper savingTrackHelper = app.getSavingTrackHelper();
savingTrackHelper.insertPointData(rec.lat, rec.lon, System.currentTimeMillis(), name);
}
}
}
}
}
}
public DataTileManager<Recording> getRecordings() {
public DataTileManager<Recording> getRecordings() {
return recordings;
}
@ -1052,7 +1082,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
public Class<? extends Activity> getSettingsActivity() {
return SettingsAudioVideoActivity.class;
}
@Override
public void onMapActivityExternalResult(int requestCode, int resultCode, Intent data) {
@ -1070,8 +1100,6 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
}
public Collection<Recording> getAllRecordings() {
return recordingByFileName.values();
}
@ -1189,7 +1217,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
FileOutputStream fos = new FileOutputStream(pictureFile);
fos.write(data);
fos.close();
indexFile(true, pictureFile);
indexFile(true, pictureFile);
dlg.dismiss();
// play sound after photo - sound file must be loaded at this time:
if (AV_PHOTO_PLAY_SOUND.get()) {

View file

@ -49,6 +49,7 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment {
final Intent favorites = new Intent(activity, fa);
favorites.putExtra("TAB", "AUDIO");
favorites.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
getMyApplication().getSettings().FAVORITES_TAB.set(FavoritesActivity.NOTES_TAB);
activity.startActivity(favorites);
}
});
@ -94,15 +95,23 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment {
for (final AudioVideoNotesPlugin.Recording recording : notes){
LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.dash_audio_video_notes_item, null, false);
View view = inflater.inflate(R.layout.note, null, false);
getNoteView(recording, view, getActivity(), plugin);
getNoteView(recording, view, getActivity());
view.findViewById(R.id.play).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
plugin.playRecording(getActivity(), recording);
}
});
view.findViewById(R.id.options).setVisibility(View.GONE);
view.findViewById(R.id.divider).setVisibility(View.VISIBLE);
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
getMyApplication().getSettings().setMapLocationToShow(recording.getLatitude(), recording.getLongitude(), 15,
new PointDescription(PointDescription.POINT_TYPE_NOTE,
!Algorithms.isEmpty(recording.getName())? recording.getName() : recording.getDescription(getActivity())), true,
recording.getName(getActivity())), true,
recording); //$NON-NLS-1$
MapActivity.launchMapActivityMoveToTop(getActivity());
}
@ -112,30 +121,21 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment {
}
public static void getNoteView(final AudioVideoNotesPlugin.Recording recording, View view,
final Context ctx, final AudioVideoNotesPlugin plugin) {
if (recording.getName() != null){
((TextView) view.findViewById(R.id.name)).setText(recording.getName());
((TextView) view.findViewById(R.id.descr)).setText(recording.getDescription(ctx));
} else {
((TextView) view.findViewById(R.id.name)).setText(recording.getDescription(ctx));
view.findViewById(R.id.descr).setVisibility(View.GONE);
}
final Context ctx) {
String name = recording.getName(ctx);
TextView nameText = ((TextView) view.findViewById(R.id.name));
nameText.setText(name);
((TextView) view.findViewById(R.id.descr)).setText(recording.getDescription(ctx));
ImageView icon = (ImageView) view.findViewById(R.id.icon);
if (recording.isAudio()){
if (recording.isAudio()) {
icon.setImageResource(R.drawable.ic_type_audio);
} else if (recording.isVideo()){
} else if (recording.isVideo()) {
icon.setImageResource(R.drawable.ic_type_video);
} else {
icon.setImageResource(R.drawable.ic_type_img);
}
view.findViewById(R.id.play).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
plugin.playRecording(ctx, recording);
}
});
}
}

View file

@ -1,6 +1,7 @@
package net.osmand.plus.audionotes;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
@ -13,6 +14,7 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ExpandableListView;
@ -28,6 +30,7 @@ import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.audionotes.AudioVideoNotesPlugin.Recording;
import net.osmand.plus.dialogs.DirectionsDialogs;
import android.support.v4.app.ListFragment;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.List;
@ -89,27 +92,8 @@ public class NotesFragment extends ListFragment {
}
final AudioVideoNotesPlugin.Recording recording = getItem(position);
String name = recording.getName();
TextView nameText = ((TextView) row.findViewById(R.id.name));
if (name != null) {
nameText.setText(name);
} else if (recording.isAudio()) {
nameText.setText(R.string.audio);
} else if (recording.isVideo()) {
nameText.setText(R.string.video);
} else if (recording.isPhoto()) {
nameText.setText(R.string.photo);
}
((TextView) row.findViewById(R.id.descr)).setText(recording.getDescription(getActivity()));
ImageView icon = (ImageView) row.findViewById(R.id.icon);
if (recording.isAudio()) {
icon.setImageResource(R.drawable.ic_type_audio);
} else if (recording.isVideo()) {
icon.setImageResource(R.drawable.ic_type_video);
} else {
icon.setImageResource(R.drawable.ic_type_img);
}
DashAudioVideoNotesFragment.getNoteView(recording, row, getActivity());
row.findViewById(R.id.play).setVisibility(View.GONE);
ImageButton options = (ImageButton) row.findViewById(R.id.options);
options.setOnClickListener(new View.OnClickListener() {
@Override
@ -129,7 +113,7 @@ public class NotesFragment extends ListFragment {
private void showOnMap(Recording recording) {
getMyApplication().getSettings().setMapLocationToShow(recording.getLatitude(), recording.getLongitude(), 15,
new PointDescription(PointDescription.POINT_TYPE_NOTE, recording.getName()), true,
new PointDescription(PointDescription.POINT_TYPE_NOTE, recording.getName(getActivity())), true,
recording); //$NON-NLS-1$
MapActivity.launchMapActivityMoveToTop(getActivity());
}
@ -173,15 +157,15 @@ public class NotesFragment extends ListFragment {
public boolean onMenuItemClick(MenuItem item) {
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
if (recording.isPhoto()) {
Uri screenshotUri = Uri.parse(recording.file.getAbsolutePath());
Uri screenshotUri = Uri.parse(recording.getFile().getAbsolutePath());
sharingIntent.setType("image/*");
sharingIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
} else if (recording.isAudio()) {
Uri audioUri = Uri.parse(recording.file.getAbsolutePath());
Uri audioUri = Uri.parse(recording.getFile().getAbsolutePath());
sharingIntent.setType("audio/*");
sharingIntent.putExtra(Intent.EXTRA_STREAM, audioUri);
} else if (recording.isVideo()) {
Uri videoUri = Uri.parse(recording.file.getAbsolutePath());
Uri videoUri = Uri.parse(recording.getFile().getAbsolutePath());
sharingIntent.setType("video/*");
sharingIntent.putExtra(Intent.EXTRA_STREAM, videoUri);
}
@ -229,12 +213,26 @@ public class NotesFragment extends ListFragment {
getListView(), false);
final EditText editText = (EditText) v.findViewById(R.id.name);
builder.setView(v);
editText.setText(recording.getName());
String fileName = recording.getFileName();
final String hash;
int hashInd = fileName.lastIndexOf("_");
if (hashInd == -1) {
hash = "_" + fileName;
} else {
hash = fileName.substring(hashInd, fileName.length());
}
editText.setText(recording.getName(getActivity()));
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
builder.setNegativeButton(R.string.default_buttons_cancel, null);
builder.setPositiveButton(R.string.default_buttons_apply, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
recording.setName(editText.getText().toString());
if(!recording.setName(editText.getText().toString() + hash)) {
Toast.makeText(getActivity(),R.string.rename_failed,Toast.LENGTH_SHORT).show();
}
recording.setDescription();
listAdapter.notifyDataSetInvalidated();
}

View file

@ -13,6 +13,7 @@ import net.osmand.plus.FavouritesDbHelper;
import net.osmand.plus.OsmAndAppCustomization;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.R;
import net.osmand.plus.activities.FavoritesActivity;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.FavoriteImageDrawable;
import net.osmand.plus.dialogs.DirectionsDialogs;
@ -56,6 +57,7 @@ public class DashFavoritesFragment extends DashLocationFragment implements Favou
OsmAndAppCustomization appCustomization = getMyApplication().getAppCustomization();
final Intent favorites = new Intent(activity, appCustomization.getFavoritesActivity());
favorites.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
getMyApplication().getSettings().FAVORITES_TAB.set(FavoritesActivity.FAVORITES_TAB);
activity.startActivity(favorites);
}
});

View file

@ -175,7 +175,7 @@ public class FavoriteDialogs {
public static Dialog createAddFavouriteDialog(final Activity activity, final Bundle args) {
Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.favourites_context_menu_edit);
final View v = activity.getLayoutInflater().inflate(R.layout.favourite_edit_dialog, null, false);
final View v = activity.getLayoutInflater().inflate(R.layout.favorite_edit_dialog, null, false);
final FavouritesDbHelper helper = ((OsmandApplication) activity.getApplication()).getFavorites();
builder.setView(v);
final EditText editText = (EditText) v.findViewById(R.id.Name);

View file

@ -4,22 +4,35 @@ import java.io.File;
import java.util.List;
import net.osmand.IndexConstants;
import net.osmand.access.AccessibleToast;
import net.osmand.plus.GPXUtilities;
import net.osmand.plus.GpxSelectionHelper;
import net.osmand.plus.OsmAndAppCustomization;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.AvailableGPXFragment;
import net.osmand.plus.activities.FavoritesActivity;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.SavingTrackHelper;
import net.osmand.plus.dashboard.DashBaseFragment;
import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.helpers.GpxUiHelper;
import android.app.Activity;
import android.content.Intent;
import android.graphics.PorterDuff;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
/**
* Created by Denis
@ -42,6 +55,7 @@ public class DashTrackFragment extends DashBaseFragment {
Activity activity = getActivity();
OsmAndAppCustomization appCustomization = getMyApplication().getAppCustomization();
final Intent favorites = new Intent(activity, appCustomization.getFavoritesActivity());
getMyApplication().getSettings().FAVORITES_TAB.set(FavoritesActivity.GPX_TAB);
favorites.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
activity.startActivity(favorites);
}
@ -61,7 +75,7 @@ public class DashTrackFragment extends DashBaseFragment {
final List<String> list = GpxUiHelper.getSortedGPXFilenames(dir);
if (list.size() == 0){
if (list.size() == 0) {
(mainView.findViewById(R.id.main_fav)).setVisibility(View.GONE);
return;
} else {
@ -70,29 +84,91 @@ public class DashTrackFragment extends DashBaseFragment {
LinearLayout tracks = (LinearLayout) mainView.findViewById(R.id.items);
tracks.removeAllViews();
if (list.size() > 3){
while (list.size() != 3){
if (list.size() > 3) {
while (list.size() != 3) {
list.remove(3);
}
}
for (String filename : list){
final File f = new File(dir, filename);
GPXUtilities.GPXFile res = GPXUtilities.loadGPXFile(getMyApplication(), f);
OsmandApplication app = getMyApplication();
SavingTrackHelper savingTrackHelper = app.getSavingTrackHelper();
if (app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get()) {
list.remove(2);
LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.dash_gpx_track_item, null, false);
((TextView)view.findViewById(R.id.name)).setText(filename);
((TextView)view.findViewById(R.id.points_count)).
AvailableGPXFragment.createCurrentTrackView(view, app);
GpxSelectionHelper.SelectedGpxFile currentTrack = savingTrackHelper.getCurrentTrack();
((TextView)view.findViewById(R.id.name)).setText(R.string.currently_recording_track);
String description = GpxUiHelper.getDescription(getMyApplication(), currentTrack.getGpxFile(), null, true);
int startindex = description.indexOf(">");
int endindex = description.indexOf("</font>");
String distance = description.substring(startindex + 1, endindex);
String points = String.valueOf(currentTrack.getGpxFile().points.size());
((TextView) view.findViewById(R.id.points_count)).setText(points);
((TextView)view.findViewById(R.id.distance)).setText(distance);
tracks.addView(view);
}
for (String filename : list) {
final File f = new File(dir, filename);
final GPXUtilities.GPXFile res = GPXUtilities.loadGPXFile(getMyApplication(), f);
LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.dash_gpx_track_item, null, false);
((TextView) view.findViewById(R.id.name)).setText(filename);
((TextView) view.findViewById(R.id.points_count)).
setText(res.points.size() + " " + getActivity().getString(R.string.points));
String description = GpxUiHelper.getDescription(getMyApplication(), res, f, true);
int startindex = description.indexOf(">");
int endindex = description.indexOf("</font>");
String distnace = description.substring(startindex + 1, endindex);
((TextView)view.findViewById(R.id.distance)).
((TextView) view.findViewById(R.id.distance)).
setText(distnace);
view.findViewById(R.id.time_icon).setVisibility(View.GONE);
boolean light = getMyApplication().getSettings().isLightContent();
Drawable icon = getResources().getDrawable(R.drawable.ic_show_on_map);
GpxSelectionHelper gpxSelectionHelper = getMyApplication().getSelectedGpxHelper();
boolean isShowingOnMap = gpxSelectionHelper.getSelectedFileByName(filename) != null;
//setting proper icon color
if (isShowingOnMap) {
icon.mutate();
if (light) {
icon.setColorFilter(getResources().getColor(R.color.dashboard_gpx_on_map), PorterDuff.Mode.MULTIPLY);
} else {
icon.setColorFilter(getResources().getColor(R.color.color_distance), PorterDuff.Mode.MULTIPLY);
}
} else if (light) {
icon.mutate();
icon.setColorFilter(getResources().getColor(R.color.icon_color_light), PorterDuff.Mode.MULTIPLY);
}
final ImageButton showOnMap = (ImageButton) view.findViewById(R.id.show_on_map);
showOnMap.setImageDrawable(icon);
showOnMap.setVisibility(View.VISIBLE);
//view.findViewById(R.id.distance_icon).setVisibility(View.GONE);
view.findViewById(R.id.stop).setVisibility(View.GONE);
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showOnMap(res);
}
});
tracks.addView(view);
}
}
private void showOnMap(GPXUtilities.GPXFile file){
if (file.isEmpty()) {
AccessibleToast.makeText(getActivity(), R.string.gpx_file_is_empty, Toast.LENGTH_LONG).show();
return;
}
OsmandSettings settings = getMyApplication().getSettings();
settings.setMapLocationToShow(file.getLastPoint().lat, file.getLastPoint().lon, settings.getLastKnownMapZoom());
getMyApplication().getSelectedGpxHelper().setGpxFileToDisplay(file);
MapActivity.launchMapActivityMoveToTop(getActivity());
}
}

View file

@ -10,6 +10,7 @@ import net.osmand.plus.ContextMenuAdapter;
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
import net.osmand.plus.NavigationService;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmAndTaskManager;
import net.osmand.plus.OsmAndTaskManager.OsmAndTaskRunnable;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
@ -256,29 +257,11 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn
int which = holder[0];
int item = items.get(which);
if(item == R.string.save_current_track){
app.getTaskManager().runInBackground(new OsmAndTaskRunnable<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
isSaving = true;
try {
SavingTrackHelper helper = app.getSavingTrackHelper();
helper.saveDataToGpx(app.getAppCustomization().getTracksDir());
helper.close();
} finally {
isSaving = false;
}
return null;
}
}, (Void) null);
saveCurrentTrack();
} else if(item == R.string.gpx_monitoring_start) {
startGPXMonitoring(map);
} else if(item == R.string.gpx_monitoring_stop) {
settings.SAVE_GLOBAL_TRACK_TO_GPX.set(false);
if (app.getNavigationService() != null) {
app.getNavigationService().stopIfNeeded(app, NavigationService.USED_BY_GPX);
}
stopRecording();
} else if(item == R.string.gpx_start_new_segment) {
app.getSavingTrackHelper().startNewSegment();
} else if(item == R.string.live_monitoring_stop) {
@ -313,6 +296,32 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn
}
}
public void saveCurrentTrack() {
app.getTaskManager().runInBackground(new OsmAndTaskRunnable<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
isSaving = true;
try {
SavingTrackHelper helper = app.getSavingTrackHelper();
helper.saveDataToGpx(app.getAppCustomization().getTracksDir());
helper.close();
} finally {
isSaving = false;
}
return null;
}
}, (Void) null);
}
public void stopRecording(){
settings.SAVE_GLOBAL_TRACK_TO_GPX.set(false);
if (app.getNavigationService() != null) {
app.getNavigationService().stopIfNeeded(app, NavigationService.USED_BY_GPX);
}
}
private void startGPXMonitoring(MapActivity map) {
app.getSavingTrackHelper().startNewSegment();
final ValueHolder<Integer> vs = new ValueHolder<Integer>();

View file

@ -162,7 +162,7 @@ public class AsyncLoadingThread extends Thread {
resourceManger.getMapTileDownloader().requestToDownload(req);
}
protected static class TileLoadDownloadRequest extends DownloadRequest {
public static class TileLoadDownloadRequest extends DownloadRequest {
public final String tileId;
public final File dirWithTiles;