Fix small things

This commit is contained in:
Victor Shcherb 2013-05-31 00:17:19 +02:00
parent 36846caad6
commit d31f8531ca

View file

@ -129,7 +129,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
private void updateText() { private void updateText() {
if (distanceControl != null) { if (distanceControl != null) {
String ds = distance; String ds = distance;
if (distance == null) { if (ds == null) {
distanceControl.setText(app.getString(R.string.dist_control_start), ""); distanceControl.setText(app.getString(R.string.dist_control_start), "");
} else { } else {
int ls = ds.lastIndexOf(' '); int ls = ds.lastIndexOf(' ');
@ -389,6 +389,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
} }
distance = OsmAndFormatter.getFormattedDistance(dist, app); distance = OsmAndFormatter.getFormattedDistance(dist, app);
} }
updateText();
} }
@ -613,8 +614,9 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
} }
if(((WptPt) o).time != 0) { if(((WptPt) o).time != 0) {
Date date = new Date(((WptPt) o).time); Date date = new Date(((WptPt) o).time);
java.text.DateFormat dateFormat = android.text.format.DateFormat.getTimeFormat(app); java.text.DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(app);
l.add(app.getString(R.string.plugin_distance_point_time) + " "+ dateFormat.format(date)); java.text.DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(app);
l.add(app.getString(R.string.plugin_distance_point_time) + " "+ dateFormat.format(date) + " " + timeFormat.format(date));
} }
return desc + " " + l; return desc + " " + l;
} }