Merge branch 'master' of ssh://github.com/osmandapp/Osmand
This commit is contained in:
commit
a6a2324640
9 changed files with 154 additions and 198 deletions
|
@ -418,8 +418,8 @@
|
|||
<string name="unknown_location">Posizione non ancora conosciuta</string>
|
||||
<string name="download_files">Download</string>
|
||||
<string name="context_menu_item_search_transport">Ricerca trasporti pubblici</string>
|
||||
<string name="transport_searching_transport">Risultati trasporti pubblici (nessun obiettivo):</string>
|
||||
<string name="transport_searching_route">Risultati trasporti pubblici ({0} a obiettivo):</string>
|
||||
<string name="transport_searching_transport">Risultati trasporti pubblici (nessuna destinazione):</string>
|
||||
<string name="transport_searching_route">Risultati trasporti pubblici ({0} a destinazione):</string>
|
||||
<string name="transport_search_none">nessuno</string>
|
||||
<string name="transport_search_again">Reimposta la ricerca dei trasporti pubblici</string>
|
||||
<string name="map_index">Mappa</string>
|
||||
|
@ -1953,7 +1953,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
|
|||
<string name="arrival_distance_factor_at_last">Negli ultimi metri</string>
|
||||
<string name="hide_all_waypoints">Cancellali tutti</string>
|
||||
<string name="av_camera_pic_size">Dimensione foto</string>
|
||||
<string name="av_camera_pic_size_descr">Seleziona la dimensione delle foto scattate</string>
|
||||
<string name="av_camera_pic_size_descr">Seleziona la dimensione delle foto scattate con la fotocamera interna</string>
|
||||
<string name="announce_nearby_favorites">Annuncia i preferiti nelle vicinanze</string>
|
||||
<string name="rendering_value_browse_map_name">Esplorazione mappa</string>
|
||||
<string name="rendering_value_car_name">Automobile</string>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources><string name="installing_new_resources">新しいデータを展開中…</string>
|
||||
<string name="internet_connection_required_for_online_route">オンライン経路案内を使用しようとしていますが
|
||||
インターネット接続されていません。</string>
|
||||
|
@ -899,7 +899,7 @@ POIの更新は利用できません</string>
|
|||
<string name="safe_mode_description">セーフモード(遅いAndroidの代わりにネイティブコード)でアプリケーションを実行します。</string>
|
||||
<string name="safe_mode">セーフモード</string>
|
||||
<string name="native_library_not_running">アプリケーションは、セーフモードで実行されています(設定で無効にできます)</string>
|
||||
<string name="background_service_is_enabled_question">OsmAndのスリープモードサービス(スリープ状態での実行)がオンになっています。オフにしますか?</string>
|
||||
<string name="background_service_is_enabled_question">OsmAndのスリープモードになっています。停止しますか?</string>
|
||||
<string name="zxing_barcode_scanner_not_found">ZXingバーコードスキャナアプリケーションがインストールされていません。マーケットで検索しますか?</string>
|
||||
<string name="rendering_attr_roadColors_description">道路の配色を選択します:</string>
|
||||
<string name="rendering_attr_roadColors_name">道路の配色</string>
|
||||
|
@ -1768,7 +1768,7 @@ OsmAndはオープンソースであり、活発に開発が進められいま
|
|||
<string name="keep_navigation_service">続行</string>
|
||||
<string name="enable_sleep_mode">GPSスリープモードを有効</string>
|
||||
<string name="gps_wake_up_timer">GPS呼び出し間隔</string>
|
||||
<string name="sleep_mode_stop_dialog">GPSのスリープモード移行を無効化しますか?</string>
|
||||
<string name="sleep_mode_stop_dialog">GPSのスリープモードを停止しますか?</string>
|
||||
<string name="map_preferred_locale_descr">地図上の名称の優先言語(利用できない場合は、英語またはローカル名に切り替わります)</string>
|
||||
<string name="map_preferred_locale">地名等の優先言語</string>
|
||||
<string name="local_map_names">その国での名称</string>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1924,4 +1924,5 @@ Seznam držav (praktično ves svet!): Afganistan, Albanija, Alžirija, Andora, A
|
|||
<string name="speak_poi">Napovej POI</string>
|
||||
<string name="rendering_value_browse_map_name">Brskaj zemljevid</string>
|
||||
<string name="rendering_attr_alpineHiking_description">Prikaz stez po SAC lestvici</string>
|
||||
<string name="pause_navigation">Zaustavi navigacijo</string>
|
||||
</resources>
|
||||
|
|
|
@ -2,26 +2,26 @@
|
|||
<resources>
|
||||
<string name="next_stage">Next Stage</string>
|
||||
<string name="restart_stage">Start over</string>
|
||||
<string name="stage_is_completed_short">Completed</string>
|
||||
<string name="stage_is_completed_short">Stage Statistics</string>
|
||||
<string name="stage_is_completed">Stage is completed</string>
|
||||
<string name="complete_stage">Complete Stage</string>
|
||||
<string name="show_waypoint_information">About waypoint</string>
|
||||
<string name="sherpafy_public_access">Public access</string>
|
||||
<string name="start_new_stage">Do you want to interrupt current stage and start new ?</string>
|
||||
<string name="enter_access_code">Enter access code for a specific tour (optional)</string>
|
||||
<string name="sherpafy_stage_tab_fav">Fav</string>
|
||||
<string name="sherpafy_stage_tab_target">Target</string>
|
||||
<string name="sherpafy_stage_tab_route">Route</string>
|
||||
<string name="sherpafy_stage_tab_fav">List</string>
|
||||
<string name="sherpafy_stage_tab_target">Hotel</string>
|
||||
<string name="sherpafy_stage_tab_route">Map</string>
|
||||
<string name="sherpafy_stage_tab_info">Info</string>
|
||||
<string name="sherpafy_tour_info_txt">Tour Information</string>
|
||||
<string name="sherpafy_tour_info_txt">Important Info</string>
|
||||
<string name="sherpafy_stages_txt">Stages</string>
|
||||
<string name="sherpafy_instructions">Instructions</string>
|
||||
<string name="sherpafy_instructions_desr">Please read before start</string>
|
||||
<string name="sherpafy_instructions">Tour Information</string>
|
||||
<string name="sherpafy_instructions_desr">Key facts and contact info</string>
|
||||
<string name="sherpafy_overview">Overview</string>
|
||||
<string name="sherpafy_overview_desr">About your tour</string>
|
||||
<string name="sherpafy_gallery">Gallery</string>
|
||||
<string name="sherpafy_gallery_descr">Pictures of your tour</string>
|
||||
<string name="sherpafy_more_information">MORE INFORMATION</string>
|
||||
<string name="sherpafy_more_information">GO TO TOUR</string>
|
||||
<string name="sherpafy_continue_stage">Continue</string>
|
||||
<string name="sherpafy_start_stage">Start</string>
|
||||
<string name="sherpafy_download_tours">Download Tours</string>
|
||||
|
|
|
@ -760,7 +760,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
final OsmandMapTileView mapView = mapActivity.getMapView();
|
||||
final OsmandApplication app = mapActivity.getMyApplication();
|
||||
ContextMenuAdapter optionsMenuHelper = new ContextMenuAdapter(app);
|
||||
|
||||
|
||||
// 1. Where am I
|
||||
optionsMenuHelper.item(R.string.where_am_i).
|
||||
icons(R.drawable.ic_action_gloc_dark, R.drawable.ic_action_gloc_light)
|
||||
|
@ -958,6 +958,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
}).reg();
|
||||
}
|
||||
}
|
||||
|
||||
OsmandPlugin.registerOptionsMenu(mapActivity, optionsMenuHelper);
|
||||
optionsMenuHelper.item(R.string.exit_Button).icons(R.drawable.ic_action_quit_dark, R.drawable.ic_action_quit_light )
|
||||
.listen(new OnContextMenuClick() {
|
||||
|
@ -972,6 +973,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
// app.closeApplication(mapActivity);
|
||||
}
|
||||
}).reg();
|
||||
|
||||
getMyApplication().getAppCustomization().prepareOptionsMenu(mapActivity, optionsMenuHelper);
|
||||
return optionsMenuHelper;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import android.widget.Toast;
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.Location;
|
||||
|
@ -33,6 +34,7 @@ import net.osmand.plus.activities.DownloadIndexActivity;
|
|||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.MapActivityLayers;
|
||||
import net.osmand.plus.activities.SelectedGPXFragment;
|
||||
import net.osmand.plus.activities.actions.ShareLocation;
|
||||
import net.osmand.plus.api.FileSettingsAPIImpl;
|
||||
import net.osmand.plus.api.SettingsAPI;
|
||||
import net.osmand.plus.download.DownloadActivityType;
|
||||
|
@ -519,13 +521,13 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
|||
|
||||
@Override
|
||||
public void prepareOptionsMenu(final MapActivity mapActivity, ContextMenuAdapter adapter) {
|
||||
filter(adapter, R.string.exit_Button, R.string.menu_layers,
|
||||
filter(adapter, R.string.menu_layers,
|
||||
R.string.pause_navigation, R.string.continue_navigation,
|
||||
R.string.cancel_navigation, R.string.cancel_route, R.string.clear_destination,
|
||||
R.string.target_points,
|
||||
R.string.get_directions,
|
||||
R.string.menu_mute_on, R.string.menu_mute_off,
|
||||
R.string.where_am_i);
|
||||
R.string.where_am_i, R.string.context_menu_item_share_location);
|
||||
final StageInformation stage = getSelectedStage();
|
||||
if (stage != null && !isStageVisited(stage.order)) {
|
||||
adapter.item(R.string.complete_stage)
|
||||
|
@ -538,7 +540,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
|||
}
|
||||
}).reg();
|
||||
}
|
||||
adapter.item(R.string.sherpafy_tour_info_txt).icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light ).position(adapter.length() - 1)
|
||||
adapter.item(R.string.sherpafy_tour_info_txt).icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light).position(adapter.length() - 1)
|
||||
.listen(new OnContextMenuClick() {
|
||||
@Override
|
||||
public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
|
||||
|
@ -546,7 +548,21 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
|||
// newIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
mapActivity.startActivity(newIntent);
|
||||
}
|
||||
}).reg();
|
||||
}).reg();
|
||||
|
||||
//share my location
|
||||
adapter.item(R.string.context_menu_item_share_location).icons(
|
||||
R.drawable.ic_action_gshare_dark, R.drawable.ic_action_gshare_light).listen(new OnContextMenuClick() {
|
||||
@Override
|
||||
public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
|
||||
if (app.getLocationProvider().getLastKnownLocation() != null) {
|
||||
new ShareLocation(mapActivity).run();
|
||||
} else {
|
||||
Toast.makeText(app, R.string.unknown_location, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}).reg();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -595,7 +611,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
|||
|
||||
@Override
|
||||
public void createLayers(OsmandMapTileView mapView, MapActivity activity) {
|
||||
mapView.addLayer(new StageFavoritesLayer(this), 4.1f);
|
||||
mapView.addLayer(new StageFavoritesLayer(app), 4.1f);
|
||||
}
|
||||
|
||||
public boolean isWaypointGroupVisible(int waypointType, RouteCalculationResult route) {
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
package net.osmand.plus.sherpafy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.data.FavouritePoint;
|
||||
import android.graphics.PointF;
|
||||
import net.osmand.data.LocationPoint;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.sherpafy.TourInformation.StageFavorite;
|
||||
import net.osmand.plus.views.FavoritesLayer;
|
||||
|
||||
public class StageFavoritesLayer extends FavoritesLayer {
|
||||
|
||||
private SherpafyCustomization customization;
|
||||
private OsmandApplication app;
|
||||
|
||||
public StageFavoritesLayer(SherpafyCustomization customization){
|
||||
this.customization = customization;
|
||||
public StageFavoritesLayer(OsmandApplication app){
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
protected Class<? extends LocationPoint> getFavoriteClass() {
|
||||
|
@ -26,10 +29,22 @@ public class StageFavoritesLayer extends FavoritesLayer {
|
|||
}
|
||||
|
||||
protected List<? extends LocationPoint> getPoints() {
|
||||
List<StageFavorite> fs = customization.getWaypoints();
|
||||
List<StageFavorite> fs = ((SherpafyCustomization)app.getAppCustomization()).getWaypoints();
|
||||
if(fs == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return fs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSingleTap(PointF point, RotatedTileBox tileBox) {
|
||||
List<LocationPoint> favs = new ArrayList<LocationPoint>();
|
||||
getFavoriteFromPoint(tileBox, point, favs);
|
||||
if (favs.size() > 0){
|
||||
SherpafyCustomization customization = (SherpafyCustomization) app.getAppCustomization();
|
||||
customization.showFavoriteDialog(app.getMapActivity(), customization.getSelectedStage(), (StageFavorite)favs.get(0) );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -406,17 +406,6 @@ public class TourViewActivity extends SherlockFragmentActivity {
|
|||
public void startStage(final StageInformation stage) {
|
||||
if(customization.isStageVisited(stage.getOrder()) /*&& stage.getTour() == customization.getSelectedTour()*/) {
|
||||
customization.showCompleteStageFragment(this, stage, true);
|
||||
} else if (stage != customization.getSelectedStage() && customization.getSelectedStage() != null) {
|
||||
Builder bld = new AlertDialog.Builder(this);
|
||||
bld.setMessage(R.string.start_new_stage);
|
||||
bld.setPositiveButton(R.string.default_buttons_yes, new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
customization.runStage(TourViewActivity.this, stage.getTour(), stage, customization.getSelectedStage() != stage);
|
||||
}
|
||||
});
|
||||
bld.setNegativeButton(R.string.default_buttons_no, null);
|
||||
bld.show();
|
||||
} else {
|
||||
customization.runStage(TourViewActivity.this, stage.getTour(), stage, customization.getSelectedStage() != stage);
|
||||
}
|
||||
|
@ -424,20 +413,7 @@ public class TourViewActivity extends SherlockFragmentActivity {
|
|||
|
||||
|
||||
public void startTour(final TourInformation tour) {
|
||||
if (tour != customization.getSelectedTour() && customization.getSelectedTour() != null) {
|
||||
Builder bld = new AlertDialog.Builder(this);
|
||||
bld.setMessage(R.string.start_new_stage);
|
||||
bld.setPositiveButton(R.string.default_buttons_yes, new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
startTourImpl(tour);
|
||||
}
|
||||
});
|
||||
bld.setNegativeButton(R.string.default_buttons_no, null);
|
||||
bld.show();
|
||||
} else {
|
||||
startTourImpl(tour);
|
||||
}
|
||||
startTourImpl(tour);
|
||||
}
|
||||
|
||||
private void startTourImpl(TourInformation tour) {
|
||||
|
|
Loading…
Reference in a new issue