This commit is contained in:
Bars107 2015-02-28 18:15:27 +02:00
commit 141949ee55
39 changed files with 196 additions and 122 deletions

View file

@ -67,7 +67,7 @@ public class BinaryInspector {
// "-vstreets", "-vbuildings", "-vintersections",
// "-zoom=16",
// "-bbox=1.74,51.17,1.75,51.16",
// "/home/victor/projects/osmand/osm-gen/Map.obf"
// "/Users/victorshcherb/osmand/osm-gen/World_seamarks_2.obf"
});
} else {
in.inspector(args);

View file

@ -1,11 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.source=1.7

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/expandable_list_item_background"
android:minHeight="@dimen/dashListItemHeight"
android:orientation="vertical">
@ -42,6 +43,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:layout_marginLeft="@dimen/subHeaderMarginLeft"
android:layout_marginRight="@dimen/showAllButtonMarginRight"
android:layout_weight="1"
@ -49,6 +51,7 @@
<TextView
android:id="@+id/name"
android:textSize="@dimen/dashFavNameTextSize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:textColorPrimary"
@ -74,7 +77,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/gpx_small_text_margin"
android:textColor="@color/icon_color_light"/>
android:textSize="@dimen/download_descr_text_size"
android:textColor="?android:textColorSecondary"/>
<ImageView
android:id="@+id/distance_icon"
@ -89,7 +93,8 @@
android:layout_width="wrap_content"
android:layout_marginRight="@dimen/gpx_small_text_margin"
android:layout_height="wrap_content"
android:textColor="@color/icon_color_light"/>
android:textSize="@dimen/download_descr_text_size"
android:textColor="?android:textColorSecondary"/>
<ImageView
android:id="@+id/time_icon"
@ -104,7 +109,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/gpx_small_text_margin"
android:textColor="@color/icon_color_light"/>
android:textSize="@dimen/download_descr_text_size"
android:textColor="?android:textColorSecondary"/>
</LinearLayout>
<LinearLayout
@ -118,7 +124,8 @@
android:id="@+id/date_and_size_details"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/icon_color_light"/>
android:textSize="@dimen/download_descr_text_size"
android:textColor="?android:textColorSecondary"/>
</LinearLayout>
@ -128,6 +135,7 @@
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/download_descr_text_size"
android:textColor="?android:textColorPrimary"/>
</LinearLayout>

View file

@ -5,8 +5,7 @@
android:layout_height="wrap_content"
android:background="?attr/expandable_list_item_background"
android:minHeight="@dimen/list_item_height"
android:orientation="vertical"
android:paddingLeft="@dimen/list_content_padding">
android:orientation="vertical">
<View
android:id="@+id/divider"
@ -17,7 +16,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:paddingLeft="@dimen/list_content_padding">
<CheckBox
android:id="@+id/check_local_index"
android:layout_width="wrap_content"
@ -46,6 +46,7 @@
<TextView
android:id="@+id/name"
style="@style/ListText.Small"
android:textColor="?android:textColorPrimary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
@ -57,6 +58,7 @@
android:id="@+id/descr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:textColorSecondary"
android:gravity="center_vertical"
android:textSize="@dimen/download_descr_text_size"
android:maxLines="25"

View file

@ -139,14 +139,14 @@
<string name="poi_public_transport_platform">Прыпынак грамадзкага транспарту</string>
<string name="poi_public_transport_platform_bus">Прыпынак аўтобусу</string>
<string name="poi_public_transport_platform_trolleybus">Прыпынак тралейбусу</string>
<string name="poi_bus_stop">Прыпынак аўтобусу (састар.)</string>
<string name="poi_bus_stop">Аўтобусны прыпынак</string>
<string name="poi_public_transport_platform_tram">Прыпынак трамваю</string>
<string name="poi_shop_tea">Чайная крама</string>
<string name="poi_tram_stop">Прыпынак трамваю (састар.)</string>
<string name="poi_tram_stop">Трамвайны прыпынак</string>
<string name="poi_public_transport_station">Станцыя грамадзкага транспарту</string>
<string name="poi_bus_station">Аўтобусная станцыя (састар.)</string>
<string name="poi_railway_station">Чыгуначная станцыя (састар.)</string>
<string name="poi_railway_platform">Чыгуначная плятформа (састар.)</string>
<string name="poi_bus_station">Аўтобусная станцыя</string>
<string name="poi_railway_station">Чыгуначная станцыя</string>
<string name="poi_railway_platform">Чыгуначная плятформа</string>
<string name="poi_railway_halt">Чыгуначная плятформа (састар.)</string>
<string name="poi_subway_entrance">Уваход у мэтро</string>
<string name="poi_subway_station">Станцыя мэтро</string>
@ -673,7 +673,7 @@
<string name="poi_car_parts">Аўтазапчасткі</string>
<string name="poi_public_transport_stop_position">Месца прыпынку грамадзкага транспарту</string>
<string name="poi_halt">Чыгуначны прыпынак (састарэла)</string>
<string name="poi_halt">Чыгуначны прыпынак</string>
<string name="poi_internet_access_wlan">Доступ у Інтэрнэт: WLAN</string>
<string name="poi_internet_access_terminal">Доступ у Інтэрнэт: тэрмінал</string>
<string name="poi_internet_access_wired">Доступ у Інтэрнэт: дротавы</string>

View file

@ -136,13 +136,13 @@
<string name="poi_public_transport_platform">Offentlig transport stoppested</string>
<string name="poi_public_transport_platform_bus">Busstoppested</string>
<string name="poi_public_transport_platform_trolleybus">Trolleybus stoppested</string>
<string name="poi_bus_stop">Busstoppested (forældet)</string>
<string name="poi_bus_stop">Busstoppested</string>
<string name="poi_public_transport_platform_tram">Sporvognsstoppested</string>
<string name="poi_tram_stop">Sporvognsstoppestedet (forældet)</string>
<string name="poi_tram_stop">Sporvognsstoppestedet</string>
<string name="poi_public_transport_station">Offentligtransport station</string>
<string name="poi_bus_station">Busstation (forældet)</string>
<string name="poi_railway_station">Banegård (forældet)</string>
<string name="poi_railway_platform">Perron (forældet)</string>
<string name="poi_bus_station">Busstation</string>
<string name="poi_railway_station">Banegård</string>
<string name="poi_railway_platform">Perron</string>
<string name="poi_railway_halt">Trinbrædt (forældet)</string>
<string name="poi_subway_entrance">Metroindgang</string>
<string name="poi_subway_station">Metrostation</string>
@ -690,7 +690,7 @@
<string name="poi_farm">Gårdbutik</string>
<string name="poi_car_parts">Bildele</string>
<string name="poi_public_transport_stop_position">Offentlig transport stoppested</string>
<string name="poi_halt">Jernbane stop (forældet)</string>
<string name="poi_halt">Jernbane stop</string>
<string name="poi_lodging">Logi</string>
<string name="poi_internet_access_wlan">Internetadgang: wlan</string>
<string name="poi_internet_access_terminal">Internetadgang: terminal</string>

View file

@ -52,7 +52,7 @@
<string name="index_srtm_parts">dele</string>
<string name="index_srtm_ele">Højdekurver</string>
<string name="srtm_plugin_description">Ekstern udvidelse (hentes separat) som muliggør at hente offline højdekurver og relief (\'Indstillinger\' → \'Administrer kortfiler\' → \'Hent\' → Vælg den ønskede korttype). Disse kan vises i kombination med OsmAnd offline kort.</string>
<string name="srtm_plugin_name">Højdekurver (ekstern udvidelse)</string>
<string name="srtm_plugin_name">Højdekurver</string>
<string name="download_select_map_types">Andre kort</string>
<string name="download_roads_only_item">Kun veje</string>
<string name="download_srtm_maps">Højdekurver</string>
@ -303,7 +303,7 @@
<string name="osmand_parking_am">AM</string>
<string name="osmand_parking_position_name">Parkeringssted</string>
<string name="osmand_parking_plugin_description">Ekstern udvidelse (hentes separat) gør det muligt at huske placeringen af den parkerede bil.</string>
<string name="osmand_parking_plugin_name">Parkeringsposition (ekstern udvidelse)</string>
<string name="osmand_parking_plugin_name">Parkeringsposition</string>
<string name="context_menu_item_add_parking_point">Marker som parkeringsplads</string>
<string name="context_menu_item_delete_parking_point">Slet en parkeringsmarkør</string>
<string name="gpxup_public">Offentligt</string>

View file

@ -1117,8 +1117,7 @@
<string name="recording_error">"Error durante la grabación" </string>
<string name="recording_camera_not_available">La cámara no está disponible</string>
<string name="recording_playing">Reproduciendo audio de la grabación especificada.\n%1$s</string>
<string name="tip_recent_changes_1_1_0_t">"Cambios en versión 1.1.0 :\n\t* Extra de cálculo de distancia\n\t* Extra de notas de audio\n\t* Extra de curvas de nivel\n\t* Corrección de errores\n\t* Opción de estilo de mapas \'Vista de tour\' con más detalles de mapa, nuevos estilos de carreteras, más contraste y opción para travesías alpinas (escala SAC)\n\t* Correción de desplazamiento del geoide EGM96 para lecturas GPS de altitud"
</string>
<string name="tip_recent_changes_1_1_0_t">"Cambios en versión 1.1.0 :\n\t* Extra de cálculo de distancia\n\t* Extra de notas de audio\n\t* Extra de curvas de nivel\n\t* Corrección de errores\n\t* Opción de estilo de mapas \'Vista de turismo\' con más detalles de mapa, nuevos estilos de carreteras, más contraste y opción para travesías alpinas (escala SAC)\n\t* Correción de desplazamiento del geoide EGM96 para lecturas GPS de altitud "</string>
<string name="recording_description">Grabado %1$s %3$s %2$s</string>
<string name="srtm_paid_version_msg">Considere la compra del extra de curvas de nivel en la Tienda para apoyar desarrollos adicionales.</string>
<string name="srtm_paid_version_title">Extra curvas de nivel</string>
@ -1944,7 +1943,7 @@
<string name="plugin_ski_descr3">Esta vista se puede revertir desactivándola de nuevo aquí, o cambiando el \'Estilo de mapa\' bajo \'Configurar mapa\' al valor deseado.</string>
<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="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, por ejemplo, cuando se conducen vehículos grandes.</string>
<string name="days_behind">días atrás</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>
@ -1952,7 +1951,7 @@
<string name="watch">Ver</string>
<string name="plugin_touringview_name">Vista de mapa Touring</string>
<string name="turn_off_all">Apagar todo</string>
<string name="turn_off_all">Apagar_todo</string>
<string name="showed_on_map">Mostrado en el mapa</string>
<string name="rename_failed">Falló el renombrado.</string>
<string name="currently_recording_track">Actualmente registrando traza</string>

View file

@ -134,13 +134,13 @@
<string name="poi_public_transport_platform">대중 교통 정류장</string>
<string name="poi_public_transport_platform_bus">버스 정류장</string>
<string name="poi_public_transport_platform_trolleybus">무궤도 전차 정류장</string>
<string name="poi_bus_stop">버스 정류장 (사용 되지 않음)</string>
<string name="poi_bus_stop">버스 정류장</string>
<string name="poi_public_transport_platform_tram">트램 정류장</string>
<string name="poi_tram_stop">트램 정류장 (사용 되지 않음)</string>
<string name="poi_tram_stop">트램 정류장</string>
<string name="poi_public_transport_station">대중 교통 스테이션</string>
<string name="poi_bus_station">버스 정류장 (사용 되지 않음)</string>
<string name="poi_railway_station">기차역 (사용 되지 않음)</string>
<string name="poi_railway_platform">철도 플랫폼 (사용 되지 않음)</string>
<string name="poi_bus_station">버스 정류장</string>
<string name="poi_railway_station">기차역</string>
<string name="poi_railway_platform">철도 플랫폼</string>
<string name="poi_railway_halt">철도 정류장 (사용 되지 않음)</string>
<string name="poi_subway_entrance">지하철 입구</string>
<string name="poi_subway_station">지하철 역</string>
@ -673,7 +673,7 @@
<string name="poi_car">자동차 가게</string>
<string name="poi_car_parts">자동차 부품</string>
<string name="poi_public_transport_stop_position">대중 교통 정류장 위치</string>
<string name="poi_halt">철도 정거장 (사용 되지 않음)</string>
<string name="poi_halt">철도 정거장</string>
<string name="poi_railway_buffer_stop">철도 버퍼 정거장</string>
<string name="poi_lodging">숙박</string>
<string name="poi_internet_access_wlan">인터넷 접속: 무선랜</string>

View file

@ -1200,7 +1200,7 @@
<string name="index_srtm_parts">부분</string>
<string name="index_srtm_ele">등고선</string>
<string name="srtm_plugin_description">오프라인 등고선 과 음영을 다운로드하기 위해 외부플러그인을 이용합니다 (설정→지도 관리→다운로드→ 원하는 지도 유형 선택). OsmAnd 오프라인 지도에서 조합하여 표시할 수 있습니다.</string>
<string name="srtm_plugin_name">등고선 (외부 플러그인)</string>
<string name="srtm_plugin_name">등고선</string>
<string name="download_select_map_types">다른 지도</string>
<string name="download_roads_only_item">도로 전용</string>
<string name="download_srtm_maps">등고선</string>
@ -1467,7 +1467,7 @@
<string name="osmand_parking_am">오전</string>
<string name="osmand_parking_position_name">주차 포인트</string>
<string name="osmand_parking_plugin_description">주차된 차의 위치를 저장하기 위한 외부 플러그인.</string>
<string name="osmand_parking_plugin_name">주차 위치 (외부 플러그인)</string>
<string name="osmand_parking_plugin_name">주차 위치</string>
<string name="context_menu_item_add_parking_point">주차 위치로 마크(표시)</string>
<string name="context_menu_item_delete_parking_point">주차 마커를 삭제</string>
<string name="gpxup_public">공용</string>

View file

@ -113,13 +113,13 @@
<string name="poi_public_transport_platform">Firmada trasportu pùblicu</string>
<string name="poi_public_transport_platform_bus">Firmada àutobus</string>
<string name="poi_public_transport_platform_trolleybus">Firmada filobus</string>
<string name="poi_bus_stop">Firmada àutobus (disusadu)</string>
<string name="poi_bus_stop">Firmada àutobus</string>
<string name="poi_public_transport_platform_tram">Firmada tram</string>
<string name="poi_tram_stop">Firmada tram (disusada)</string>
<string name="poi_tram_stop">Firmada tram</string>
<string name="poi_public_transport_station">Istatzione trasportu pùblicu</string>
<string name="poi_bus_station">Istatzione bus (disusadu)</string>
<string name="poi_bus_station">Istatzione bus</string>
<string name="poi_railway_station">Istatzione de sos trenos</string>
<string name="poi_railway_platform">Piattaredda ferroviària (disusasu)</string>
<string name="poi_railway_platform">Piattaredda ferroviària</string>
<string name="poi_railway_halt">Firmada de sos trenos (disusada)</string>
<string name="poi_subway_entrance">Intrada de sa metropolitana</string>
<string name="poi_subway_station">Istatzione de sa metropolitana</string>
@ -624,6 +624,6 @@
<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_halt">Firmada de sa ferrovia</string>
<string name="poi_railway_buffer_stop">Denegante pro sos trenos</string>
</resources>

View file

@ -206,7 +206,7 @@
<string name="osmand_parking_am">fm</string>
<string name="osmand_parking_position_name">Parkeringspunkt</string>
<string name="osmand_parking_plugin_description">Extern modul (särskild nedladdning) som gör det möjligt att spara platsen där du parkerade bilen.</string>
<string name="osmand_parking_plugin_name">Parkeringsplats (extern modul)</string>
<string name="osmand_parking_plugin_name">Parkeringsplats</string>
<string name="context_menu_item_add_parking_point">Markera som parkeringsplats</string>
<string name="context_menu_item_delete_parking_point">Ta bort P-markering</string>
<string name="asap">Snarast</string>
@ -959,7 +959,7 @@
<string name="index_srtm_parts">delar</string>
<string name="index_srtm_ele">Höjdkurvor</string>
<string name="download_select_map_types">Andra kartor</string>
<string name="srtm_plugin_name">Höjdkurvor (extern modul)</string>
<string name="srtm_plugin_name">Höjdkurvor</string>
<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

View file

@ -150,7 +150,7 @@
<string name="osmand_parking_am">AM</string>
<string name="osmand_parking_position_name">停車地點</string>
<string name="osmand_parking_plugin_description">該外掛元件(單獨下載)可記住您的愛車停車地點。</string>
<string name="osmand_parking_plugin_name">停車地點(外掛元件)</string>
<string name="osmand_parking_plugin_name">停車地點</string>
<string name="context_menu_item_add_parking_point">標記為停車地點</string>
<string name="context_menu_item_delete_parking_point">刪除停車標記</string>
<string name="gpxup_public">公用的</string>
@ -1124,7 +1124,7 @@
<string name="audionotes_plugin_name">音訊/視訊注解</string>
<string name="index_srtm_parts">部件</string>
<string name="index_srtm_ele">等高線</string>
<string name="srtm_plugin_name">等高線(外掛元件)</string>
<string name="srtm_plugin_name">等高線</string>
<string name="download_select_map_types">其它地圖</string>
<string name="download_roads_only_item">僅道路</string>
<string name="download_srtm_maps">等高線</string>

View file

@ -822,7 +822,7 @@
<string name="index_srtm_parts">parts</string>
<string name="index_srtm_ele">Contour lines</string>
<string name="srtm_plugin_description">External plugin (separate download) facilitating to download offline contour lines and hillshades (\'Settings\' → \'Manage map files\' → \'Download\' → Select desired map type). These be can be displayed in combination with the OsmAnd offline maps.</string>
<string name="srtm_plugin_name">Contour Lines (external plugin)</string>
<string name="srtm_plugin_name">Contour Lines</string>
<string name="download_select_map_types">Other maps</string>
<string name="download_roads_only_item">Roads only</string>
<string name="download_srtm_maps">Contour lines</string>
@ -1216,7 +1216,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="osmand_parking_am">AM</string>
<string name="osmand_parking_position_name">Parking point</string>
<string name="osmand_parking_plugin_description">External plugin (separate download) allowing to memorize the location of your parked car.</string>
<string name="osmand_parking_plugin_name">Parking Position (external plugin)</string>
<string name="osmand_parking_plugin_name">Parking Position</string>
<string name="context_menu_item_add_parking_point">Mark as a parking position</string>
<string name="context_menu_item_delete_parking_point">Delete a parking marker</string>
<string name="gpxup_public">Public</string>

View file

@ -20,8 +20,10 @@ import net.osmand.plus.ContextMenuAdapter;
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
import net.osmand.plus.GPXUtilities;
import net.osmand.plus.GPXUtilities.GPXFile;
import net.osmand.plus.GPXUtilities.GPXTrackAnalysis;
import net.osmand.plus.GPXUtilities.WptPt;
import net.osmand.plus.GpxSelectionHelper;
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
@ -34,7 +36,6 @@ import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
import net.osmand.plus.osmedit.OsmEditingPlugin;
import net.osmand.plus.views.MonitoringInfoControl;
import net.osmand.util.Algorithms;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
@ -423,7 +424,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
enableSelectionMode(true);
updateSelectionMode(mode);
MenuItem it = menu.add(R.string.show_gpx_route);
it.setIcon(!isLightActionBar() ? R.drawable.ic_action_map_marker_dark : R.drawable.ic_action_map_marker_dark);
it.setIcon(R.drawable.ic_action_done);
MenuItemCompat.setShowAsAction(it, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
return true;
}
@ -439,7 +440,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
if (selectedItems.isEmpty()) {
return true;
}
runSelection(true);
runSelection(false);
actionMode.finish();
return true;
}
@ -652,6 +653,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
private void loadGPXFolder(File mapPath, List<GpxInfo> result, LoadGpxTask loadTask,
List<GpxInfo> progress, String gpxSubfolder) {
GpxSelectionHelper sgpx = app.getSelectedGpxHelper();
for (File gpxFile : listFilesSorted(mapPath)) {
if (gpxFile.isDirectory()) {
String sub = gpxSubfolder.length() == 0 ? gpxFile.getName() : gpxSubfolder + "/" + gpxFile.getName();
@ -908,7 +910,8 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
DirectionsDialogs.setupPopUpMenuIcon(optionsMenu);
Drawable showIcon = getResources().getDrawable(R.drawable.ic_show_on_map);
if (light) {
showIcon.mutate().setColorFilter(getResources().getColor(R.color.icon_color_light), PorterDuff.Mode.MULTIPLY);
showIcon = 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(showIcon);
@ -945,8 +948,13 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
final OsmEditingPlugin osmEditingPlugin = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class);
if (osmEditingPlugin != null && osmEditingPlugin.isActive()) {
Drawable exportIcon = getResources().getDrawable(R.drawable.ic_action_export);
if (light) {
exportIcon = exportIcon.mutate();
exportIcon.setColorFilter(getResources().getColor(R.color.icon_color_light), PorterDuff.Mode.MULTIPLY);
}
item = optionsMenu.getMenu().add(R.string.export)
.setIcon(light ? R.drawable.ic_action_gup_light : R.drawable.ic_action_gup_dark);
.setIcon(exportIcon);
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@ -1361,10 +1369,13 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
} else {
viewName.setTypeface(Typeface.DEFAULT, Typeface.NORMAL);
}
if (selectedGpxHelper.getSelectedFileByName(child.getFileName()) != null) {
SelectedGpxFile sgpx = selectedGpxHelper.getSelectedFileByName(child.getFileName());
GPXTrackAnalysis analysis = null;
if (sgpx != null) {
icon.setImageDrawable(gpxOnMap);
analysis = sgpx.getTrackAnalysis();
}
boolean sectionRead = child.getAnalysis() == null;
boolean sectionRead = analysis == null;
if (sectionRead) {
v.findViewById(R.id.read_section).setVisibility(View.GONE);
v.findViewById(R.id.unknown_section).setVisibility(View.VISIBLE);
@ -1391,7 +1402,6 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
TextView time = (TextView) v.findViewById(R.id.time);
TextView distance = (TextView) v.findViewById(R.id.distance);
TextView pointsCount = (TextView) v.findViewById(R.id.points_count);
GPXUtilities.GPXTrackAnalysis analysis = child.getAnalysis();
pointsCount.setText(analysis.wptPoints + "");
if (analysis.totalDistanceMoving != 0) {
distance.setText(OsmAndFormatter.getFormattedDistance(analysis.totalDistanceMoving, app));

View file

@ -14,6 +14,7 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.TabActivity.TabItem;
import net.osmand.plus.views.controls.PagerSlidingTabStrip;
import android.app.Activity;
import android.graphics.drawable.Drawable;
@ -72,6 +73,7 @@ public class FavoritesActivity extends TabActivity {
ViewPager mViewPager = (ViewPager) findViewById(R.id.pager);
List<TabItem> mTabs = new ArrayList<TabItem>();
// mTabs.add(new TabItem("\t\t\t", FavoritesTreeFragment.class));
mTabs.add(getTabIndicator(R.string.my_favorites, FavoritesTreeFragment.class));
if (hasGpx) {
mTabs.add(getTabIndicator(R.string.my_tracks, AvailableGPXFragment.class));
@ -92,7 +94,10 @@ public class FavoritesActivity extends TabActivity {
if (tab > mTabs.size() - 1){
tab = 0;
}
mViewPager.setCurrentItem(tab);
if(tab > 0) {
tab ++;
}
mViewPager.setCurrentItem(tab );
updateSelectedTracks();
// setupHomeButton();
}

View file

@ -178,12 +178,16 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
}
public boolean setName(String name) {
int index = file.getAbsolutePath().lastIndexOf("/") + 1;
if (index < 0) {
return false;
File directory = file.getParentFile();
String fileName = getFileName();
final String hashAndExtension;
int hashInd = fileName.lastIndexOf('_');
if (hashInd == -1) {
hashAndExtension = "_" + fileName;
} else {
hashAndExtension = fileName.substring(hashInd, fileName.length());
}
File directory = new File(file.getAbsolutePath().substring(0, index));
File to = new File(directory, name.trim());
File to = new File(directory, name+hashAndExtension);
if (file.renameTo(to)) {
file = to;
return true;
@ -198,9 +202,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
public String getName(Context ctx) {
String fileName = file.getName();
int hashInd = fileName.lastIndexOf("_");
int hashInd = fileName.lastIndexOf('_');
if (hashInd != -1) {
return fileName.substring(0, hashInd - 1);
return fileName.substring(0, hashInd);
} else if (this.isAudio()) {
return ctx.getResources().getString(R.string.audio);
} else if (this.isVideo()) {

View file

@ -4,6 +4,8 @@ import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
@ -124,11 +126,15 @@ public class NotesFragment extends ListFragment {
DirectionsDialogs.setupPopUpMenuIcon(optionsMenu);
MenuItem item;
boolean isPhoto = recording.isPhoto();
final int playIcon;
Drawable playIcon;
if (isPhoto) {
playIcon = light ? R.drawable.ic_action_eye_light : R.drawable.ic_action_eye_dark;
playIcon = getResources().getDrawable(R.drawable.ic_action_view);
if(light) {
playIcon = playIcon.mutate();
playIcon.setColorFilter(getResources().getColor(R.color.icon_color_light), Mode.MULTIPLY);
}
} else {
playIcon = light ? R.drawable.ic_play_light : R.drawable.ic_play_dark;
playIcon = getResources().getDrawable(light ? R.drawable.ic_play_light : R.drawable.ic_play_dark);
}
item = optionsMenu.getMenu().add(isPhoto ? R.string.watch : R.string.recording_context_menu_play)
.setIcon(playIcon);
@ -140,8 +146,13 @@ public class NotesFragment extends ListFragment {
}
});
Drawable showOnMap = getResources().getDrawable(R.drawable.ic_show_on_map);
if(light) {
showOnMap = showOnMap.mutate();
showOnMap.setColorFilter(getResources().getColor(R.color.icon_color_light), Mode.MULTIPLY);
}
item = optionsMenu.getMenu().add(R.string.search_shown_on_map)
.setIcon(light ? R.drawable.ic_action_map_marker_light : R.drawable.ic_action_map_marker_dark);
.setIcon(showOnMap);
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@ -213,16 +224,6 @@ public class NotesFragment extends ListFragment {
getListView(), false);
final EditText editText = (EditText) v.findViewById(R.id.name);
builder.setView(v);
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);
@ -230,7 +231,7 @@ public class NotesFragment extends ListFragment {
builder.setPositiveButton(R.string.default_buttons_apply, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if(!recording.setName(editText.getText().toString() + hash)) {
if(!recording.setName(editText.getText().toString())) {
Toast.makeText(getActivity(),R.string.rename_failed,Toast.LENGTH_SHORT).show();
}
recording.setDescription();

View file

@ -208,7 +208,7 @@ public class FileNameTranslationHelper {
return ctx.getString(R.string.index_item_world_basemap);
} else if (basename.equals("world_bitcoin_payments")) {
return ctx.getString(R.string.index_item_world_bitcoin_payments);
} else if (basename.equals("world_seamarks")) {
} else if (basename.equals("world_basemap_seamarks")) {
return ctx.getString(R.string.index_item_world_seamarks);
}
return null;

View file

@ -4,7 +4,9 @@ import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.osmand.CallbackWithObject;
import net.osmand.IndexConstants;
@ -357,9 +359,32 @@ public class GpxUiHelper {
return dlg;
}
private static List<String> getSortedGPXFilenames(File dir,String sub) {
final List<String> list = new ArrayList<String>();
readGpxDirectory(dir, list, "");
public static List<String> getSortedGPXFilenamesByDate(File dir) {
final Map<String, Long> mp = new HashMap<String, Long>();
readGpxDirectory(dir, mp, "");
ArrayList<String> list = new ArrayList<String>(mp.keySet());
Collections.sort(list, new Comparator<String>() {
@Override
public int compare(String object1, String object2) {
Long l1 = mp.get(object1);
Long l2 = mp.get(object2);
if(l2 == null) {
l2 = 0l;
}
if(l1== null) {
l1 = 0l;
}
return l1 < l2 ? 1 : (l1 == l2 ? 0 : -1);
}
});
return list;
}
public static List<String> getSortedGPXFilenames(File dir) {
final Map<String, Long> mp = new HashMap<String, Long>();
readGpxDirectory(dir, mp, "");
ArrayList<String> list = new ArrayList<String>(mp.keySet());
Collections.sort(list, new Comparator<String>() {
@Override
public int compare(String object1, String object2) {
@ -375,23 +400,20 @@ public class GpxUiHelper {
return list;
}
private static void readGpxDirectory(File dir, final List<String> list, String parent) {
private static void readGpxDirectory(File dir, final Map<String, Long> map, String parent) {
if (dir != null && dir.canRead()) {
File[] files = dir.listFiles();
if (files != null) {
for (File f : files) {
if (f.getName().toLowerCase().endsWith(".gpx")) { //$NON-NLS-1$
list.add(parent + f.getName());
map.put(parent + f.getName(), f.lastModified());
} else if (f.isDirectory()) {
readGpxDirectory(f, list, parent + f.getName() + "/");
readGpxDirectory(f, map, parent + f.getName() + "/");
}
}
}
}
}
public static List<String> getSortedGPXFilenames(File dir) {
return getSortedGPXFilenames(dir, null);
}
private static void loadGPXFileInDifferentThread(final Activity activity, final CallbackWithObject<GPXFile[]> callbackWithObject,
final File dir, final GPXFile currentFile, final String... filename) {

View file

@ -1,18 +1,21 @@
package net.osmand.plus.monitoring;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import net.osmand.IndexConstants;
import net.osmand.access.AccessibleToast;
import net.osmand.plus.GPXUtilities;
import net.osmand.plus.GPXUtilities.GPXFile;
import net.osmand.plus.GpxSelectionHelper;
import net.osmand.plus.OsmAndAppCustomization;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
import net.osmand.plus.activities.AvailableGPXFragment;
import net.osmand.plus.activities.FavoritesActivity;
import net.osmand.plus.activities.MapActivity;
@ -20,7 +23,6 @@ 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;
@ -87,8 +89,33 @@ public class DashTrackFragment extends DashBaseFragment {
private void setupGpxFiles() {
View mainView = getView();
final File dir = getMyApplication().getAppPath(IndexConstants.GPX_INDEX_DIR);
final List<String> list = GpxUiHelper.getSortedGPXFilenames(dir);
final OsmandApplication app = getMyApplication();
SavingTrackHelper savingTrackHelper = app.getSavingTrackHelper();
final List<String> list = new ArrayList<String>();
for(SelectedGpxFile sg : app.getSelectedGpxHelper().getSelectedGPXFiles() ) {
if(!sg.isShowCurrentTrack()) {
GPXFile gpxFile = sg.getGpxFile();
if(gpxFile != null) {
list.add(gpxFile.path);
}
}
}
int totalCount = 3 + list.size() / 2;
if(app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get()) {
totalCount --;
}
if(list.size() < totalCount) {
final List<String> res = GpxUiHelper.getSortedGPXFilenamesByDate(dir);
for(String r : res) {
if(!list.contains(r)) {
list.add(r);
if(list.size() >= totalCount) {
break;
}
}
}
}
if (list.size() == 0) {
(mainView.findViewById(R.id.main_fav)).setVisibility(View.GONE);
@ -99,17 +126,9 @@ public class DashTrackFragment extends DashBaseFragment {
LinearLayout tracks = (LinearLayout) mainView.findViewById(R.id.items);
tracks.removeAllViews();
if (list.size() > 3) {
while (list.size() != 3) {
list.remove(3);
}
}
final OsmandApplication app = getMyApplication();
SavingTrackHelper savingTrackHelper = app.getSavingTrackHelper();
previousRecordingState = app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get();
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);
@ -129,16 +148,8 @@ public class DashTrackFragment extends DashBaseFragment {
for (String filename : list) {
final File f = new File(dir, filename);
boolean haveInfo = false;
GpxSelectionHelper.SelectedGpxFile selectedGpxFile =
app.getSelectedGpxHelper().getSelectedFileByPath(f.getAbsolutePath());
GPXUtilities.GPXTrackAnalysis trackAnalysis = null;
if(selectedGpxFile != null) {
trackAnalysis = selectedGpxFile.getTrackAnalysis();
}
AvailableGPXFragment.GpxInfo info = new AvailableGPXFragment.GpxInfo();
info.subfolder = "";
info.setAnalysis(trackAnalysis);
info.file = f;
LayoutInflater inflater = getActivity().getLayoutInflater();

View file

@ -2,7 +2,6 @@ package net.osmand.plus.osmedit;
import java.util.List;
import android.support.v4.app.Fragment;
import net.osmand.access.AccessibleToast;
import net.osmand.data.Amenity;
import net.osmand.plus.ContextMenuAdapter;
@ -24,6 +23,7 @@ import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ArrayAdapter;
@ -178,13 +178,13 @@ public class OsmEditingPlugin extends OsmandPlugin {
if (fragment instanceof AvailableGPXFragment) {
final AvailableGPXFragment f = ((AvailableGPXFragment) fragment);
optionsMenuAdapter.item(R.string.local_index_mi_upload_gpx)
.icon(R.drawable.ic_action_gup_dark)
.icon(R.drawable.ic_action_export)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
f.openSelectionMode(R.string.local_index_mi_upload_gpx, R.drawable.ic_action_gup_dark,
R.drawable.ic_action_gup_dark, new OnClickListener() {
f.openSelectionMode(R.string.local_index_mi_upload_gpx, R.drawable.ic_action_export,
R.drawable.ic_action_export, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
List<GpxInfo> selectedItems = f.getSelectedItems();

View file

@ -22,9 +22,12 @@ import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
@ -45,9 +48,9 @@ import android.widget.TextView;
import net.osmand.plus.R;
import net.osmand.plus.helpers.FontCache;
import java.util.Locale;
@SuppressLint("NewApi")
public class PagerSlidingTabStrip extends HorizontalScrollView {
private static final float OPAQUE = 1.0f;
@ -67,7 +70,7 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
android.R.attr.textSize,
android.R.attr.textColor,
android.R.attr.paddingLeft,
android.R.attr.paddingRight,
android.R.attr.paddingRight
};
// @formatter:on
@ -99,11 +102,13 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
private Paint dividerPaint;
private int indicatorColor;
private int indicatorBgColor;
private int indicatorHeight = 2;
private int underlineHeight = 0;
private int underlineColor;
private int dividerWidth = 0;
private int dividerPadding = 0;
private int dividerColor;
@ -184,17 +189,16 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
dividerPadding = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsDividerPadding, dividerPadding);
tabPadding = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsTabPaddingLeftRight, tabPadding);
tabBackgroundResId = a.getResourceId(R.styleable.PagerSlidingTabStrip_pstsTabBackground, tabBackgroundResId);
indicatorBgColor = a.getColor(R.styleable.PagerSlidingTabStrip_pstsTabBackground, Color.TRANSPARENT);
shouldExpand = a.getBoolean(R.styleable.PagerSlidingTabStrip_pstsShouldExpand, shouldExpand);
scrollOffset = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsScrollOffset, scrollOffset);
textAllCaps = a.getBoolean(R.styleable.PagerSlidingTabStrip_pstsTextAllCaps, textAllCaps);
isPaddingMiddle = a.getBoolean(R.styleable.PagerSlidingTabStrip_pstsPaddingMiddle, isPaddingMiddle);
tabTypefaceStyle = a.getInt(R.styleable.PagerSlidingTabStrip_pstsTextStyle, Typeface.BOLD);
tabTypefaceSelectedStyle = a.getInt(R.styleable.PagerSlidingTabStrip_pstsTextSelectedStyle, Typeface.BOLD);
tabTypefaceStyle = a.getInt(R.styleable.PagerSlidingTabStrip_pstsTextStyle, Typeface.NORMAL);
tabTypefaceSelectedStyle = a.getInt(R.styleable.PagerSlidingTabStrip_pstsTextSelectedStyle, Typeface.NORMAL);
tabTextAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextAlpha, HALF_TRANSP);
tabTextSelectedAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextSelectedAlpha, OPAQUE);
if (!isInEditMode()) {
tabTypeface = FontCache.getRobotoMedium(context);
}
tabTypeface = FontCache.getRobotoMedium(context);
a.recycle();
setMarginBottomTabContainer();
@ -387,6 +391,7 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
private OnGlobalLayoutListener firstTabGlobalLayoutListener = new OnGlobalLayoutListener() {
@SuppressLint("NewApi")
@Override
public void onGlobalLayout() {
View view = tabsContainer.getChildAt(0);
@ -414,13 +419,19 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
}
final int height = getHeight();
// draw underline
if (indicatorBgColor != Color.TRANSPARENT) {
rectPaint.setColor(indicatorBgColor); // underlineColor
canvas.drawRect(padding, height - indicatorHeight, tabsContainer.getWidth() + padding, height, rectPaint);
}
// draw indicator line
rectPaint.setColor(indicatorColor);
Pair<Float, Float> lines = getIndicatorCoordinates();
rectPaint.setColor(indicatorColor); // indicatorColor
canvas.drawRect(lines.first + padding, height - indicatorHeight, lines.second + padding, height, rectPaint);
// draw underline
rectPaint.setColor(underlineColor);
rectPaint.setColor(underlineColor); //underlineColor
canvas.drawRect(padding, height - underlineHeight, tabsContainer.getWidth() + padding, height, rectPaint);
// draw divider
if (dividerWidth != 0) {
dividerPaint.setStrokeWidth(dividerWidth);