From 95ad882aac78dedd049c7aa87b7eebd00393ffb6 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. --- src/de/example/exampletdd/fragment/overview/OverviewFragment.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/de/example/exampletdd/fragment/overview/OverviewFragment.java b/src/de/example/exampletdd/fragment/overview/OverviewFragment.java index 2621758..88d4863 100644 --- a/src/de/example/exampletdd/fragment/overview/OverviewFragment.java +++ b/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