From: gu.martinm@gmail.com Date: Mon, 22 Sep 2014 01:39:15 +0000 (+0200) Subject: WeatherInformation: overview X-Git-Tag: weatherinformation-1.0~128 X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=95ad882aac78dedd049c7aa87b7eebd00393ffb6;p=AndroidWeatherInformation WeatherInformation: overview 1. setListShownNoAnimation did not work as expected (something usual in Android) 2. When error, show message and remove progress bar. --- 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); } }