From 41e4e678f6aab49646c0311706874a89fec562f2 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Sat, 15 Nov 2014 22:05:02 +0100 Subject: Fixed a couple of NullpointerException in TagFragment --- .../java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java index d39b69b3b..c8cdbcfed 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java @@ -1,7 +1,7 @@ package de.danoeh.antennapod.fragment.gpodnet; -import android.app.Activity; import android.os.Bundle; +import android.support.annotation.Nullable; import org.apache.commons.lang3.Validate; @@ -39,13 +39,12 @@ public class TagFragment extends PodcastListFragment { Bundle args = getArguments(); Validate.isTrue(args != null && args.getString("tag") != null, "args invalid"); - tag = new GpodnetTag(args.getString("tag")); } @Override - public void onAttach(Activity activity) { - super.onAttach(activity); + public void onActivityCreated(@Nullable Bundle savedInstanceState) { + super.onActivityCreated(savedInstanceState); ((MainActivity) getActivity()).getMainActivtyActionBar().setTitle(tag.getName()); } -- cgit v1.2.3