From d69817600cb7e9bb90171732ff09bdad7d01ded9 Mon Sep 17 00:00:00 2001 From: "gu.martinm@gmail.com" Date: Mon, 22 Sep 2014 03:39:15 +0200 Subject: [PATCH] WeatherInformation: overview 1. setListShownNoAnimation did not work as expected (something usual in Android) 2. When error, show message and remove progress bar. --- .../de/example/exampletdd/fragment/overview/OverviewFragment.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Android/WeatherInformation/src/de/example/exampletdd/fragment/overview/OverviewFragment.java b/Android/WeatherInformation/src/de/example/exampletdd/fragment/overview/OverviewFragment.java index 2621758..88d4863 100644 --- a/Android/WeatherInformation/src/de/example/exampletdd/fragment/overview/OverviewFragment.java +++ b/Android/WeatherInformation/src/de/example/exampletdd/fragment/overview/OverviewFragment.java @@ -105,7 +105,12 @@ public class OverviewFragment extends ListFragment { final WeatherLocation weatherLocation = query.queryDataBase(); weatherLocation.setLastForecastUIUpdate(new Date()); query.updateDataBase(weatherLocation); + + // Show list. + OverviewFragment.this.setListShownNoAnimation(true); } else { + // Empty list and show error message (see setEmptyText in onCreate) + OverviewFragment.this.setListAdapter(null); OverviewFragment.this.setListShownNoAnimation(true); } } -- 2.1.4