Fix alt and speed
This commit is contained in:
parent
87c1029b5c
commit
eaff1b8c7a
2 changed files with 4 additions and 4 deletions
|
@ -9,8 +9,6 @@
|
|||
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="measurement_tool_altitude">Altitude: %1$s</string>
|
||||
<string name="measurement_tool_speed">Speed: %1$s</string>
|
||||
<string name="line">Line</string>
|
||||
<string name="save_as_route_point">Save as Route Point</string>
|
||||
<string name="save_as_line">Save as line</string>
|
||||
|
|
|
@ -108,13 +108,15 @@ public class MeasurementToolAdapter extends RecyclerView.Adapter<MeasurementTool
|
|||
if (actionType == NewGpxData.ActionType.EDIT_SEGMENT) {
|
||||
double elevation = pt.ele;
|
||||
if (!Double.isNaN(elevation)) {
|
||||
holder.elevation.setText(mapActivity.getString(R.string.measurement_tool_altitude, OsmAndFormatter.getFormattedAlt(elevation, mapActivity.getMyApplication())));
|
||||
String eleStr = (mapActivity.getString(R.string.altitude)).substring(0, 1);
|
||||
holder.elevation.setText(eleStr + ": " + OsmAndFormatter.getFormattedAlt(elevation, mapActivity.getMyApplication()));
|
||||
} else {
|
||||
holder.elevation.setText("");
|
||||
}
|
||||
float speed = (float) pt.speed;
|
||||
if (speed != 0) {
|
||||
holder.speed.setText(mapActivity.getString(R.string.measurement_tool_speed, OsmAndFormatter.getFormattedSpeed(speed, mapActivity.getMyApplication())));
|
||||
String speedStr = (mapActivity.getString(R.string.map_widget_speed)).substring(0, 1);
|
||||
holder.speed.setText(speedStr + ": " + OsmAndFormatter.getFormattedSpeed(speed, mapActivity.getMyApplication()));
|
||||
} else {
|
||||
holder.speed.setText("");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue