private void setExtendForecastValues(List <WeatherConditionModel> extendedForecast) { extMaxTempRow1.Text = maxLabel + " " + ConvertTemperatures.AppendDegreeCharacter(extendedForecast[0].weatherCondition.maxTemp); extMinTempRow1.Text = minLabel + " " + ConvertTemperatures.AppendDegreeCharacter(extendedForecast[0].weatherCondition.minTemp); dayRow1.Text = DateUtils.GetDayOfTheWeek(extendedForecast[0].unixTimestamp); iconImageRow1.SetImageResource(manageWeatherIcon(extendedForecast[0].weather)); extMaxTempRow2.Text = maxLabel + " " + ConvertTemperatures.AppendDegreeCharacter(extendedForecast[1].weatherCondition.maxTemp); extMinTempRow2.Text = minLabel + " " + ConvertTemperatures.AppendDegreeCharacter(extendedForecast[1].weatherCondition.minTemp); dayRow2.Text = DateUtils.GetDayOfTheWeek(extendedForecast[1].unixTimestamp); iconImageRow2.SetImageResource(manageWeatherIcon(extendedForecast[1].weather)); content.Visibility = Android.Views.ViewStates.Visible; spinner.Visibility = Android.Views.ViewStates.Gone; }
private void setLabelValues(CurrentWeatherModel model) { string countryCity = model.CityName + ", " + GetCountryFromCode.getCountry(model.System.CountryCode); string lastUpdatedLabel = this.Resources.GetString(Resource.String.lastupdated_string); dateLabel.Text = DateUtils.unixTimestampToDate(model.Timestamp); mainTempLabel.Text = ConvertTemperatures.AppendDegreeCharacter(model.TempPressure.Temperature); maxTempLabel.Text = maxLabel + " " + ConvertTemperatures.AppendDegreeCharacter(model.TempPressure.TempMax); minTempLabel.Text = minLabel + " " + ConvertTemperatures.AppendDegreeCharacter(model.TempPressure.TempMin); areaLabel.Text = countryCity; string updated = DateUtils.Get24HourTimeFromTimeStamp(model.Timestamp); lastUpdated.Text = lastUpdatedLabel + " " + updated; weatherIcon.SetImageResource(manageWeatherIcon(model.Weather)); }