Correct distance format

This commit is contained in:
PaulStets 2018-02-01 15:55:21 +02:00 committed by Alexander Sytnyk
parent a4ab825925
commit 93dbe540b5

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";