Ejemplo n.º 1
0
 void getDetailActivityViewsValues(ForecastItem item, City city) {
   day =
       StringUtils.capitalizeString(
           getDayName(getApplicationContext(), item.getDt_txt().getTime()));
   date = getFormattedDate(item.getDt_txt());
   city_name = city.getName();
   // FIXME: Unable to get name of the city.
   // NOTE: For development purposes I changed default city_name in strings.xml
   Main main = item.getMain();
   Wind wind = item.getWind();
   high_temp = Math.round(main.getTempMax()) + " °C";
   low_temp = Math.round(main.getTempMin()) + " °C";
   humidity_val = Math.round(main.getHumidity()) + " %";
   pressure_val = Math.round(main.getPressure()) + " hPa";
   String wind_speed = Math.round(wind.getSpeed()) + " km/h";
   String wind_deg = getFormattedWind(wind.getDeg());
   wind_val = wind_speed + " \t" + wind_deg;
   icon = getArtResourceForWeatherCondition(item.getWeatherData().getWeatherId());
   description = item.getWeatherData().getDescription();
 }