*/
package name.gumartinm.weather.information.fragment.map;
-import java.io.IOException;
-import java.util.List;
-import java.util.Locale;
-
-import android.app.Activity;
import android.content.Context;
import android.location.Address;
import android.location.Geocoder;
import android.view.View;
import android.view.ViewGroup;
+import java.io.IOException;
+import java.util.List;
+import java.util.Locale;
+
import name.gumartinm.weather.information.R;
import name.gumartinm.weather.information.model.WeatherLocation;
import timber.log.Timber;
* Callback interface through which the fragment will report the
* task's progress and results back to the Activity.
*/
- public static interface TaskCallbacks {
+ public interface TaskCallbacks {
void onPostExecute(final WeatherLocation weatherLocation);
}
* each configuration change.
*/
@Override
- public void onAttach(final Activity activity) {
- super.onAttach(activity);
- mCallbacks = (TaskCallbacks) activity;
+ public void onAttach(final Context context) {
+ super.onAttach(context);
+ mCallbacks = (TaskCallbacks) context;
}
/**