Fixed a couple of NullpointerException in TagFragment

This commit is contained in:
daniel oeh 2014-11-15 22:05:02 +01:00
parent 689c5b2fe4
commit 41e4e678f6
1 changed files with 3 additions and 4 deletions

View File

@ -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());
}