Created
August 28, 2015 13:02
-
-
Save survivingwithandroid/531eb50c827de085f9c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void getWeather() { | |
weatherclient.getCurrentCondition(new WeatherRequest(currentCity.getId()), | |
new WeatherClient.WeatherEventListener() { | |
@Override | |
public void onWeatherRetrieved(CurrentWeather currentWeather) { | |
// We have the current weather now | |
// Update subtitle toolbar | |
toolbar.setSubtitle(currentWeather.weather.currentCondition.getDescr()); | |
tempView.setText(String.format("%.0f",currentWeather.weather.temperature.getTemp())); | |
pressView.setText(String.valueOf(currentWeather.weather.currentCondition.getPressure())); | |
windView.setText(String.valueOf(currentWeather.weather.wind.getSpeed())); | |
humView.setText(String.valueOf(currentWeather.weather.currentCondition.getHumidity())); | |
weatherIcon.setImageResource(WeatherIconMapper.getWeatherResource(currentWeather.weather.currentCondition.getIcon(), currentWeather.weather.currentCondition.getWeatherId())); | |
setToolbarColor(currentWeather.weather.temperature.getTemp()); | |
} | |
.... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment