correct time display
This commit is contained in:
parent
70c3f3f4b8
commit
614f8770cb
2 changed files with 6 additions and 4 deletions
|
@ -9,8 +9,8 @@
|
|||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||
-->
|
||||
<string name="local_index_gpx_timespan">\nTime span: %1$tT</string>
|
||||
<string name="local_index_gpx_timemoving">\nTime moving: %1$tT</string>
|
||||
<string name="local_index_gpx_timespan">\nTime span: %1$d:%2$02d:%3$02d</string>
|
||||
<string name="local_index_gpx_timemoving">\nTime moving: %1$d:%2$02d:%3$02d</string>
|
||||
<string name="app_mode_default">Browse map</string>
|
||||
<string name="settings_preset">Default profile</string>
|
||||
<string name="settings_preset_descr">Map view and navigation settings are remembered per use profile. Set your default profile here.</string>
|
||||
|
|
|
@ -126,6 +126,7 @@ public class LocalIndexHelper {
|
|||
int totalTracks = 0;
|
||||
long startTime = Long.MAX_VALUE;
|
||||
long endTime = Long.MIN_VALUE;
|
||||
long timeSpan = 0;
|
||||
long timeMoving = 0;
|
||||
|
||||
double diffElevationUp = 0;
|
||||
|
@ -203,10 +204,11 @@ public class LocalIndexHelper {
|
|||
info.setDescription(app.getString(R.string.local_index_gpx_info, totalTracks, points,
|
||||
result.points.size(), OsmAndFormatter.getFormattedDistance(totalDistance, app),
|
||||
startTime, endTime));
|
||||
info.setDescription(info.getDescription() + app.getString(R.string.local_index_gpx_timespan, endTime - startTime));
|
||||
timeSpan = endTime - startTime;
|
||||
info.setDescription(info.getDescription() + app.getString(R.string.local_index_gpx_timespan, (int) ((timeSpan / 1000) / 3600), (int) (((timeSpan / 1000) / 60) % 60), (int) ((timeSpan / 1000) % 60)));
|
||||
if(timeMoving > 0){
|
||||
info.setDescription(info.getDescription() +
|
||||
app.getString(R.string.local_index_gpx_timemoving, timeMoving));
|
||||
app.getString(R.string.local_index_gpx_timemoving, (int) ((timeMoving / 1000) / 3600), (int) (((timeMoving / 1000) / 60) % 60), (int) ((timeMoving / 1000) % 60)));
|
||||
}
|
||||
|
||||
if(totalElevation != 0 || diffElevationUp != 0 || diffElevationDown != 0){
|
||||
|
|
Loading…
Reference in a new issue