This commit is contained in:
GaidamakUA 2015-12-04 15:22:01 +02:00
commit 7a87b0a90b
8 changed files with 62 additions and 23 deletions

View file

@ -95,7 +95,6 @@ public class GeocodingUtilities {
this.building = r.building;
this.city = r.city;
this.street = r.street;
this.streetName = r.streetName;
}
// input

View file

@ -2124,4 +2124,5 @@
<string name="av_audio_format_descr">Vælg audio output-format</string>
<string name="av_audio_bitrate">Audio bitrate</string>
<string name="av_audio_bitrate_descr">Vælg audio bitrate</string>
<string name="shared_string_near">I nærheden af</string>
</resources>

View file

@ -1,5 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="shared_string_near">Nähe</string>
<string name="regions">Regionen</string>
<string name="region_maps">Regionsweite Karten</string>
<string name="world_maps">Weltweite Karten</string>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="offline_edition">Modifications hors-ligne</string>
<string name="offline_edition_descr">Toujours utiliser l\'édition hors-ligne</string>
@ -2129,4 +2130,14 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
<string name="routing_attr_avoid_stairs_description">Éviter les escaliers</string>
<string name="release_2_2">" • Nouveaux menus contextuels sur un point de la carte\n\n • Choix de l\'affichage au démarrage (tableau de bord ou carte)\n\n • Personnalisation du contenu du tableau de bord\n\n • Possibilité d\'ignorer le tableau de bord et de n\'utiliser que les menus\n\n • Téléchargement des cartes des régions en appuyant directement sur la carte mondiale\n\n • Amélioration de la recherche des PI (Point d\'Intérêt)\n\n • Amélioration des PI (Point d\'Intérêt) et des contributions OSM (Open Street Map)\n\n • Refonte du téléchargement des cartes\n\n et bien plus encore … "</string>
<string name="poi_context_menu_modify_osm_change">Modifier la contribution OSM</string>
</resources>
<string name="shared_string_near">Proche</string>
<string name="shared_string_hide">Masquer</string>
<string name="av_video_quality_low">Résolution plus basse</string>
<string name="av_video_quality_high">Résolution plus élevée</string>
<string name="av_video_quality">Qualité de la sortie vidéo</string>
<string name="av_video_quality_descr">Sélectionnez la qualité de la sortie vidéo</string>
<string name="av_audio_format">Format de la sortie audio</string>
<string name="av_audio_format_descr">Sélectionnez le format de la sortie audio</string>
<string name="av_audio_bitrate">Bitrate audio</string>
<string name="av_audio_bitrate_descr">Sélectionnez le bitrate audio</string>
</resources>

View file

@ -2017,4 +2017,14 @@
<string name="routing_attr_avoid_stairs_name">避開樓梯</string>
<string name="routing_attr_avoid_stairs_description">避開樓梯</string>
<string name="routing_attr_avoid_borders_name">避開跨越邊界</string>
</resources>
<string name="shared_string_hide">隱藏</string>
<string name="av_video_quality_low">最低解析度</string>
<string name="av_video_quality_high">最高解析度</string>
<string name="av_video_quality">視訊輸出品質</string>
<string name="av_video_quality_descr">選擇視訊輸出品質</string>
<string name="av_audio_format">音訊輸出格式</string>
<string name="av_audio_format_descr">選擇音訊輸出格式</string>
<string name="av_audio_bitrate">音訊位元傳輸速率</string>
<string name="av_audio_bitrate_descr">選擇音訊位元傳輸速率</string>
<string name="shared_string_near">附近</string>
</resources>

View file

@ -10,6 +10,7 @@
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="shared_string_near">Near</string>
<string name="shared_string_hide">Hide</string>
<string name="av_video_quality_low">Lowest resolution</string>
<string name="av_video_quality_high">Highest resolution</string>

View file

@ -846,7 +846,6 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
int cameraOrientation = getCamOrientation(mapActivity, Camera.CameraInfo.CAMERA_FACING_BACK);
cam.setDisplayOrientation(cameraOrientation);
parameters.set("rotation", cameraOrientation);
//parameters.setPreviewSize(recordingMenu.getViewfinderHeight(), recordingMenu.getViewfinderWidth());
cam.setParameters(parameters);
cam.setPreviewDisplay(holder);
cam.startPreview();
@ -856,7 +855,10 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
} catch (Exception e) {
logErr(e);
closeRecordingMenu();
closeCamera();
finishRecording();
return;
}
@ -1125,11 +1127,11 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
int cameraOrientation = getCamOrientation(mapActivity, Camera.CameraInfo.CAMERA_FACING_BACK);
cam.setDisplayOrientation(cameraOrientation);
parameters.set("rotation", cameraOrientation);
if (cameraOrientation == 0 || cameraOrientation == 180) {
parameters.setPreviewSize(recordingMenu.getViewfinderWidth(), recordingMenu.getViewfinderHeight());
} else {
parameters.setPreviewSize(recordingMenu.getViewfinderHeight(), recordingMenu.getViewfinderWidth());
}
// if (cameraOrientation == 0 || cameraOrientation == 180) {
// parameters.setPreviewSize(recordingMenu.getViewfinderWidth(), recordingMenu.getViewfinderHeight());
// } else {
// parameters.setPreviewSize(recordingMenu.getViewfinderHeight(), recordingMenu.getViewfinderWidth());
// }
cam.setParameters(parameters);
cam.setPreviewDisplay(holder);
cam.startPreview();
@ -1138,7 +1140,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
}
} catch (Exception e) {
logErr(e);
closeRecordingMenu();
closeCamera();
finishRecording();
e.printStackTrace();
}
}
@ -1199,7 +1203,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
try {
cam.takePicture(null, null, new AudioVideoPhotoHandler(lastTakingPhoto));
} catch (RuntimeException e) {
closeRecordingMenu();
closeCamera();
finishRecording();
}
}
}
@ -1256,9 +1262,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
SHOW_RECORDINGS.set(true);
mapActivity.getMapView().refreshMap();
updateWidgetIcon(recordControl);
recordingMenu.hide();
recordingMenu = null;
restoreScreenOrientation();
closeRecordingMenu();
}
}
@ -1491,6 +1495,21 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
});
}
private void closeRecordingMenu() {
if (mapActivity != null) {
mapActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (recordingMenu != null) {
recordingMenu.hide();
recordingMenu = null;
}
restoreScreenOrientation();
}
});
}
}
public void playRecording(final Context ctx, final Recording r) {
if (r.isVideo()) {
Intent vint = new Intent(Intent.ACTION_VIEW);
@ -1623,17 +1642,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
} catch (Exception error) {
logErr(error);
} finally {
if (mapActivity != null) {
mapActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
recordingMenu.hide();
recordingMenu = null;
restoreScreenOrientation();
}
});
}
closeRecordingMenu();
closeCamera();
finishRecording();
}
}
}

View file

@ -171,6 +171,11 @@ public abstract class MenuTitleController {
}
streetStr = geocodingResult;
if (!Algorithms.isEmpty(streetStr) && object.getDistance() > 100) {
streetStr = getMapActivity().getString(R.string.shared_string_near) + " " + streetStr;
}
if (!Algorithms.isEmpty(streetStr)) {
MenuController menuController = getMenuController();
if (menuController == null || menuController.displayStreetNameInTitle()) {