Skip to content

Commit 6e7d849

Browse files
Update MainActivity.java
Temp bug fix. Thx to blog readers!
1 parent cf9aa87 commit 6e7d849

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

WeatherApp/src/com/survivingwithandroid/weatherapp/MainActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ protected void onPostExecute(Weather weather) {
113113

114114
cityText.setText(weather.location.getCity() + "," + weather.location.getCountry());
115115
condDescr.setText(weather.currentCondition.getCondition() + "(" + weather.currentCondition.getDescr() + ")");
116-
temp.setText("" + Math.round((weather.temperature.getTemp() - 275.15)) + "°C");
116+
temp.setText("" + Math.round((weather.temperature.getTemp() - 273.15)) + "C");
117117
hum.setText("" + weather.currentCondition.getHumidity() + "%");
118118
press.setText("" + weather.currentCondition.getPressure() + " hPa");
119119
windSpeed.setText("" + weather.wind.getSpeed() + " mps");
120-
windDeg.setText("" + weather.wind.getDeg() + "°");
120+
windDeg.setText("" + weather.wind.getDeg() + "");
121121

122122
}
123123

@@ -128,4 +128,4 @@ protected void onPostExecute(Weather weather) {
128128

129129

130130
}
131-
}
131+
}

0 commit comments

Comments
 (0)