From: Gustavo Martin Morcuende Date: Sun, 14 Dec 2014 19:48:04 +0000 (+0100) Subject: Using static inner class (just because we avoid pointer to outer class) X-Git-Tag: weatherinformation-1.0~5 X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=bb87b5e4fed7b9859a5e03d7d839b0cadd969f63;p=AndroidWeatherInformation Using static inner class (just because we avoid pointer to outer class) --- diff --git a/app/src/main/java/name/gumartinm/weather/information/fragment/current/CurrentFragment.java b/app/src/main/java/name/gumartinm/weather/information/fragment/current/CurrentFragment.java index 2ece175..18b974f 100644 --- a/app/src/main/java/name/gumartinm/weather/information/fragment/current/CurrentFragment.java +++ b/app/src/main/java/name/gumartinm/weather/information/fragment/current/CurrentFragment.java @@ -380,7 +380,7 @@ public class CurrentFragment extends Fragment { return false; } - private class CurrentTask extends AsyncTask { + private static class CurrentTask extends AsyncTask { // Store the context passed to the AsyncTask when the system instantiates it. private final Context localContext; final CustomHTTPClient HTTPClient; diff --git a/app/src/main/java/name/gumartinm/weather/information/fragment/overview/OverviewFragment.java b/app/src/main/java/name/gumartinm/weather/information/fragment/overview/OverviewFragment.java index c017fd8..8424aba 100644 --- a/app/src/main/java/name/gumartinm/weather/information/fragment/overview/OverviewFragment.java +++ b/app/src/main/java/name/gumartinm/weather/information/fragment/overview/OverviewFragment.java @@ -306,7 +306,7 @@ public class OverviewFragment extends ListFragment { return false; } - private class OverviewTask extends AsyncTask { + private static class OverviewTask extends AsyncTask { // Store the context passed to the AsyncTask when the system instantiates it. private final Context localContext; private final CustomHTTPClient HTTPClient;