diff --git a/app/src/main/java/org/woheller69/weather/widget/WeatherWidget.java b/app/src/main/java/org/woheller69/weather/widget/WeatherWidget.java index bade990..b6681e2 100644 --- a/app/src/main/java/org/woheller69/weather/widget/WeatherWidget.java +++ b/app/src/main/java/org/woheller69/weather/widget/WeatherWidget.java @@ -137,7 +137,12 @@ public static void updateView(Context context, AppWidgetManager appWidgetManager views.setTextViewText(R.id.widget_rain60min,"☔ "+rain60); views.setTextViewText(R.id.widget_city_name, city.getCityName()); views.setImageViewResource(R.id.widget_windicon,StringFormatUtils.colorWindSpeedWidget(weatherData.getWindSpeed())); - views.setTextViewText(R.id.widget_sunrise_sunset,"\u2600\u25b2\u2009" + StringFormatUtils.formatTimeWithoutZone(context, riseTime) + " \u25bc\u2009" + StringFormatUtils.formatTimeWithoutZone(context, setTime)); + + if (riseTime==zoneseconds*1000 || setTime==zoneseconds*1000) views.setTextViewText(R.id.widget_sunrise_sunset,"\u2600\u25b2 --:--" + " \u25bc --:--"); + else { + views.setTextViewText(R.id.widget_sunrise_sunset,"\u2600\u25b2\u2009" + StringFormatUtils.formatTimeWithoutZone(context, riseTime) + " \u25bc\u2009" + StringFormatUtils.formatTimeWithoutZone(context, setTime)); + } + views.setTextViewText(R.id.widget_UVindex,"UV"); views.setInt(R.id.widget_UVindex,"setBackgroundResource",StringFormatUtils.widgetColorUVindex(context,Math.round(weekforecasts.get(0).getUv_index())));