Merge branch 'master' of ssh://github.com/osmandapp/Osmand into alex_fixes
# Conflicts: # OsmAnd/res/values-da/strings.xml # OsmAnd/res/values-es-rAR/strings.xml # OsmAnd/res/values-es-rUS/strings.xml # OsmAnd/res/values-zh-rTW/strings.xml
This commit is contained in:
commit
cd5b3875a3
12 changed files with 315 additions and 311 deletions
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><resources>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="app_mode_bus">Bus</string>
|
||||
<string name="app_mode_train">Ćah</string>
|
||||
<string name="map_widget_battery">Staw baterije</string>
|
||||
|
@ -903,4 +904,4 @@
|
|||
<string name="storage_directory_card">Składowanska karta</string>
|
||||
<string name="coords_format">Format koordinatow</string>
|
||||
<string name="coords_format_descr">Format za geografiske koordinaty</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
@ -2799,10 +2799,10 @@ Tidligere destination bliver sidste mellemliggende punkt.</string>
|
|||
\n
|
||||
\n • Lineal modul til afstandsmåling
|
||||
\n
|
||||
\n• GPX split intervaller med detaljeret info om spor
|
||||
\n • GPX split intervaller med detaljeret info om spor
|
||||
\n
|
||||
\n • Andre forbedringer og fejlrettelser
|
||||
\n
|
||||
\n</string>
|
||||
<string name="rendering_value_translucent_pink_name">Gennemsigtig pink</string>
|
||||
<string name="rendering_value_translucent_pink_name">Gennemsigtig lyserød</string>
|
||||
</resources>
|
||||
|
|
|
@ -2093,7 +2093,7 @@
|
|||
<string name="poi_clothes_denim">De mezclilla (vaqueros/jeans)</string>
|
||||
<string name="poi_historic_milestone">Hito histórico</string>
|
||||
|
||||
<string name="poi_shoes_children">De niños</string>
|
||||
<string name="poi_shoes_children">Infantil</string>
|
||||
<string name="poi_shoes_women">Femenino</string>
|
||||
<string name="poi_shoes_sport">Deportivo</string>
|
||||
<string name="poi_shoes_men">Masculino</string>
|
||||
|
@ -3079,7 +3079,7 @@
|
|||
<string name="poi_shoes_type">Tipo de calzado</string>
|
||||
<string name="poi_fire_hydrant_type">Tipo de hidrante</string>
|
||||
<string name="poi_fire_hydrant_position">Ubicación del hidrante</string>
|
||||
<string name="poi_fire_hydrant_water_source">Fuente del agua</string>
|
||||
<string name="poi_fire_hydrant_water_source">Origen del agua</string>
|
||||
<string name="poi_payment_toll_type">Forma de pago (peaje)</string>
|
||||
<string name="poi_traffic_signals_sound">Sonoro</string>
|
||||
<string name="poi_highway_crossing_type">Tipo de cruce</string>
|
||||
|
|
|
@ -2678,7 +2678,7 @@ Proporciona un código completo</string>
|
|||
|
||||
<string name="range_min_max">Rango = Min/Máx</string>
|
||||
<string name="min_max">Min/Máx</string>
|
||||
<string name="release_2_7">\\u2022 Complemento de Mapillary con imágenes a nivel de calle
|
||||
<string name="release_2_7">• Complemento de Mapillary con imágenes a nivel de calle
|
||||
\n
|
||||
\n • Control de regla para medir distancias
|
||||
\n
|
||||
|
|
|
@ -1927,7 +1927,7 @@
|
|||
<string name="poi_clothes_military">Militar</string>
|
||||
<string name="poi_clothes_denim">De mezclilla (vaqueros/jeans)</string>
|
||||
<string name="poi_historic_milestone">Hito histórico</string>
|
||||
<string name="poi_shoes_children">De niños</string>
|
||||
<string name="poi_shoes_children">Infantil</string>
|
||||
<string name="poi_shoes_women">Femenino</string>
|
||||
<string name="poi_shoes_sport">Deportivo</string>
|
||||
<string name="poi_shoes_men">Masculino</string>
|
||||
|
@ -2842,7 +2842,7 @@
|
|||
<string name="poi_shoes_type">Tipo de calzado</string>
|
||||
<string name="poi_fire_hydrant_type">Tipo de hidrante</string>
|
||||
<string name="poi_fire_hydrant_position">Ubicación del hidrante</string>
|
||||
<string name="poi_fire_hydrant_water_source">Fuente del agua</string>
|
||||
<string name="poi_fire_hydrant_water_source">Origen del agua</string>
|
||||
<string name="poi_payment_toll_type">Forma de pago (peaje)</string>
|
||||
<string name="poi_traffic_signals_sound">Sonoro</string>
|
||||
<string name="poi_highway_crossing_type">Tipo de cruce</string>
|
||||
|
|
|
@ -2679,7 +2679,7 @@ Proporciona un código completo</string>
|
|||
|
||||
<string name="range_min_max">Rango = Min/Máx</string>
|
||||
<string name="min_max">Min/Máx</string>
|
||||
<string name="release_2_7">\\u2022 Complemento de Mapillary con imágenes a nivel de calle
|
||||
<string name="release_2_7">• Complemento de Mapillary con imágenes a nivel de calle
|
||||
\n
|
||||
\n • Control de regla para medir distancias
|
||||
\n
|
||||
|
|
|
@ -944,7 +944,7 @@ Fonctionnalités principales :
|
|||
<string name="target_point">Étape %1$s</string>
|
||||
<string name="target_points">Itinéraire</string>
|
||||
<string name="intermediate_point_too_far">Étape %1$s trop éloignée de la route la plus proche.</string>
|
||||
<string name="arrived_at_intermediate_point">Vous avez atteint l\'étape intermédiaire</string>
|
||||
<string name="arrived_at_intermediate_point">Vous êtes arrivés à l\'étape intermédiaire</string>
|
||||
<string name="context_menu_item_intermediate_point">Ajouter comme étape</string>
|
||||
<string name="map_widget_intermediate_distance">Étape</string>
|
||||
<string name="ending_point_too_far">Point d\'arrivée trop éloigné de la route la plus proche.</string>
|
||||
|
@ -2848,4 +2848,5 @@ Fonctionnalités principales :
|
|||
<string name="of">%1$d de %2$d</string>
|
||||
<string name="moving_time">Durée de déplacement</string>
|
||||
<string name="min_max">Min / Max</string>
|
||||
<string name="rendering_value_translucent_pink_name">Rose translucide</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><resources>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="shared_string_no">לא</string>
|
||||
<string name="shared_string_yes">כן</string>
|
||||
<string name="close_changeset">סגירת ערכת השינויים</string>
|
||||
|
@ -1199,4 +1200,17 @@
|
|||
<string name="osm_live_enter_email">נא להזין כתובת דוא״ל חוקית</string>
|
||||
<string name="osm_live_enter_user_name">נא להזין שם פומבי</string>
|
||||
<string name="osm_live_month_cost_desc">תשלום חודשי</string>
|
||||
</resources>
|
||||
<string name="store_tracks_in_monthly_directories">אחסון המסלולים המוקלטים בתיקיות לפי חודש</string>
|
||||
<string name="shared_string_reset">איפוס</string>
|
||||
<string name="shared_string_reload">רענון</string>
|
||||
<string name="mapillary_menu_descr_tile_cache">יש לרענן את האריחים כדי לראות מידע עדכני.</string>
|
||||
<string name="mapillary_menu_title_tile_cache">מטמון האריחים</string>
|
||||
<string name="wrong_user_name">שם המשתמש שגוי!</string>
|
||||
<string name="shared_string_to">עד</string>
|
||||
<string name="mapillary_menu_date_from">מ־</string>
|
||||
<string name="mapillary_menu_descr_dates">הצגת תמונות שנוספו בתקופה מסוימת.</string>
|
||||
<string name="mapillary_menu_title_dates">תאריכים</string>
|
||||
<string name="mapillary_menu_edit_text_hint">הקלדת שם משתמש</string>
|
||||
<string name="mapillary_menu_descr_username">הצגת תמונות שנוספו על ידי משתמש מסוים.</string>
|
||||
<string name="mapillary_menu_title_username">שם משתמש</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><resources>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<string name="rendering_attr_roadColors_description">Velg fargeskjema for veier:</string>
|
||||
<string name="rendering_attr_roadColors_name">Veifargeskjema</string>
|
||||
<string name="map_widget_show_destination_arrow">Vis retning til målet</string>
|
||||
|
@ -353,7 +354,7 @@
|
|||
|
||||
<string name="shared_string_select_all">Velg alle</string>
|
||||
<string name="fast_route_mode">Raskeste rute</string>
|
||||
<string name="fast_route_mode_descr">"Aktiver for å beregne raskeste rute eller deaktiver for drivstoffbesparende rute "</string>
|
||||
<string name="fast_route_mode_descr">Aktiver for å beregne raskeste rute eller deaktiver for drivstoffbesparende rute</string>
|
||||
<string name="tiles_to_download_estimated_size">Ved zoom {0} last ned {1} fliser ({2} MB)</string>
|
||||
<string name="shared_string_download_map">Last ned kart</string>
|
||||
<string name="renderers">Vektor-opptegning</string>
|
||||
|
@ -1868,7 +1869,7 @@
|
|||
<string name="trip_rec_notification_settings">Turopptak (ingen data)</string>
|
||||
<string name="trip_rec_notification_settings_desc">Vis merknader som lar deg starte en tur ved å trykke opptaksknappen</string>
|
||||
<string name="save_track_min_speed">Minimumshastighet for logging</string>
|
||||
<string name="save_track_min_speed_descr">Still inn minimumshastighet for at et punkt skal logges</string>
|
||||
<string name="save_track_min_speed_descr">Filter: Still inn minimumshastighet for at et punkt skal logges</string>
|
||||
<string name="save_track_min_distance">Logging ved bevegelsesoppdagelse</string>
|
||||
<string name="save_track_min_distance_descr">Angi minste avstand fra siste posisjon for at et punkt skal logges</string>
|
||||
<string name="save_track_precision">Minste loggingspresisjon</string>
|
||||
|
@ -2280,4 +2281,5 @@ Representerer området: %1$s x %2$s</string>
|
|||
<string name="mapillary_menu_title_dates">Datoer</string>
|
||||
<string name="mapillary_menu_edit_text_hint">Skriv inn brukernavn</string>
|
||||
<string name="mapillary_menu_title_username">Brukernavn</string>
|
||||
</resources>
|
||||
<string name="shared_string_reset">Tilbakestill</string>
|
||||
</resources>
|
||||
|
|
|
@ -2708,6 +2708,6 @@ Pro praghere iscrie su còdighe intreu</string>
|
|||
\n
|
||||
\n</string>
|
||||
<string name="rendering_value_translucent_pink_name">Rosa translùtzidu</string>
|
||||
<string name="average">Mesanu/mèdiu</string>
|
||||
<string name="average">Mèdiu</string>
|
||||
<string name="ascent_descent">Ascendente/Discendente</string>
|
||||
</resources>
|
||||
|
|
|
@ -2787,7 +2787,7 @@ OsmAnd (Automated Navigation Directions) 是一個地圖和導航的應用程式
|
|||
|
||||
<string name="range_min_max">範圍 = 最小/最大</string>
|
||||
<string name="min_max">最小/最大</string>
|
||||
<string name="release_2_7">\\u2022 Mapillary 外掛元件與街道級影像
|
||||
<string name="release_2_7">\\u2022 Mapillary 外掛元件與街道等級影像
|
||||
\n
|
||||
\n • 用於距離測量的尺規小工具
|
||||
\n
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package net.osmand.plus.quickaction;
|
||||
|
||||
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.StringRes;
|
||||
|
||||
|
@ -42,76 +41,65 @@ import java.util.List;
|
|||
|
||||
public class QuickActionFactory {
|
||||
|
||||
public String quickActionListToString(List<QuickAction> quickActions) {
|
||||
|
||||
public String quickActionListToString(List<QuickAction> quickActions) {
|
||||
return new Gson().toJson(quickActions);
|
||||
}
|
||||
}
|
||||
|
||||
public List<QuickAction> parseActiveActionsList(String json) {
|
||||
public List<QuickAction> parseActiveActionsList(String json) {
|
||||
Type type = new TypeToken<List<QuickAction>>() {
|
||||
}.getType();
|
||||
ArrayList<QuickAction> quickActions = new Gson().fromJson(json, type);
|
||||
return quickActions != null ? quickActions : new ArrayList<QuickAction>();
|
||||
}
|
||||
|
||||
Type type = new TypeToken<List<QuickAction>>() {
|
||||
}.getType();
|
||||
ArrayList<QuickAction> quickActions = new Gson().fromJson(json, type);
|
||||
public static List<QuickAction> produceTypeActionsListWithHeaders(List<QuickAction> active) {
|
||||
ArrayList<QuickAction> quickActions = new ArrayList<>();
|
||||
quickActions.add(new QuickAction(0, R.string.quick_action_add_create_items));
|
||||
quickActions.add(new FavoriteAction());
|
||||
quickActions.add(new GPXAction());
|
||||
QuickAction marker = new MarkerAction();
|
||||
|
||||
return quickActions != null ? quickActions : new ArrayList<QuickAction>();
|
||||
}
|
||||
if (!marker.hasInstanceInList(active)) {
|
||||
quickActions.add(marker);
|
||||
}
|
||||
|
||||
public static List<QuickAction> produceTypeActionsListWithHeaders(List<QuickAction> active) {
|
||||
if (OsmandPlugin.getEnabledPlugin(AudioVideoNotesPlugin.class) != null) {
|
||||
QuickAction audio = new TakeAudioNoteAction();
|
||||
QuickAction photo = new TakePhotoNoteAction();
|
||||
QuickAction video = new TakeVideoNoteAction();
|
||||
|
||||
ArrayList<QuickAction> quickActions = new ArrayList<>();
|
||||
if (!audio.hasInstanceInList(active)) {
|
||||
quickActions.add(audio);
|
||||
}
|
||||
|
||||
quickActions.add(new QuickAction(0, R.string.quick_action_add_create_items));
|
||||
quickActions.add(new FavoriteAction());
|
||||
quickActions.add(new GPXAction());
|
||||
if (!photo.hasInstanceInList(active)) {
|
||||
quickActions.add(photo);
|
||||
}
|
||||
|
||||
QuickAction marker = new MarkerAction();
|
||||
if (!video.hasInstanceInList(active)) {
|
||||
quickActions.add(video);
|
||||
}
|
||||
}
|
||||
|
||||
if (!marker.hasInstanceInList(active)) {
|
||||
quickActions.add(marker);
|
||||
}
|
||||
if (OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class) != null) {
|
||||
quickActions.add(new AddPOIAction());
|
||||
quickActions.add(new AddOSMBugAction());
|
||||
}
|
||||
|
||||
if (OsmandPlugin.getEnabledPlugin(AudioVideoNotesPlugin.class) != null) {
|
||||
if (OsmandPlugin.getEnabledPlugin(ParkingPositionPlugin.class) != null) {
|
||||
QuickAction parking = new ParkingAction();
|
||||
if (!parking.hasInstanceInList(active)) {
|
||||
quickActions.add(parking);
|
||||
}
|
||||
}
|
||||
|
||||
QuickAction audio = new TakeAudioNoteAction();
|
||||
QuickAction photo = new TakePhotoNoteAction();
|
||||
QuickAction video = new TakeVideoNoteAction();
|
||||
|
||||
if (!audio.hasInstanceInList(active)) {
|
||||
quickActions.add(audio);
|
||||
}
|
||||
|
||||
if (!photo.hasInstanceInList(active)) {
|
||||
quickActions.add(photo);
|
||||
}
|
||||
|
||||
if (!video.hasInstanceInList(active)) {
|
||||
quickActions.add(video);
|
||||
}
|
||||
}
|
||||
|
||||
if (OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class) != null) {
|
||||
quickActions.add(new AddPOIAction());
|
||||
quickActions.add(new AddOSMBugAction());
|
||||
}
|
||||
|
||||
if (OsmandPlugin.getEnabledPlugin(ParkingPositionPlugin.class) != null) {
|
||||
|
||||
QuickAction parking = new ParkingAction();
|
||||
|
||||
if (!parking.hasInstanceInList(active)) {
|
||||
quickActions.add(parking);
|
||||
}
|
||||
}
|
||||
|
||||
quickActions.add(new QuickAction(0, R.string.quick_action_add_configure_map));
|
||||
|
||||
QuickAction favorites = new ShowHideFavoritesAction();
|
||||
if (!favorites.hasInstanceInList(active)) {
|
||||
quickActions.add(favorites);
|
||||
}
|
||||
|
||||
quickActions.add(new ShowHidePoiAction());
|
||||
quickActions.add(new QuickAction(0, R.string.quick_action_add_configure_map));
|
||||
|
||||
QuickAction favorites = new ShowHideFavoritesAction();
|
||||
if (!favorites.hasInstanceInList(active)) {
|
||||
quickActions.add(favorites);
|
||||
}
|
||||
quickActions.add(new ShowHidePoiAction());
|
||||
if (OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class) != null) {
|
||||
QuickAction showHideOSMBugAction = new ShowHideOSMBugAction();
|
||||
if (!showHideOSMBugAction.hasInstanceInList(active)) {
|
||||
|
@ -120,15 +108,13 @@ public class QuickActionFactory {
|
|||
}
|
||||
|
||||
quickActions.add(new MapStyleAction());
|
||||
if (OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) != null) {
|
||||
quickActions.add(new MapSourceAction());
|
||||
quickActions.add(new MapOverlayAction());
|
||||
quickActions.add(new MapUnderlayAction());
|
||||
}
|
||||
|
||||
if (OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) != null) {
|
||||
|
||||
quickActions.add(new MapSourceAction());
|
||||
quickActions.add(new MapOverlayAction());
|
||||
quickActions.add(new MapUnderlayAction());
|
||||
}
|
||||
|
||||
QuickAction voice = new NavVoiceAction();
|
||||
QuickAction voice = new NavVoiceAction();
|
||||
QuickAction addDestination = new NavAddDestinationAction();
|
||||
QuickAction addFirstIntermediate = new NavAddFirstIntermediateAction();
|
||||
QuickAction replaceDestination = new NavReplaceDestinationAction();
|
||||
|
@ -136,9 +122,9 @@ public class QuickActionFactory {
|
|||
|
||||
ArrayList<QuickAction> navigationQuickActions = new ArrayList<>();
|
||||
|
||||
if (!voice.hasInstanceInList(active)) {
|
||||
navigationQuickActions.add(voice);
|
||||
}
|
||||
if (!voice.hasInstanceInList(active)) {
|
||||
navigationQuickActions.add(voice);
|
||||
}
|
||||
if (!addDestination.hasInstanceInList(active)) {
|
||||
navigationQuickActions.add(addDestination);
|
||||
}
|
||||
|
@ -157,331 +143,331 @@ public class QuickActionFactory {
|
|||
quickActions.addAll(navigationQuickActions);
|
||||
}
|
||||
|
||||
|
||||
return quickActions;
|
||||
}
|
||||
}
|
||||
|
||||
public static QuickAction newActionByType(int type) {
|
||||
public static QuickAction newActionByType(int type) {
|
||||
|
||||
switch (type) {
|
||||
switch (type) {
|
||||
|
||||
case NewAction.TYPE:
|
||||
return new NewAction();
|
||||
case NewAction.TYPE:
|
||||
return new NewAction();
|
||||
|
||||
case MarkerAction.TYPE:
|
||||
return new MarkerAction();
|
||||
case MarkerAction.TYPE:
|
||||
return new MarkerAction();
|
||||
|
||||
case FavoriteAction.TYPE:
|
||||
return new FavoriteAction();
|
||||
case FavoriteAction.TYPE:
|
||||
return new FavoriteAction();
|
||||
|
||||
case ShowHideFavoritesAction.TYPE:
|
||||
return new ShowHideFavoritesAction();
|
||||
case ShowHideFavoritesAction.TYPE:
|
||||
return new ShowHideFavoritesAction();
|
||||
|
||||
case ShowHidePoiAction.TYPE:
|
||||
return new ShowHidePoiAction();
|
||||
case ShowHidePoiAction.TYPE:
|
||||
return new ShowHidePoiAction();
|
||||
|
||||
case GPXAction.TYPE:
|
||||
return new GPXAction();
|
||||
case GPXAction.TYPE:
|
||||
return new GPXAction();
|
||||
|
||||
case ParkingAction.TYPE:
|
||||
return new ParkingAction();
|
||||
case ParkingAction.TYPE:
|
||||
return new ParkingAction();
|
||||
|
||||
case TakeAudioNoteAction.TYPE:
|
||||
return new TakeAudioNoteAction();
|
||||
case TakeAudioNoteAction.TYPE:
|
||||
return new TakeAudioNoteAction();
|
||||
|
||||
case TakePhotoNoteAction.TYPE:
|
||||
return new TakePhotoNoteAction();
|
||||
case TakePhotoNoteAction.TYPE:
|
||||
return new TakePhotoNoteAction();
|
||||
|
||||
case TakeVideoNoteAction.TYPE:
|
||||
return new TakeVideoNoteAction();
|
||||
case TakeVideoNoteAction.TYPE:
|
||||
return new TakeVideoNoteAction();
|
||||
|
||||
case NavVoiceAction.TYPE:
|
||||
return new NavVoiceAction();
|
||||
case NavVoiceAction.TYPE:
|
||||
return new NavVoiceAction();
|
||||
|
||||
case ShowHideOSMBugAction.TYPE:
|
||||
return new ShowHideOSMBugAction();
|
||||
case ShowHideOSMBugAction.TYPE:
|
||||
return new ShowHideOSMBugAction();
|
||||
|
||||
case AddOSMBugAction.TYPE:
|
||||
return new AddOSMBugAction();
|
||||
case AddOSMBugAction.TYPE:
|
||||
return new AddOSMBugAction();
|
||||
|
||||
case AddPOIAction.TYPE:
|
||||
return new AddPOIAction();
|
||||
case AddPOIAction.TYPE:
|
||||
return new AddPOIAction();
|
||||
|
||||
case MapStyleAction.TYPE:
|
||||
return new MapStyleAction();
|
||||
case MapStyleAction.TYPE:
|
||||
return new MapStyleAction();
|
||||
|
||||
case MapSourceAction.TYPE:
|
||||
return new MapSourceAction();
|
||||
case MapSourceAction.TYPE:
|
||||
return new MapSourceAction();
|
||||
|
||||
case MapOverlayAction.TYPE:
|
||||
return new MapOverlayAction();
|
||||
case MapOverlayAction.TYPE:
|
||||
return new MapOverlayAction();
|
||||
|
||||
case MapUnderlayAction.TYPE:
|
||||
return new MapUnderlayAction();
|
||||
case MapUnderlayAction.TYPE:
|
||||
return new MapUnderlayAction();
|
||||
|
||||
case NavAddDestinationAction.TYPE:
|
||||
return new NavAddDestinationAction();
|
||||
case NavAddDestinationAction.TYPE:
|
||||
return new NavAddDestinationAction();
|
||||
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
return new NavAddFirstIntermediateAction();
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
return new NavAddFirstIntermediateAction();
|
||||
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
return new NavReplaceDestinationAction();
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
return new NavReplaceDestinationAction();
|
||||
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
return new NavAutoZoomMapAction();
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
return new NavAutoZoomMapAction();
|
||||
|
||||
default:
|
||||
return new QuickAction();
|
||||
}
|
||||
}
|
||||
default:
|
||||
return new QuickAction();
|
||||
}
|
||||
}
|
||||
|
||||
public static QuickAction produceAction(QuickAction quickAction) {
|
||||
public static QuickAction produceAction(QuickAction quickAction) {
|
||||
|
||||
switch (quickAction.type) {
|
||||
switch (quickAction.type) {
|
||||
|
||||
case NewAction.TYPE:
|
||||
return new NewAction(quickAction);
|
||||
case NewAction.TYPE:
|
||||
return new NewAction(quickAction);
|
||||
|
||||
case MarkerAction.TYPE:
|
||||
return new MarkerAction(quickAction);
|
||||
case MarkerAction.TYPE:
|
||||
return new MarkerAction(quickAction);
|
||||
|
||||
case FavoriteAction.TYPE:
|
||||
return new FavoriteAction(quickAction);
|
||||
case FavoriteAction.TYPE:
|
||||
return new FavoriteAction(quickAction);
|
||||
|
||||
case ShowHideFavoritesAction.TYPE:
|
||||
return new ShowHideFavoritesAction(quickAction);
|
||||
case ShowHideFavoritesAction.TYPE:
|
||||
return new ShowHideFavoritesAction(quickAction);
|
||||
|
||||
case ShowHidePoiAction.TYPE:
|
||||
return new ShowHidePoiAction(quickAction);
|
||||
case ShowHidePoiAction.TYPE:
|
||||
return new ShowHidePoiAction(quickAction);
|
||||
|
||||
case GPXAction.TYPE:
|
||||
return new GPXAction(quickAction);
|
||||
case GPXAction.TYPE:
|
||||
return new GPXAction(quickAction);
|
||||
|
||||
case ParkingAction.TYPE:
|
||||
return new ParkingAction(quickAction);
|
||||
case ParkingAction.TYPE:
|
||||
return new ParkingAction(quickAction);
|
||||
|
||||
case TakeAudioNoteAction.TYPE:
|
||||
return new TakeAudioNoteAction(quickAction);
|
||||
case TakeAudioNoteAction.TYPE:
|
||||
return new TakeAudioNoteAction(quickAction);
|
||||
|
||||
case TakePhotoNoteAction.TYPE:
|
||||
return new TakePhotoNoteAction(quickAction);
|
||||
case TakePhotoNoteAction.TYPE:
|
||||
return new TakePhotoNoteAction(quickAction);
|
||||
|
||||
case TakeVideoNoteAction.TYPE:
|
||||
return new TakeVideoNoteAction(quickAction);
|
||||
case TakeVideoNoteAction.TYPE:
|
||||
return new TakeVideoNoteAction(quickAction);
|
||||
|
||||
case NavVoiceAction.TYPE:
|
||||
return new NavVoiceAction(quickAction);
|
||||
case NavVoiceAction.TYPE:
|
||||
return new NavVoiceAction(quickAction);
|
||||
|
||||
case ShowHideOSMBugAction.TYPE:
|
||||
return new ShowHideOSMBugAction(quickAction);
|
||||
case ShowHideOSMBugAction.TYPE:
|
||||
return new ShowHideOSMBugAction(quickAction);
|
||||
|
||||
case AddOSMBugAction.TYPE:
|
||||
return new AddOSMBugAction(quickAction);
|
||||
case AddOSMBugAction.TYPE:
|
||||
return new AddOSMBugAction(quickAction);
|
||||
|
||||
case AddPOIAction.TYPE:
|
||||
return new AddPOIAction(quickAction);
|
||||
case AddPOIAction.TYPE:
|
||||
return new AddPOIAction(quickAction);
|
||||
|
||||
case MapStyleAction.TYPE:
|
||||
return new MapStyleAction(quickAction);
|
||||
case MapStyleAction.TYPE:
|
||||
return new MapStyleAction(quickAction);
|
||||
|
||||
case MapSourceAction.TYPE:
|
||||
return new MapSourceAction(quickAction);
|
||||
case MapSourceAction.TYPE:
|
||||
return new MapSourceAction(quickAction);
|
||||
|
||||
case MapOverlayAction.TYPE:
|
||||
return new MapOverlayAction(quickAction);
|
||||
case MapOverlayAction.TYPE:
|
||||
return new MapOverlayAction(quickAction);
|
||||
|
||||
case MapUnderlayAction.TYPE:
|
||||
return new MapUnderlayAction(quickAction);
|
||||
case MapUnderlayAction.TYPE:
|
||||
return new MapUnderlayAction(quickAction);
|
||||
|
||||
case NavAddDestinationAction.TYPE:
|
||||
return new NavAddDestinationAction(quickAction);
|
||||
case NavAddDestinationAction.TYPE:
|
||||
return new NavAddDestinationAction(quickAction);
|
||||
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
return new NavAddFirstIntermediateAction(quickAction);
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
return new NavAddFirstIntermediateAction(quickAction);
|
||||
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
return new NavReplaceDestinationAction(quickAction);
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
return new NavReplaceDestinationAction(quickAction);
|
||||
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
return new NavAutoZoomMapAction(quickAction);
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
return new NavAutoZoomMapAction(quickAction);
|
||||
|
||||
default:
|
||||
return quickAction;
|
||||
}
|
||||
}
|
||||
default:
|
||||
return quickAction;
|
||||
}
|
||||
}
|
||||
|
||||
public static @DrawableRes int getActionIcon(int type) {
|
||||
public static @DrawableRes int getActionIcon(int type) {
|
||||
|
||||
switch (type) {
|
||||
switch (type) {
|
||||
|
||||
case NewAction.TYPE:
|
||||
return R.drawable.ic_action_plus;
|
||||
case NewAction.TYPE:
|
||||
return R.drawable.ic_action_plus;
|
||||
|
||||
case MarkerAction.TYPE:
|
||||
return R.drawable.ic_action_flag_dark;
|
||||
case MarkerAction.TYPE:
|
||||
return R.drawable.ic_action_flag_dark;
|
||||
|
||||
case FavoriteAction.TYPE:
|
||||
return R.drawable.ic_action_fav_dark;
|
||||
case FavoriteAction.TYPE:
|
||||
return R.drawable.ic_action_fav_dark;
|
||||
|
||||
case ShowHideFavoritesAction.TYPE:
|
||||
return R.drawable.ic_action_fav_dark;
|
||||
case ShowHideFavoritesAction.TYPE:
|
||||
return R.drawable.ic_action_fav_dark;
|
||||
|
||||
case ShowHidePoiAction.TYPE:
|
||||
return R.drawable.ic_action_gabout_dark;
|
||||
case ShowHidePoiAction.TYPE:
|
||||
return R.drawable.ic_action_gabout_dark;
|
||||
|
||||
case GPXAction.TYPE:
|
||||
return R.drawable.ic_action_flag_dark;
|
||||
case GPXAction.TYPE:
|
||||
return R.drawable.ic_action_flag_dark;
|
||||
|
||||
case ParkingAction.TYPE:
|
||||
return R.drawable.ic_action_parking_dark;
|
||||
case ParkingAction.TYPE:
|
||||
return R.drawable.ic_action_parking_dark;
|
||||
|
||||
case TakeAudioNoteAction.TYPE:
|
||||
return R.drawable.ic_action_micro_dark;
|
||||
case TakeAudioNoteAction.TYPE:
|
||||
return R.drawable.ic_action_micro_dark;
|
||||
|
||||
case TakePhotoNoteAction.TYPE:
|
||||
return R.drawable.ic_action_photo_dark;
|
||||
case TakePhotoNoteAction.TYPE:
|
||||
return R.drawable.ic_action_photo_dark;
|
||||
|
||||
case TakeVideoNoteAction.TYPE:
|
||||
return R.drawable.ic_action_video_dark;
|
||||
case TakeVideoNoteAction.TYPE:
|
||||
return R.drawable.ic_action_video_dark;
|
||||
|
||||
case NavVoiceAction.TYPE:
|
||||
return R.drawable.ic_action_volume_up;
|
||||
case NavVoiceAction.TYPE:
|
||||
return R.drawable.ic_action_volume_up;
|
||||
|
||||
case ShowHideOSMBugAction.TYPE:
|
||||
return R.drawable.ic_action_bug_dark;
|
||||
case ShowHideOSMBugAction.TYPE:
|
||||
return R.drawable.ic_action_bug_dark;
|
||||
|
||||
case AddOSMBugAction.TYPE:
|
||||
return R.drawable.ic_action_bug_dark;
|
||||
case AddOSMBugAction.TYPE:
|
||||
return R.drawable.ic_action_bug_dark;
|
||||
|
||||
case AddPOIAction.TYPE:
|
||||
return R.drawable.ic_action_gabout_dark;
|
||||
case AddPOIAction.TYPE:
|
||||
return R.drawable.ic_action_gabout_dark;
|
||||
|
||||
case MapStyleAction.TYPE:
|
||||
return R.drawable.ic_map;
|
||||
case MapStyleAction.TYPE:
|
||||
return R.drawable.ic_map;
|
||||
|
||||
case MapSourceAction.TYPE:
|
||||
return R.drawable.ic_world_globe_dark;
|
||||
case MapSourceAction.TYPE:
|
||||
return R.drawable.ic_world_globe_dark;
|
||||
|
||||
case MapOverlayAction.TYPE:
|
||||
return R.drawable.ic_layer_top_dark;
|
||||
case MapOverlayAction.TYPE:
|
||||
return R.drawable.ic_layer_top_dark;
|
||||
|
||||
case MapUnderlayAction.TYPE:
|
||||
return R.drawable.ic_layer_bottom_dark;
|
||||
case MapUnderlayAction.TYPE:
|
||||
return R.drawable.ic_layer_bottom_dark;
|
||||
|
||||
case NavAddDestinationAction.TYPE:
|
||||
return R.drawable.ic_action_target;
|
||||
case NavAddDestinationAction.TYPE:
|
||||
return R.drawable.ic_action_target;
|
||||
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
return R.drawable.ic_action_intermediate;
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
return R.drawable.ic_action_intermediate;
|
||||
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
return R.drawable.ic_action_target;
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
return R.drawable.ic_action_target;
|
||||
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
return R.drawable.ic_action_search_dark;
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
return R.drawable.ic_action_search_dark;
|
||||
|
||||
default:
|
||||
return R.drawable.ic_action_plus;
|
||||
}
|
||||
}
|
||||
default:
|
||||
return R.drawable.ic_action_plus;
|
||||
}
|
||||
}
|
||||
|
||||
public static @StringRes int getActionName(int type) {
|
||||
public static @StringRes int getActionName(int type) {
|
||||
|
||||
switch (type) {
|
||||
switch (type) {
|
||||
|
||||
case NewAction.TYPE:
|
||||
return R.string.quick_action_new_action;
|
||||
case NewAction.TYPE:
|
||||
return R.string.quick_action_new_action;
|
||||
|
||||
case MarkerAction.TYPE:
|
||||
return R.string.quick_action_add_marker;
|
||||
case MarkerAction.TYPE:
|
||||
return R.string.quick_action_add_marker;
|
||||
|
||||
case FavoriteAction.TYPE:
|
||||
return R.string.quick_action_add_favorite;
|
||||
case FavoriteAction.TYPE:
|
||||
return R.string.quick_action_add_favorite;
|
||||
|
||||
case ShowHideFavoritesAction.TYPE:
|
||||
return R.string.quick_action_showhide_favorites_title;
|
||||
case ShowHideFavoritesAction.TYPE:
|
||||
return R.string.quick_action_showhide_favorites_title;
|
||||
|
||||
case ShowHidePoiAction.TYPE:
|
||||
return R.string.quick_action_showhide_poi_title;
|
||||
case ShowHidePoiAction.TYPE:
|
||||
return R.string.quick_action_showhide_poi_title;
|
||||
|
||||
case GPXAction.TYPE:
|
||||
return R.string.quick_action_add_gpx;
|
||||
case GPXAction.TYPE:
|
||||
return R.string.quick_action_add_gpx;
|
||||
|
||||
case ParkingAction.TYPE:
|
||||
return R.string.quick_action_add_parking;
|
||||
case ParkingAction.TYPE:
|
||||
return R.string.quick_action_add_parking;
|
||||
|
||||
case TakeAudioNoteAction.TYPE:
|
||||
return R.string.quick_action_take_audio_note;
|
||||
case TakeAudioNoteAction.TYPE:
|
||||
return R.string.quick_action_take_audio_note;
|
||||
|
||||
case TakePhotoNoteAction.TYPE:
|
||||
return R.string.quick_action_take_photo_note;
|
||||
case TakePhotoNoteAction.TYPE:
|
||||
return R.string.quick_action_take_photo_note;
|
||||
|
||||
case TakeVideoNoteAction.TYPE:
|
||||
return R.string.quick_action_take_video_note;
|
||||
case TakeVideoNoteAction.TYPE:
|
||||
return R.string.quick_action_take_video_note;
|
||||
|
||||
case NavVoiceAction.TYPE:
|
||||
return R.string.quick_action_navigation_voice;
|
||||
case NavVoiceAction.TYPE:
|
||||
return R.string.quick_action_navigation_voice;
|
||||
|
||||
case ShowHideOSMBugAction.TYPE:
|
||||
return R.string.quick_action_showhide_osmbugs_title;
|
||||
case ShowHideOSMBugAction.TYPE:
|
||||
return R.string.quick_action_showhide_osmbugs_title;
|
||||
|
||||
case AddOSMBugAction.TYPE:
|
||||
return R.string.quick_action_add_osm_bug;
|
||||
case AddOSMBugAction.TYPE:
|
||||
return R.string.quick_action_add_osm_bug;
|
||||
|
||||
case AddPOIAction.TYPE:
|
||||
return R.string.quick_action_add_poi;
|
||||
case AddPOIAction.TYPE:
|
||||
return R.string.quick_action_add_poi;
|
||||
|
||||
case MapStyleAction.TYPE:
|
||||
return R.string.quick_action_map_style;
|
||||
case MapStyleAction.TYPE:
|
||||
return R.string.quick_action_map_style;
|
||||
|
||||
case MapSourceAction.TYPE:
|
||||
return R.string.quick_action_map_source;
|
||||
case MapSourceAction.TYPE:
|
||||
return R.string.quick_action_map_source;
|
||||
|
||||
case MapOverlayAction.TYPE:
|
||||
return R.string.quick_action_map_overlay;
|
||||
case MapOverlayAction.TYPE:
|
||||
return R.string.quick_action_map_overlay;
|
||||
|
||||
case MapUnderlayAction.TYPE:
|
||||
return R.string.quick_action_map_underlay;
|
||||
case MapUnderlayAction.TYPE:
|
||||
return R.string.quick_action_map_underlay;
|
||||
|
||||
case NavAddDestinationAction.TYPE:
|
||||
return R.string.quick_action_add_destination;
|
||||
case NavAddDestinationAction.TYPE:
|
||||
return R.string.quick_action_add_destination;
|
||||
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
return R.string.quick_action_add_first_intermediate;
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
return R.string.quick_action_add_first_intermediate;
|
||||
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
return R.string.quick_action_replace_destination;
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
return R.string.quick_action_replace_destination;
|
||||
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
return R.string.quick_action_auto_zoom;
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
return R.string.quick_action_auto_zoom;
|
||||
|
||||
default:
|
||||
return R.string.quick_action_new_action;
|
||||
}
|
||||
}
|
||||
default:
|
||||
return R.string.quick_action_new_action;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isActionEditable(int type) {
|
||||
public static boolean isActionEditable(int type) {
|
||||
|
||||
switch (type) {
|
||||
switch (type) {
|
||||
|
||||
case NewAction.TYPE:
|
||||
case MarkerAction.TYPE:
|
||||
case ShowHideFavoritesAction.TYPE:
|
||||
case ShowHidePoiAction.TYPE:
|
||||
case ParkingAction.TYPE:
|
||||
case TakeAudioNoteAction.TYPE:
|
||||
case TakePhotoNoteAction.TYPE:
|
||||
case TakeVideoNoteAction.TYPE:
|
||||
case NavVoiceAction.TYPE:
|
||||
case NavAddDestinationAction.TYPE:
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
case ShowHideOSMBugAction.TYPE:
|
||||
return false;
|
||||
case NewAction.TYPE:
|
||||
case MarkerAction.TYPE:
|
||||
case ShowHideFavoritesAction.TYPE:
|
||||
case ShowHidePoiAction.TYPE:
|
||||
case ParkingAction.TYPE:
|
||||
case TakeAudioNoteAction.TYPE:
|
||||
case TakePhotoNoteAction.TYPE:
|
||||
case TakeVideoNoteAction.TYPE:
|
||||
case NavVoiceAction.TYPE:
|
||||
case NavAddDestinationAction.TYPE:
|
||||
case NavAddFirstIntermediateAction.TYPE:
|
||||
case NavReplaceDestinationAction.TYPE:
|
||||
case NavAutoZoomMapAction.TYPE:
|
||||
case ShowHideOSMBugAction.TYPE:
|
||||
return false;
|
||||
|
||||
default: return true;
|
||||
}
|
||||
}
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue