Correct distance format

This commit is contained in:
PaulStets 2018-02-01 15:55:21 +02:00
parent c3a4ed09b3
commit db93a2f539

View file

@ -1274,7 +1274,7 @@ public class RouteInfoWidgetsFactory {
locimgId = R.drawable.warnings_pedestrian; locimgId = R.drawable.warnings_pedestrian;
} }
} else if(alarm.getType() == AlarmInfoType.TUNNEL) { } else if(alarm.getType() == AlarmInfoType.TUNNEL) {
DecimalFormat df = new DecimalFormat("0.#"); DecimalFormat df = new DecimalFormat("#.#");
if(settings.DRIVING_REGION.get().americanSigns){ if(settings.DRIVING_REGION.get().americanSigns){
locimgId = R.drawable.warnings_tunnel_us; locimgId = R.drawable.warnings_tunnel_us;
text = df.format(alarm.getFloatValue()) +" mi"; text = df.format(alarm.getFloatValue()) +" mi";